cy: no more naviagte

This commit is contained in:
Jean-Baptiste Pasquier
2020-09-17 13:08:44 +02:00
parent 9a0beef4fb
commit 4ab6ab9764
16 changed files with 133 additions and 32 deletions

View File

@ -22,7 +22,12 @@ context('Create User Browser Testing', () => {
it('should visit user login screen', () => cy.userLogin());
it('should login', () => cy.login());
describe('User Creation process', () => {
it('should visit the user creation screen', () => cy.naviagte('/admin/admin-users/admin-users-create'));
it('should visit the user creation screen', () => {
cy.visit('/admin/admin-users/admin-users-create');
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin/admin-users/admin-users-create');
});
});
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);