update: wrapping up and final adjustments to completed test flows

This commit is contained in:
Jure Ursic
2020-07-16 15:50:16 +02:00
parent 564e8d71da
commit c548add236
16 changed files with 607 additions and 114 deletions

View File

@ -20,27 +20,9 @@ context('Create User Browser Testing', () => {
beforeEach(() => cy.restoreLocalStorage());
afterEach(() => cy.saveLocalStorage());
it('should visit user login screen', () => cy.userLogin());
it('should login', () => cy.login());
describe('User Creation process', () => {
it('should login', () => cy.login());
it('should visit the user creation screen', () => cy.naviagte('/admin/admin-users/admin-users-create'));
/*it('should enter incorrect user data', () => {
cy.get('#admin-users-create input[name="first_name"]').type(firstName);
cy.get('#admin-users-create input[name="first_name"]').should('have.value', firstName);
cy.get('#admin-users-create input[name="last_name"]').type(lastName);
cy.get('#admin-users-create input[name="last_name"]').should('have.value', lastName);
cy.get('#admin-users-create input[name="username"]').type('!"#$%&');
cy.get('#admin-users-create input[name="username"]').should('have.value', '!"#$%&');
cy.get('#admin-users-create input[name="email"]').type(email.split('.')[0]);
cy.get('#admin-users-create input[name="email"]').should('have.value', email.split('.')[0]);
});
it('should click on create user button', () => {
cy.get('#admin-users-create input[type="submit"]').click();
});
it('should provide errors about incorrect user data', () => {
// TO-DO: Check for error messages
cy.get('element')
.should('contain.text', 'Error message.');
});*/
it('should enter correct user data', () => {
cy.get('#admin-users-create input[name="first_name"]').clear().type(firstName);
cy.get('#admin-users-create input[name="first_name"]').should('have.value', firstName);