mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-04-26 07:05:32 +00:00
- Increase GitHub Actions E2E timeout from 20 to 25 minutes - Reduce CYPRESS_DEFAULT_COMMAND_TIMEOUT from 60s to 30s for faster failures - Replace hard-coded waits with proper API intercepts for better reliability: - Add @createTask intercept for task creation (task.spec.ts) - Add @createBucket intercept for bucket creation (kanban.spec.ts) - Reduce unnecessary 1000ms wait to 500ms in logout test - Improve test performance while maintaining stability 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
47 lines
1.1 KiB
TypeScript
47 lines
1.1 KiB
TypeScript
import {createFakeUserAndLogin} from '../../support/authenticateUser'
|
|
import {createProjects} from '../project/prepareProjects'
|
|
|
|
function logout() {
|
|
cy.get('.navbar .username-dropdown-trigger')
|
|
.click()
|
|
cy.get('.navbar .dropdown-item')
|
|
.contains('Logout')
|
|
.click()
|
|
}
|
|
|
|
describe('Log out', () => {
|
|
createFakeUserAndLogin()
|
|
|
|
it('Logs the user out', () => {
|
|
cy.visit('/')
|
|
|
|
expect(localStorage.getItem('token')).to.not.eq(null)
|
|
|
|
logout()
|
|
|
|
cy.url()
|
|
.should('contain', '/login')
|
|
.then(() => {
|
|
expect(localStorage.getItem('token')).to.eq(null)
|
|
})
|
|
})
|
|
|
|
it.skip('Should clear the project history after logging the user out', () => {
|
|
const projects = createProjects()
|
|
cy.visit(`/projects/${projects[0].id}`)
|
|
.then(() => {
|
|
expect(localStorage.getItem('projectHistory')).to.not.eq(null)
|
|
})
|
|
|
|
logout()
|
|
|
|
cy.wait(500) // This makes re-loading of the project and associated entities (and the resulting error) visible
|
|
|
|
cy.url()
|
|
.should('contain', '/login')
|
|
.then(() => {
|
|
expect(localStorage.getItem('projectHistory')).to.eq(null)
|
|
})
|
|
})
|
|
})
|