Skip to content

Commit 5bdbdf8

Browse files
authored
Merge pull request #992 from Wikid82/renovate/non-major-updates
chore(deps): update non-major-updates
2 parents 7b83b72 + 4eba7d3 commit 5bdbdf8

6 files changed

Lines changed: 56 additions & 33 deletions

File tree

frontend/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"eslint-plugin-testing-library": "^7.16.2",
8989
"eslint-plugin-unicorn": "^64.0.0",
9090
"eslint-plugin-unused-imports": "^4.4.1",
91-
"jsdom": "29.1.0",
91+
"jsdom": "29.1.1",
9292
"knip": "^6.9.0",
9393
"postcss": "^8.5.12",
9494
"tailwindcss": "^4.2.4",

frontend/src/pages/__tests__/UsersPage.test.tsx

Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -522,20 +522,27 @@ describe('UsersPage', () => {
522522
const user = userEvent.setup()
523523
expect(await screen.findByText('Invite User')).toBeInTheDocument()
524524
await user.click(screen.getByRole('button', { name: /Invite User/i }))
525+
expect(await screen.findByPlaceholderText('user@example.com')).toBeInTheDocument()
525526

526-
const emailInput = screen.getByPlaceholderText('user@example.com')
527-
await user.type(emailInput, 'test@example.com')
527+
vi.useFakeTimers()
528+
529+
try {
530+
const emailInput = screen.getByPlaceholderText('user@example.com')
531+
fireEvent.change(emailInput, { target: { value: 'test@example.com' } })
532+
533+
await act(async () => {
534+
await vi.advanceTimersByTimeAsync(550)
535+
})
528536

529-
await waitFor(() => {
530537
expect(client.post).toHaveBeenCalledWith('/users/preview-invite-url', { email: 'test@example.com' })
531-
}, { timeout: 2000 })
532538

533-
await waitFor(() => {
534539
const preview = screen.getByText('https://example.com/accept-invite?token=...')
535-
536540
expect(preview.textContent).toContain('...')
537541
expect(preview.textContent).not.toContain('SAMPLE_TOKEN_PREVIEW')
538-
}, { timeout: 2000 })
542+
}
543+
finally {
544+
vi.useRealTimers()
545+
}
539546
})
540547

541548
it('shows warning when not configured', async () => {
@@ -556,18 +563,24 @@ describe('UsersPage', () => {
556563
expect(await screen.findByText('Invite User')).toBeInTheDocument()
557564
await user.click(screen.getByRole('button', { name: /Invite User/i }))
558565

559-
const emailInput = screen.getByPlaceholderText('user@example.com')
560-
await user.type(emailInput, 'test@example.com')
566+
vi.useFakeTimers()
567+
568+
try {
569+
const emailInput = screen.getByPlaceholderText('user@example.com')
570+
fireEvent.change(emailInput, { target: { value: 'test@example.com' } })
571+
572+
await act(async () => {
573+
await vi.advanceTimersByTimeAsync(550)
574+
})
561575

562-
await waitFor(() => {
563576
expect(client.post).toHaveBeenCalledWith('/users/preview-invite-url', { email: 'test@example.com' })
564-
}, { timeout: 2000 })
565577

566-
await waitFor(() => {
567578
// Look for link to system settings
568579
const link = screen.getByRole('link')
569580
expect(link.getAttribute('href')).toContain('/settings/system')
570-
}, { timeout: 2000 })
581+
} finally {
582+
vi.useRealTimers()
583+
}
571584
})
572585

573586
it('does not show preview when email is invalid', async () => {
@@ -599,17 +612,27 @@ describe('UsersPage', () => {
599612
const user = userEvent.setup()
600613
expect(await screen.findByText('Invite User')).toBeInTheDocument()
601614
await user.click(screen.getByRole('button', { name: /Invite User/i }))
615+
expect(await screen.findByPlaceholderText('user@example.com')).toBeInTheDocument()
602616

603-
const emailInput = screen.getByPlaceholderText('user@example.com')
604-
await user.type(emailInput, 'test@example.com')
617+
vi.useFakeTimers()
618+
619+
try {
620+
const emailInput = screen.getByPlaceholderText('user@example.com')
621+
fireEvent.change(emailInput, { target: { value: 'test@example.com' } })
622+
623+
await act(async () => {
624+
await vi.advanceTimersByTimeAsync(550)
625+
})
605626

606-
await waitFor(() => {
607627
expect(client.post).toHaveBeenCalledWith('/users/preview-invite-url', { email: 'test@example.com' })
608-
}, { timeout: 2000 })
609628

610-
// Verify preview is not displayed after error
611-
const previewQuery = screen.queryByText(/accept-invite/)
612-
expect(previewQuery).toBeNull()
629+
// Verify preview is not displayed after error
630+
const previewQuery = screen.queryByText(/accept-invite/)
631+
expect(previewQuery).toBeNull()
632+
}
633+
finally {
634+
vi.useRealTimers()
635+
}
613636
})
614637
})
615638

lefthook.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ pre-commit:
9898
# Remove overrides when plugins declare ESLint v10 support natively.
9999
frontend-type-check:
100100
glob: "frontend/**/*.{ts,tsx}"
101-
run: cd frontend && npx tsc --noEmit
101+
run: cd frontend && /usr/share/nodejs/corepack/shims/npx tsc --noEmit
102102

103103
frontend-lint:
104104
glob: "frontend/**/*.{ts,tsx,js,jsx}"
105-
run: cd frontend && npm run lint
105+
run: cd frontend && /usr/share/nodejs/corepack/shims/npm run lint
106106

107107
semgrep:
108108
glob: "{**/*.{go,ts,tsx,js,jsx,sh,yml,yaml,json},Dockerfile*}"

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"smol-toml": "^1.6.1"
1919
},
2020
"devDependencies": {
21-
"@axe-core/playwright": "^4.11.2",
21+
"@axe-core/playwright": "^4.11.3",
2222
"@bgotink/playwright-coverage": "^0.3.2",
2323
"@playwright/test": "^1.59.1",
2424
"@types/eslint-plugin-jsx-a11y": "^6.10.1",

0 commit comments

Comments
 (0)