Skip to content

Commit

Permalink
test(core): fix navbar tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanwikner committed Dec 15, 2023
1 parent c6c8640 commit 89456e9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export function StudioNavbar() {
<FreeTrialProvider>
<RootLayer zOffset={100} data-search-open={searchFullscreenOpen}>
<RootCard
data-testid="navbar"
data-testid="studio-navbar"
data-ui="Navbar"
padding={2}
scheme="dark"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export function NewDocumentButton(props: NewDocumentButtonProps) {
const sharedOpenButtonProps: ButtonProps = useMemo(
() => ({
'aria-label': openDialogAriaLabel,
'data-testid': 'new-document-button',
disabled: disabled || loading,
icon: AddIcon,
mode: 'bleed',
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/navbar/createNewDocumentNav.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {test} from '@sanity/test'

test('create new document from menu button', async ({page, baseURL}) => {
await page.goto(baseURL ?? '/test/content')
await page.getByLabel('Create new document').click()
await page.getByTestId('new-document-button').click()
await page.getByTestId('new-document-button-search-input').fill('Author')
const authorLink = await page.getByRole('link', {name: 'Author', exact: true})

Expand Down

0 comments on commit 89456e9

Please sign in to comment.