Return test isolation

This commit is contained in:
ShootingStar91
2024-07-13 16:36:25 +03:00
parent e9188838a9
commit d03f3ae07a
4 changed files with 8 additions and 13 deletions
-1
View File
@@ -6,7 +6,6 @@ module.exports = defineConfig({
// implement node event listeners here
},
baseUrl: 'http://localhost:5173/',
testIsolation: false,
},
viewportHeight: 900,
viewportWidth: 1200,
+1 -5
View File
@@ -1,12 +1,8 @@
describe('Open each page, table view and detail view, and check at least some correct text appears', () => {
before('Login as admin, directs to front page', () => {
cy.session("logged-as-admin", () => {})
beforeEach('Login as admin', () => {
cy.login('testSu')
})
beforeEach(() => {
cy.visit('/')
})
it('Locality works', () => {
cy.contains('Localities').click()
cy.contains('Dmanisi')
+2 -2
View File
@@ -36,7 +36,7 @@ describe('Test individual features across the app', () => {
cy.contains('Reference type')
})
describe('Staging mode works for the data types that require it', () => {
before('Login as admin', () => {
beforeEach('Login as admin', () => {
cy.login('testSu')
})
it('Staging mode works on locality', () => {
@@ -59,7 +59,7 @@ describe('Test individual features across the app', () => {
})
// TODO remove the skips once onWrite's has been added to all
describe('Staging mode does not appear for the data types that dont require it', () => {
before('Login as admin', () => {
beforeEach('Login as admin', () => {
cy.login('testSu')
})
it('Staging mode does not appear on reference', () => {
+5 -5
View File
@@ -1,7 +1,7 @@
describe('Broadly test what different user rights see', () => {
describe('Admin visibility', () => {
before('Login as admin', () => {
beforeEach('Login as admin', () => {
cy.session('admin-session', () => {})
cy.login('testSu')
})
@@ -37,7 +37,7 @@ describe('Broadly test what different user rights see', () => {
})
})
describe('Test unlogged visibility', () => {
before('Ensure logout', () => {
beforeEach('Ensure logout', () => {
cy.clearAllLocalStorage()
cy.visit('/')
cy.contains('Guest user')
@@ -49,9 +49,9 @@ describe('Broadly test what different user rights see', () => {
cy.contains('Time Bound').should('not.exist')
})
it('Direct routes to protected views do not work', () => {
cy.pageForbidden('region')
cy.pageForbidden('time-bound')
cy.pageForbidden('project')
cy.pageForbidden('/region')
cy.pageForbidden('/time-bound')
cy.pageForbidden('/project')
})
})
})