Skip to content

Commit

Permalink
The URL attribute should be asserted via the toHaveAttribute locator …
Browse files Browse the repository at this point in the history
…assertion so that it's properly awaited
  • Loading branch information
carstingaxion committed Sep 27, 2024
1 parent 08d3b13 commit 9719773
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/e2e/tests/wp-admin/settings.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ test.describe('Settings', () => {
const settingsMenu = menu.getByRole('link', {
name: 'Settings',
});
const settingsMenuUrl = await settingsMenu.getAttribute('href');

await expect(settingsMenu).toBeVisible();
await expect(settingsMenuUrl).toContain(
'admin.php?page=gatherpress_general'
await expect(settingsMenu).toHaveAttribute(
'href',
/admin\.php\?page=gatherpress_general/
);
});
});

0 comments on commit 9719773

Please sign in to comment.