зеркало из https://github.com/github/docs.git
Remove breadcrumbs from landing pages (#35177)
This commit is contained in:
Родитель
5978d98b49
Коммит
999690674e
|
@ -1,7 +1,6 @@
|
|||
import { useRouter } from 'next/router'
|
||||
import { DefaultLayout } from 'components/DefaultLayout'
|
||||
import { useProductLandingContext } from 'components/context/ProductLandingContext'
|
||||
import cx from 'classnames'
|
||||
|
||||
import { LandingHero } from 'components/landing/LandingHero'
|
||||
import { FeaturedArticles } from 'components/landing/FeaturedArticles'
|
||||
|
@ -15,7 +14,6 @@ import { ProductArticlesList } from 'components/landing/ProductArticlesList'
|
|||
import { ProductReleases } from 'components/landing/ProductReleases'
|
||||
import { useVersion } from 'components/hooks/useVersion'
|
||||
import { RestRedirect } from 'components/RestRedirect'
|
||||
import { Breadcrumbs } from 'components/page-header/Breadcrumbs'
|
||||
|
||||
export const ProductLanding = () => {
|
||||
const router = useRouter()
|
||||
|
@ -35,9 +33,6 @@ export const ProductLanding = () => {
|
|||
<div data-search="article-body">
|
||||
{router.query.productId === 'rest' && <RestRedirect />}
|
||||
<LandingSection className="pt-3">
|
||||
<div className={cx('d-none d-xl-block my-3 mr-auto width-full')}>
|
||||
<Breadcrumbs />
|
||||
</div>
|
||||
<LandingHero />
|
||||
</LandingSection>
|
||||
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
import { getDOM } from '../helpers/e2etest.js'
|
||||
|
||||
describe('breadcrumbs', () => {
|
||||
test('top-level product pages have breadcrumbs and breadcrumbs should exist regardless of header or in-article', async () => {
|
||||
const $ = await getDOM('/get-started')
|
||||
const links = $('[data-testid=breadcrumbs-in-article] a')
|
||||
expect(links.attr('class').includes('d-none')).toBe(false)
|
||||
})
|
||||
|
||||
test('links always prefixed with language', async () => {
|
||||
const $ = await getDOM('/get-started/quickstart/hello-world')
|
||||
const links = $('[data-testid=breadcrumbs-in-article] a')
|
||||
|
@ -61,13 +55,6 @@ describe('breadcrumbs', () => {
|
|||
expect($ghec(ghecLinks[2]).text()).toBe('Greetings GitHub Enterprise Cloud')
|
||||
})
|
||||
|
||||
// Note, early access always work for fixture content
|
||||
test('top-level product pages have breadcrumbs', async () => {
|
||||
const $ = await getDOM('/early-access/secrets/deeper/mariana-trench')
|
||||
expect($('[data-testid=breadcrumbs-in-article]').length).toBe(1)
|
||||
expect($('[data-testid=breadcrumbs-header]').length).toBe(1)
|
||||
})
|
||||
|
||||
test('early access article pages have breadcrumbs with product, category, and article', async () => {
|
||||
const $ = await getDOM('/early-access/secrets/deeper/mariana-trench')
|
||||
const $breadcrumbTitles = $(
|
||||
|
|
Загрузка…
Ссылка в новой задаче