lump Playwright tests about nav in different viewports (#37121)

This commit is contained in:
Peter Bengtsson 2023-05-16 15:42:08 -04:00 коммит произвёл GitHub
Родитель d562087c45
Коммит 8d9ce669ce
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 116 добавлений и 114 удалений

Просмотреть файл

@ -221,7 +221,8 @@ test('hovercards', async ({ page }) => {
await expect(page.getByText("This page doesn't really have an intro")).toBeVisible()
})
test('x-large viewports - 1280+', async ({ page }) => {
test.describe('test nav at different viewports', () => {
test('x-large viewports - 1280+', async ({ page }) => {
page.setViewportSize({
width: 1300,
height: 700,
@ -233,9 +234,9 @@ test('x-large viewports - 1280+', async ({ page }) => {
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()
})
})
test('large -> x-large viewports - 1012+', async ({ page }) => {
test('large -> x-large viewports - 1012+', async ({ page }) => {
page.setViewportSize({
width: 1013,
height: 700,
@ -258,9 +259,9 @@ test('large -> x-large viewports - 1012+', async ({ page }) => {
// header sign up button is visible
await expect(page.getByTestId('header-signup')).toBeVisible()
})
})
test('large viewports - 1012-1279', async ({ page }) => {
test('large viewports - 1012-1279', async ({ page }) => {
page.setViewportSize({
width: 1013,
height: 700,
@ -278,9 +279,9 @@ test('large viewports - 1012-1279', async ({ page }) => {
await expect(page.getByTestId('sidebar-hamburger')).toBeVisible()
await page.getByTestId('sidebar-hamburger').click()
await expect(page.getByTestId('sidebar-product-dialog')).toBeVisible()
})
})
test('medium viewports - 768-1011', async ({ page }) => {
test('medium viewports - 768-1011', async ({ page }) => {
page.setViewportSize({
width: 1000,
height: 700,
@ -311,9 +312,9 @@ test('medium viewports - 768-1011', async ({ page }) => {
await expect(page.getByTestId('sidebar-hamburger')).toBeVisible()
await page.getByTestId('sidebar-hamburger').click()
await expect(page.getByTestId('sidebar-product-dialog')).toBeVisible()
})
})
test('small viewports - 544-767', async ({ page }) => {
test('small viewports - 544-767', async ({ page }) => {
page.setViewportSize({
width: 500,
height: 700,
@ -350,6 +351,7 @@ test('small viewports - 544-767', async ({ page }) => {
await expect(page.getByTestId('sidebar-hamburger')).toBeVisible()
await page.getByTestId('sidebar-hamburger').click()
await expect(page.getByTestId('sidebar-product-dialog')).toBeVisible()
})
})
test.describe('survey', () => {