Skip to content

Commit 59c691c

Browse files
committed
No need to check language pack as benefit plan has been renamed
1 parent 5745d18 commit 59c691c

4 files changed

Lines changed: 7 additions & 13 deletions

File tree

cypress/e2e/admin.cy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getProgramTerm, capitalizeWords } from '../support/utils';
1+
import { capitalizeWords } from '../support/utils';
22

33
const path = require('path');
44

@@ -50,7 +50,7 @@ describe('Django admin workflows', () => {
5050
'Tasks Management',
5151
'Administration',
5252
]
53-
const programMenuText = capitalizeWords(getProgramTerm()) + 's'
53+
const programMenuText = 'programmes'
5454
const expectedSubMenuItems = [
5555
'Individuals',
5656
'Groups',

cypress/e2e/cash-transfer.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getProgramTerm, getTimestamp } from '../support/utils';
1+
import { getTimestamp } from '../support/utils';
22

33
describe('Cash transfer program creation workflows', () => {
44
let testProgramNames = [];

cypress/support/commands.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { getProgramTerm } from '../support/utils';
2-
31
const getTodayFormatted = () => {
42
const today = new Date();
53
const day = String(today.getDate()).padStart(2, '0');
@@ -216,8 +214,8 @@ Cypress.Commands.add('deleteProgram', (programName) => {
216214

217215
cy.get('ul.MuiList-root li')
218216
.first()
219-
.should('contain', `Delete ${getProgramTerm()}`);
220-
// .should('contain', `Delete ${getProgramTerm()} ${programName}`); //TODO: switch to this after fix
217+
.should('contain', 'Delete program');
218+
// .should('contain', `Delete program ${programName}`); //TODO: switch to this after fix
221219

222220
// Close journal drawer
223221
cy.get('.MuiDrawer-paperAnchorRight button')
@@ -269,7 +267,7 @@ Cypress.Commands.add('createProgram', (programCode, programName, maxBeneficiarie
269267

270268
// Check last journal message
271269
cy.get('ul.MuiList-root li').first().click()
272-
cy.contains(`Create ${getProgramTerm()}`).should('exist')
270+
cy.contains('Create program').should('exist')
273271
cy.contains('Failed to create').should('not.exist')
274272
})
275273

@@ -290,7 +288,7 @@ Cypress.Commands.add('checkProgramUpdateCompleted', (programName) => {
290288

291289
// Check last journal message
292290
cy.get('ul.MuiList-root li').first().click()
293-
cy.contains(`Update ${getProgramTerm()}`).should('exist')
291+
cy.contains('Update program').should('exist')
294292
cy.contains('Failed to update').should('not.exist')
295293
})
296294

cypress/support/utils.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
export function getProgramTerm() {
2-
return Cypress.env('useSocialProtectionLanguagePack') ? 'programme' : 'benefit plan';
3-
}
4-
51
export function capitalizeWords(str) {
62
return str.replace(/\b\w/g, char => char.toUpperCase());
73
}

0 commit comments

Comments
 (0)