Skip to content

Commit d8e247f

Browse files
committed
chore: update test
1 parent bf8fc9d commit d8e247f

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

e2e-tests/specs/customizer/hfg/hfg-copyright-component.spec.ts

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ test('Checks the copyright in front-end', async ({ page }) => {
77
page.locator('.hfg_footer .footer--row[data-show-on="desktop"]')
88
).toHaveText('Neve | Powered by WordPress');
99
await expect(
10-
page.locator(
11-
'.hfg_footer .footer--row[data-show-on="desktop"] a:first-child'
12-
)
10+
page
11+
.locator('.hfg_footer .footer--row[data-show-on="desktop"] a')
12+
.nth(0)
1313
).toHaveAttribute('href', 'https://themeisle.com/themes/neve/');
1414
await expect(
15-
page.locator(
16-
'.hfg_footer .footer--row[data-show-on="desktop"] a:nth-child[1]'
17-
)
15+
page
16+
.locator('.hfg_footer .footer--row[data-show-on="desktop"] a')
17+
.nth(1)
1818
).toHaveAttribute('href', 'https://wordpress.org');
1919

2020
// Check that the text is also present for the Mobile footer
@@ -23,13 +23,9 @@ test('Checks the copyright in front-end', async ({ page }) => {
2323
).toHaveText('Neve | Powered by WordPress');
2424

2525
await expect(
26-
page.locator(
27-
'.hfg_footer .footer--row[data-show-on="mobile"] a:first-child'
28-
)
26+
page.locator('.hfg_footer .footer--row[data-show-on="mobile"] a').nth(0)
2927
).toHaveAttribute('href', 'https://themeisle.com/themes/neve/');
3028
await expect(
31-
page.locator(
32-
'.hfg_footer .footer--row[data-show-on="mobile"] a:nth-child[1]'
33-
)
29+
page.locator('.hfg_footer .footer--row[data-show-on="mobile"] a').nth(1)
3430
).toHaveAttribute('href', 'https://wordpress.org');
3531
});

0 commit comments

Comments
 (0)