code: tsx,nextjs,levelsclient (1 files)

This commit is contained in:
2025-12-26 02:28:59 +00:00
parent 9dd4a3d9fa
commit 07019fd9b6

View File

@@ -4,11 +4,11 @@ import LevelsClient from './LevelsClient'
describe('LevelsClient', () => {
it('renders permission levels and promotes to the next tier', () => {
render(<LevelsClient />)
expect(screen.getByText(/Level 1 · Guest/)).toBeInTheDocument()
expect(screen.getByText(/Level 1 · Public/)).toBeInTheDocument()
const promoteButton = screen.getByRole('button', { name: /Promote to/ })
fireEvent.click(promoteButton)
expect(screen.getByText(/Upgraded to Regular User/)).toBeInTheDocument()
expect(screen.getByText(/Upgraded to User/)).toBeInTheDocument()
})
})