Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create access code e2e tests #1102

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();
});
});
Loading