Skip to content
Snippets Groups Projects

E2e testing on staging

Compare and
23 files
+ 3234
12
Compare changes
  • Side-by-side
  • Inline

Files

import 'cypress-axe'
describe("Teacher", () => {
beforeEach(() => {
cy.loginViaUi({username: 'cseteacher1', password: 'cseteacher1'})
})
it('Home page', () => {
cy.visit('/')
cy.injectAxe()
cy.checkA11y()
})
context("Edition page", () => {
['', '/participants', '/modules', '/labs', '/status', '/questions'].forEach((ext) => {
it(ext + ' page should exist', () => {
cy.visit('/edition/2' + ext)
cy.injectAxe()
cy.checkA11y()
})
})
})
context("Sessions", () => {
["REGULAR", "SLOTTED", "EXAM", "CAPACITY"].forEach((type) => {
it("Create a " + type +" session", () => {
cy.visit("/edition/2/lab/create?type=" + type)
cy.get("form").within(() => {
cy.get("button").should("exist")
})
cy.injectAxe()
cy.checkA11y()
})
})
})
it('Request page', () => {
cy.visit('/requests')
cy.injectAxe()
cy.checkA11y()
})
})
Loading