Skip to content

Commit

Permalink
Merge pull request #719 from DFE-Digital/Auto-A2B-Stuff
Browse files Browse the repository at this point in the history
Auto a2b stuff
  • Loading branch information
dangood84 authored Nov 14, 2024
2 parents 9a59695 + 1fbe367 commit dd4999f
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import login from '../page-objects/pages/login'

describe('Check accessibility of all A2B pages', function () {
beforeEach(() => {
cy.visit(Cypress.env('url'))
cy.visit(Cypress.env('URL'))

home.start()

Expand All @@ -13,7 +13,7 @@ describe('Check accessibility of all A2B pages', function () {

it('Checks accessibility', function () {
paths.forEach((link) => {
cy.visit(Cypress.env('url') + link)
cy.visit(Cypress.env('URL') + link)
cy.excuteAccessibilityTests()
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('Create a FAM application', () => {
const trustOpeningYear = `${new Date().getFullYear() + 1}`

beforeEach(function () {
cy.visit(Cypress.env('url'))
cy.visit(Cypress.env('URL'))

cookieHeaderModal.acceptAnalyticsCookies()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('Create a JAM application', () => {
const chairEmail = faker.internet.email()

beforeEach(function () {
cy.visit(Cypress.env('url'))
cy.visit(Cypress.env('URL'))

cookieHeaderModal.acceptAnalyticsCookies()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import confirmApplicationDelete from '../page-objects/pages/confirmApplicationDe

describe('Delete application', () => {
beforeEach(function () {
cy.visit(Cypress.env('url'))
cy.visit(Cypress.env('URL'))

cookieHeaderModal.acceptAnalyticsCookies()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Invite/remove contributor', () => {
const applicationId = '10280'

beforeEach(function () {
cy.visit(Cypress.env('url'))
cy.visit(Cypress.env('URL'))

cookieHeaderModal.acceptAnalyticsCookies()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class Login {
public login(): this {
const username = Cypress.env('loginUsername')
const password = Cypress.env('loginPassword')
const username = Cypress.env('LOGIN_USERNAME')
const password = Cypress.env('LOGIN_PASSWORD')
const args = { username, password }
const signinUrl = Cypress.env('signinUrl')
const signinUrl = Cypress.env('SIGNIN_URL')
cy.origin(signinUrl, { args }, (args) => {
cy.get('#username').type(args.username)
cy.get('button[type="submit"]').click()
Expand Down
4 changes: 2 additions & 2 deletions Dfe.Academies.External.Web/CypressTests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "Cypress tests for the core journeys of the A2B service",
"main": "index.js",
"scripts": {
"cy:open": "cypress open",
"cy:run": "cypress run",
"cy:open": "cypress open --env URL=$URL,LOGIN_USERNAME=$LOGIN_USERNAME,LOGIN_PASSWORD=$LOGIN_PASSWORD,SIGNIN_URL=$SIGNIN_URL",
"cy:run": "cypress run --env URL=$URL,LOGIN_USERNAME=$LOGIN_USERNAME,LOGIN_PASSWORD=$LOGIN_PASSWORD,SIGNIN_URL=$SIGNIN_URL",
"lint": "eslint ."
},
"keywords": [
Expand Down

0 comments on commit dd4999f

Please sign in to comment.