Skip to content

Commit

Permalink
Add create access code badoo tests (#1102)
Browse files Browse the repository at this point in the history
  • Loading branch information
boodland authored Aug 28, 2024
1 parent e0e2f97 commit 92bec76
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions cypress/integration/tests/create-access-code.badoo.cy.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
describe('Create access code page should display', () => {
const badooEmail = Cypress.env('CYPRESS_BADOO_PARTNER_ADMIN_EMAIL') as string;
const badooPassword = Cypress.env('CYPRESS_BADOO_PARTNER_ADMIN_PASSWORD');

before(() => {
cy.cleanUpTestState();
cy.logInWithEmailAndPassword(badooEmail, badooPassword);
});

beforeEach(() => {
cy.visit('/partner-admin/create-access-code');
});

it('header section', () => {
cy.get('h2').should('contain', 'Create access codes');
cy.checkImage('Badoo logo', 'badoo_logo');
});

it('Create access codes panel', () => {
cy.get('h2').should('contain', 'Create access codes');
cy.get('p').should(
'contain',
'Use this form to create an access code every time you want to give someone access to Bloom.',
);

cy.get('legend').contains('Select support type offered to this user');
cy.get('input')
.should('exist')
.should('have.prop', 'type', 'radio')
.should('have.value', 'therapy')
.parents('label')
.contains('Courses, 1:1 chat and six therapy sessions');

cy.get('button').contains('Create access codes').should('have.prop', 'type', 'submit');
});

after(() => {
cy.logout();
});
});

0 comments on commit 92bec76

Please sign in to comment.