Skip to content

Commit

Permalink
chore: update test
Browse files Browse the repository at this point in the history
  • Loading branch information
preda-bogdan committed May 7, 2024
1 parent bf8fc9d commit d8e247f
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions e2e-tests/specs/customizer/hfg/hfg-copyright-component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ test('Checks the copyright in front-end', async ({ page }) => {
page.locator('.hfg_footer .footer--row[data-show-on="desktop"]')
).toHaveText('Neve | Powered by WordPress');
await expect(
page.locator(
'.hfg_footer .footer--row[data-show-on="desktop"] a:first-child'
)
page
.locator('.hfg_footer .footer--row[data-show-on="desktop"] a')
.nth(0)
).toHaveAttribute('href', 'https://themeisle.com/themes/neve/');
await expect(
page.locator(
'.hfg_footer .footer--row[data-show-on="desktop"] a:nth-child[1]'
)
page
.locator('.hfg_footer .footer--row[data-show-on="desktop"] a')
.nth(1)
).toHaveAttribute('href', 'https://wordpress.org');

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

await expect(
page.locator(
'.hfg_footer .footer--row[data-show-on="mobile"] a:first-child'
)
page.locator('.hfg_footer .footer--row[data-show-on="mobile"] a').nth(0)
).toHaveAttribute('href', 'https://themeisle.com/themes/neve/');
await expect(
page.locator(
'.hfg_footer .footer--row[data-show-on="mobile"] a:nth-child[1]'
)
page.locator('.hfg_footer .footer--row[data-show-on="mobile"] a').nth(1)
).toHaveAttribute('href', 'https://wordpress.org');
});

0 comments on commit d8e247f

Please sign in to comment.