-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1107 from chaynHQ/develop
Merge Develop onto Main
- Loading branch information
Showing
6 changed files
with
109 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
describe('Admin dashboard page should display', () => { | ||
const superAdminEmail = Cypress.env('CYPRESS_SUPER_ADMIN_EMAIL') as string; | ||
const superAdminPassword = Cypress.env('CYPRESS_SUPER_ADMIN_PASSWORD'); | ||
const adminDashboardUrl = '/admin/dashboard'; | ||
|
||
before(() => { | ||
cy.cleanUpTestState(); | ||
cy.logInWithEmailAndPassword(superAdminEmail, superAdminPassword); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.visit(adminDashboardUrl); | ||
}); | ||
|
||
it('header section', () => { | ||
cy.get('h2').should('contain', 'Superadmin dashboard'); | ||
}); | ||
|
||
it('create an admin account panel', () => { | ||
cy.get('h2').should('contain', 'Create an admin account'); | ||
cy.get('p').should('contain', 'Admin accounts are able to generate therapy codes'); | ||
|
||
cy.get('label.Mui-required').contains('Select the partner'); | ||
cy.get('input[name="selectPartner"]').should('exist'); | ||
|
||
cy.get('label.Mui-required').contains('Email address'); | ||
cy.get('input[id="email"]').should('exist'); | ||
|
||
cy.get('label.Mui-required').contains('Name'); | ||
cy.get('input[id="name"]').should('exist'); | ||
|
||
cy.get('button').contains('Create an admin account'); | ||
}); | ||
|
||
it('update therapy sessions panel', () => { | ||
cy.get('h2').should('contain', 'Update therapy sessions'); | ||
|
||
cy.get('label').contains(`Type a user's email address`); | ||
cy.get('input[id="user-email-address-search"]').should('exist'); | ||
|
||
cy.get('button').contains('Update therapy sessions'); | ||
}); | ||
|
||
it('update partner admin panel', () => { | ||
cy.get('h2').should('contain', 'Update partner admin'); | ||
|
||
cy.get('label').contains('Type at least 4 letters'); | ||
cy.get('input[id="partnerAdmin"]').should('exist'); | ||
|
||
cy.get('button').contains('Update partner admin'); | ||
}); | ||
|
||
after(() => { | ||
cy.logout(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters