Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"@alphone/plugin-fields": "workspace:*",
"@alphone/plugin-importer": "workspace:*",
"@alphone/plugin-whatsapp": "workspace:*",
"@gopherium/godmin": "0.20.0",
"@gopherium/godmin": "0.22.0",
"@gopherium/gottext": "0.6.0",
"@gopherium/react-auth": "0.12.0",
"@gopherium/react-auth": "0.13.0",
"@tanstack/react-query": "^5.104.3",
"@tanstack/react-router": "^1.170.44",
"@wordpress/i18n": "6.30.0",
Expand Down
6 changes: 2 additions & 4 deletions frontend/src/test/contacts-list.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -686,16 +686,14 @@ test('renames a contact in a modal and confirms it with a toast', async () => {
await waitFor(async () => expect(await shownNames()).toEqual(['Ada Lovelace', 'Maria Perez', 'Zoe Lopez']))
})

test('opens the rename at the default medium width with Cancel as a neutral text button', async () => {
test('opens the rename at the default medium width with Cancel as an accent text button', async () => {
renderAt('/contacts')

await act('Ana Lopez', 'Rename…')

const dialog = await screen.findByRole('dialog', { name: 'Rename' })
expect(dialog).toHaveClass('has-size-medium')
expect([...within(dialog).getByRole('button', { name: 'Cancel' }).classList]).toEqual(
buttonClasses('minimal', undefined, 'neutral'),
)
expect([...within(dialog).getByRole('button', { name: 'Cancel' }).classList]).toEqual(buttonClasses('minimal'))
})

test('puts the cursor in the name when the rename opens, as the WordPress rename does', async () => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/test/public-auth.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ test('a link carrying no token still renders its screen', async () => {
test('the login slot offers the way to a password reset and back', async () => {
renderScreen(<LoginSlot onLogin={vi.fn()} />)

await userEvent.click(await screen.findByRole('button', { name: 'Forgot your password?' }))
await userEvent.click(await screen.findByRole('button', { name: 'Lost your password?' }))

expect(await screen.findByRole('button', { name: 'Send reset link' })).toBeInTheDocument()

Expand Down
4 changes: 1 addition & 3 deletions frontend/src/test/tokens-route.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,7 @@ test('asks before it revokes in a medium modal with no title or close button, as
expect(within(dialog).queryByRole('heading')).not.toBeInTheDocument()
expect(within(dialog).queryByRole('button', { name: 'Close' })).not.toBeInTheDocument()
expect(within(dialog).getByText('Revoke "n8n production"? This cannot be undone.')).toBeInTheDocument()
expect([...within(dialog).getByRole('button', { name: 'Cancel' }).classList]).toEqual(
buttonClasses('minimal', undefined, 'neutral'),
)
expect([...within(dialog).getByRole('button', { name: 'Cancel' }).classList]).toEqual(buttonClasses('minimal'))
})

test('puts the focus on Cancel when the revoke opens, as a WordPress delete does', async () => {
Expand Down
6 changes: 2 additions & 4 deletions frontend/src/test/users-invited.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ test('lists the primary one click action first, as a WordPress row menu does', a
expect(await actionsOf('ana@example.com')).toEqual(['Enable', 'Change role…'])
})

test('opens the resend at the default medium width under its title, with Cancel as a neutral text button', async () => {
test('opens the resend at the default medium width under its title, with Cancel as an accent text button', async () => {
renderAt('/users')
const modal = await openResend()

Expand All @@ -139,9 +139,7 @@ test('opens the resend at the default medium width under its title, with Cancel
expect(
modal.getByText('Send a new invitation to "Maria Perez" (maria@example.com)? The link sent before stops working.'),
).toBeInTheDocument()
expect([...modal.getByRole('button', { name: 'Cancel' }).classList]).toEqual(
buttonClasses('minimal', undefined, 'neutral'),
)
expect([...modal.getByRole('button', { name: 'Cancel' }).classList]).toEqual(buttonClasses('minimal'))
expect(modal.getByRole('button', { name: 'Resend invitation' })).toBeInTheDocument()
})

Expand Down
47 changes: 25 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions sdk/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"./testing": "./testing.tsx"
},
"dependencies": {
"@gopherium/godmin": "0.20.0",
"@gopherium/godmin": "0.22.0",
"@gopherium/gottext": "0.6.0",
"@gopherium/react-auth": "0.12.0",
"@gopherium/react-auth": "0.13.0",
"@tanstack/react-query": "^5.104.3",
"@urql/exchange-graphcache": "9.0.2",
"@urql/exchange-retry": "2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/invitation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ test('a forgotten password is reset from the login screen', async ({ page, brows
const reset = await forgotten.newPage()
await reset.goto('/')

await reset.getByRole('button', { name: 'Forgot your password?' }).click()
await reset.getByRole('button', { name: 'Lost your password?' }).click()
await reset.getByLabel('Email').fill('maria@example.com')
await reset.getByRole('button', { name: 'Send reset link' }).click()
await expect(
Expand Down
Loading