зеркало из https://github.com/github/docs.git
add no breadcrumb at xl playwright test (#36397)
This commit is contained in:
Родитель
26b4dc46dd
Коммит
adea632fe2
|
@ -145,22 +145,6 @@ describe('browser search', () => {
|
|||
})
|
||||
})
|
||||
|
||||
describe('x-large viewports - 1280+', () => {
|
||||
jest.setTimeout(60 * 1000)
|
||||
it('in article breadcrumbs at xl viewport should remove last breadcrumb', async () => {
|
||||
await page.setViewport({ width: 1300, height: 700 })
|
||||
await page.goto(
|
||||
'http://localhost:4000/en/enterprise-cloud@latest/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise'
|
||||
)
|
||||
const breadcrumbsElement = await page.$$('[data-testid=breadcrumbs-in-article] ul li')
|
||||
const breadcrumbsMissingElement = await page.$$(
|
||||
'[data-testid=breadcrumbs-in-article] ul li .d-none'
|
||||
)
|
||||
expect(breadcrumbsMissingElement.length).toBe(1)
|
||||
expect(breadcrumbsElement.length).toBe(4)
|
||||
})
|
||||
})
|
||||
|
||||
describe('large -> x-large viewports - 1012+', () => {
|
||||
jest.setTimeout(60 * 1000)
|
||||
it('version picker is visible in header', async () => {
|
||||
|
|
|
@ -228,3 +228,17 @@ test('hovercards', async ({ page }) => {
|
|||
await page.locator('#article-contents').getByRole('link', { name: 'introduction' }).hover()
|
||||
await expect(page.getByText('You can use GitHub Pages to showcase')).toBeVisible()
|
||||
})
|
||||
|
||||
test('x-large viewports - 1280+', async ({ page }) => {
|
||||
page.setViewportSize({
|
||||
width: 1300,
|
||||
height: 700,
|
||||
})
|
||||
await page.goto('/get-started/foo/bar')
|
||||
|
||||
// in article breadcrumbs at xl viewport should remove last breadcrumb so
|
||||
// for this page we should only have 'Get Started / Foo'
|
||||
expect(await page.getByTestId('breadcrumbs-in-article').getByRole('link').all()).toHaveLength(2)
|
||||
await expect(page.getByTestId('breadcrumbs-in-article').getByText('Foo')).toBeVisible()
|
||||
await expect(page.getByTestId('breadcrumbs-in-article').getByText('Bar')).not.toBeVisible()
|
||||
})
|
||||
|
|
Загрузка…
Ссылка в новой задаче