features: notifications fix + tests fix + menu/router fixes

This commit is contained in:
Jean-Baptiste Pasquier
2021-01-22 14:21:25 +01:00
parent bc64019b63
commit b541d9e6d7
36 changed files with 561 additions and 529 deletions

View File

@ -16,9 +16,9 @@ context('Create Channel Browser Testing', () => {
description = 'Test Description ',
subtitle = 'Test Subtitle ';
it('should visit the channel creation screen', () => {
cy.visit('/admin/admin-circle-create');
cy.visit('/admin-circles-create');
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin/admin-circle-create');
expect(loc.pathname).to.eq('/admin-circles-create');
});
});
it('should enter correct channel data', () => {
@ -26,20 +26,20 @@ context('Create Channel Browser Testing', () => {
channelName += num;
description += num;
subtitle += num;
cy.get('#admin-circle-create input[name="name"]').clear().type(channelName);
cy.get('#admin-circle-create input[name="name"]').should('have.value', channelName);
cy.get('#admin-circle-create input[name="subtitle"]').clear().type(subtitle);
cy.get('#admin-circle-create input[name="subtitle"]').should('have.value', subtitle);
cy.get('#admin-circle-create [name="description"] [contenteditable="true"]').clear().type(description);
cy.get('#admin-circle-create [name="description"] [contenteditable="true"]').should('have.value', description);
cy.get('#admin-circles-create input[name="name"]').clear().type(channelName);
cy.get('#admin-circles-create input[name="name"]').should('have.value', channelName);
cy.get('#admin-circles-create input[name="subtitle"]').clear().type(subtitle);
cy.get('#admin-circles-create input[name="subtitle"]').should('have.value', subtitle);
cy.get('#admin-circles-create [name="description"] [contenteditable="true"]').clear().type(description);
cy.get('#admin-circles-create [name="description"] [contenteditable="true"]').should('have.value', description);
});
});
it('should click on create channel button', () => {
cy.get('#admin-circle-create input[type="submit"]').click();
cy.get('#admin-circles-create input[type="submit"]').click();
});
it('should land on channels list screen', () => {
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin');
expect(loc.pathname).to.eq('/admin-circles');
});
});
it('should land newly created channel on channels list screen', () => {
@ -54,9 +54,9 @@ context('Create Channel Browser Testing', () => {
description = 'Test Description ',
subtitle = 'Test Subtitle ';
it('should visit the channel creation screen', () => {
cy.visit('/admin/admin-circle-create');
cy.visit('/admin-circles-create');
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin/admin-circle-create');
expect(loc.pathname).to.eq('/admin-circles-create');
});
});
it('should enter correct channel data', () => {
@ -64,20 +64,20 @@ context('Create Channel Browser Testing', () => {
channelName += num;
description += num;
subtitle += num;
cy.get('#admin-circle-create input[name="name"]').clear().type(channelName);
cy.get('#admin-circle-create input[name="name"]').should('have.value', channelName);
cy.get('#admin-circle-create input[name="subtitle"]').clear().type(subtitle);
cy.get('#admin-circle-create input[name="subtitle"]').should('have.value', subtitle);
cy.get('#admin-circle-create [name="description"] [contenteditable="true"]').clear().type(description);
cy.get('#admin-circle-create [name="description"] [contenteditable="true"]').should('have.value', description);
cy.get('#admin-circles-create input[name="name"]').clear().type(channelName);
cy.get('#admin-circles-create input[name="name"]').should('have.value', channelName);
cy.get('#admin-circles-create input[name="subtitle"]').clear().type(subtitle);
cy.get('#admin-circles-create input[name="subtitle"]').should('have.value', subtitle);
cy.get('#admin-circles-create [name="description"] [contenteditable="true"]').clear().type(description);
cy.get('#admin-circles-create [name="description"] [contenteditable="true"]').should('have.value', description);
});
});
it('should click on create channel button', () => {
cy.get('#admin-circle-create input[type="submit"]').click();
cy.get('#admin-circles-create input[type="submit"]').click();
});
it('should land on channels list screen', () => {
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin');
expect(loc.pathname).to.eq('/admin-circles');
});
});
it('should land newly created channel on channels list screen', () => {
@ -92,9 +92,9 @@ context('Create Channel Browser Testing', () => {
description = 'Test Description ',
subtitle = 'Test Subtitle ';
it('should visit the channel creation screen', () => {
cy.visit('/admin/admin-circle-create');
cy.visit('/admin-circles-create');
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin/admin-circle-create');
expect(loc.pathname).to.eq('/admin-circles-create');
});
});
it('should enter correct channel data', () => {
@ -102,20 +102,20 @@ context('Create Channel Browser Testing', () => {
channelName += num;
description += num;
subtitle += num;
cy.get('#admin-circle-create input[name="name"]').clear().type(channelName);
cy.get('#admin-circle-create input[name="name"]').should('have.value', channelName);
cy.get('#admin-circle-create input[name="subtitle"]').clear().type(subtitle);
cy.get('#admin-circle-create input[name="subtitle"]').should('have.value', subtitle);
cy.get('#admin-circle-create [name="description"] [contenteditable="true"]').clear().type(description);
cy.get('#admin-circle-create [name="description"] [contenteditable="true"]').should('have.value', description);
cy.get('#admin-circles-create input[name="name"]').clear().type(channelName);
cy.get('#admin-circles-create input[name="name"]').should('have.value', channelName);
cy.get('#admin-circles-create input[name="subtitle"]').clear().type(subtitle);
cy.get('#admin-circles-create input[name="subtitle"]').should('have.value', subtitle);
cy.get('#admin-circles-create [name="description"] [contenteditable="true"]').clear().type(description);
cy.get('#admin-circles-create [name="description"] [contenteditable="true"]').should('have.value', description);
});
});
it('should click on create channel button', () => {
cy.get('#admin-circle-create input[type="submit"]').click();
cy.get('#admin-circles-create input[type="submit"]').click();
});
it('should land on channels list screen', () => {
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin');
expect(loc.pathname).to.eq('/admin-circles');
});
});
it('should land newly created channel on channels list screen', () => {

View File

@ -16,9 +16,9 @@ context('Create Project Browser Testing', () => {
customerName = 'Test Customer ',
description = 'Test Description ';
it('should visit the project creation screen', () => {
cy.visit('/admin/admin-projects/admin-project-create');
cy.visit('/admin-projects-create');
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin/admin-projects/admin-project-create');
expect(loc.pathname).to.eq('/admin-projects-create');
});
});
it('should enter correct project data', () => {
@ -26,20 +26,20 @@ context('Create Project Browser Testing', () => {
projectName += num;
customerName += num;
description += num;
cy.get('#admin-project-create input[name="customer.name"]').clear().type(customerName);
cy.get('#admin-project-create input[name="customer.name"]').should('have.value', customerName);
cy.get('#admin-project-create input[name="name"]').clear().type(projectName);
cy.get('#admin-project-create input[name="name"]').should('have.value', projectName);
cy.get('#admin-project-create [name="description"] [contenteditable="true"]').clear().type(description);
cy.get('#admin-project-create [name="description"] [contenteditable="true"]').should('have.value', description);
cy.get('#admin-projects-create input[name="customer.name"]').clear().type(customerName);
cy.get('#admin-projects-create input[name="customer.name"]').should('have.value', customerName);
cy.get('#admin-projects-create input[name="name"]').clear().type(projectName);
cy.get('#admin-projects-create input[name="name"]').should('have.value', projectName);
cy.get('#admin-projects-create [name="description"] [contenteditable="true"]').clear().type(description);
cy.get('#admin-projects-create [name="description"] [contenteditable="true"]').should('have.value', description);
});
});
it('should click on create project button', () => {
cy.get('#admin-project-create input[type="submit"]').click();
cy.get('#admin-projects-create input[type="submit"]').click();
});
it('should land on projects list screen', () => {
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin/admin-projects');
expect(loc.pathname).to.eq('/admin-projects');
});
});
it('should land newly created project on projects list screen', () => {
@ -54,9 +54,9 @@ context('Create Project Browser Testing', () => {
customerName = 'Test Customer ',
description = 'Test Description ';
it('should visit the project creation screen', () => {
cy.visit('/admin/admin-projects/admin-project-create');
cy.visit('/admin-projects-create');
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin/admin-projects/admin-project-create');
expect(loc.pathname).to.eq('/admin-projects-create');
});
});
it('should enter correct project data', () => {
@ -64,20 +64,20 @@ context('Create Project Browser Testing', () => {
projectName += num;
customerName += num;
description += num;
cy.get('#admin-project-create input[name="customer.name"]').clear().type(customerName);
cy.get('#admin-project-create input[name="customer.name"]').should('have.value', customerName);
cy.get('#admin-project-create input[name="name"]').clear().type(projectName);
cy.get('#admin-project-create input[name="name"]').should('have.value', projectName);
cy.get('#admin-project-create [name="description"] [contenteditable="true"]').clear().type(description);
cy.get('#admin-project-create [name="description"] [contenteditable="true"]').should('have.value', description);
cy.get('#admin-projects-create input[name="customer.name"]').clear().type(customerName);
cy.get('#admin-projects-create input[name="customer.name"]').should('have.value', customerName);
cy.get('#admin-projects-create input[name="name"]').clear().type(projectName);
cy.get('#admin-projects-create input[name="name"]').should('have.value', projectName);
cy.get('#admin-projects-create [name="description"] [contenteditable="true"]').clear().type(description);
cy.get('#admin-projects-create [name="description"] [contenteditable="true"]').should('have.value', description);
});
});
it('should click on create project button', () => {
cy.get('#admin-project-create input[type="submit"]').click();
cy.get('#admin-projects-create input[type="submit"]').click();
});
it('should land on projects list screen', () => {
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin/admin-projects');
expect(loc.pathname).to.eq('/admin-projects');
});
});
it('should land newly created project on projects list screen', () => {

View File

@ -25,9 +25,9 @@
// it('should login', () => cy.login());
// describe('User Creation process', () => {
// it('should visit the user creation screen', () => {
// cy.visit('/admin/admin-users/admin-users-create');
// cy.visit('/admin-users-create');
// cy.location().should((loc) => {
// expect(loc.pathname).to.eq('/admin/admin-users/admin-users-create');
// expect(loc.pathname).to.eq('/admin-users-create');
// });
// });
// it('should enter correct user data', () => {
@ -45,7 +45,7 @@
// });
// it('should land on users list screen', () => {
// cy.location().should((loc) => {
// expect(loc.pathname).to.eq('/admin/admin-users');
// expect(loc.pathname).to.eq('/admin-users');
// });
// });
// it('should land newly created user on users list screen', () => {

View File

@ -24,9 +24,9 @@ context('Delete Channel Browser Testing', () => {
describe('Channel Retirement process', () => {
let channelsLength;
it('should visit the channels list screen', () => {
cy.visit('/admin');
cy.visit('/admin-circles');
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin');
expect(loc.pathname).to.eq('/admin-circles');
});
});
it('should visit the last channel edit screen', () => {

View File

@ -24,9 +24,9 @@ context('Edit Channel Browser Testing', () => {
it('should login', () => cy.login());
describe('Channel Edition process', () => {
it('should visit the channel list screen', () => {
cy.visit('/admin');
cy.visit('/admin-circles');
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin');
expect(loc.pathname).to.eq('/admin-circles');
});
});
it('should visit the last channel edit screen', () => {

View File

@ -26,9 +26,9 @@ context('Edit Project Browser Testing', () => {
it('should login', () => cy.login());
describe('Project Edition process', () => {
it('should visit the project list screen', () => {
cy.visit('/admin/admin-projects');
cy.visit('/admin-projects');
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin/admin-projects');
expect(loc.pathname).to.eq('/admin-projects');
});
});
it('should visit the last project edit screen', () => {

View File

@ -24,9 +24,9 @@ context('Leave Channel Browser Testing', () => {
it('should login', () => cy.login());
describe('Channel Leaving process', () => {
it('should visit the channels list screen', () => {
cy.visit('/admin');
cy.visit('/admin-circles');
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin');
expect(loc.pathname).to.eq('/admin-circles');
});
});
it('should click the last channel leave button', () => {

View File

@ -24,9 +24,9 @@ context('Leave Project Browser Testing', () => {
it('should login', () => cy.login());
describe('Project Leaving process', () => {
it('should visit the projects list screen', () => {
cy.visit('/admin/admin-projects');
cy.visit('/admin-projects');
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin/admin-projects');
expect(loc.pathname).to.eq('/admin-projects');
});
});
it('should click the last project leave button', () => {

View File

@ -24,9 +24,9 @@ context('Retire Channel Browser Testing', () => {
describe('Channel Retirement process', () => {
let channelsLength;
it('should visit the channels list screen', () => {
cy.visit('/admin');
cy.visit('/admin-circles');
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin');
expect(loc.pathname).to.eq('/admin-circles');
});
});
it('should visit the last channel edit screen', () => {

View File

@ -24,9 +24,9 @@ context('Retire Project Browser Testing', () => {
describe('Project Retirement process', () => {
let projectsLength;
it('should visit the projects list screen', () => {
cy.visit('/admin/admin-projects');
cy.visit('/admin-projects');
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin/admin-projects');
expect(loc.pathname).to.eq('/admin-projects');
});
});
it('should visit the last project edit screen', () => {

View File

@ -58,12 +58,12 @@ context('Browser testing', () => {
// it('should navigate the Administration from left menu', () => {
// cy.get('.create > solid-link').click();
// cy.get('#admin-circles > .content-box > .content-box__header > .without-margin').contains('Administration');
// cy.get('#admin-circle-list > .content-box__info > .admin-header > .admin-header__title').contains('Circles');
// cy.get('#admin-circles > .content-box__info > .admin-header > .admin-header__title').contains('Circles');
// });
// it('should navigate to Circle creation', () => {
// cy.get('#admin-circle-list > .content-box__info > .admin-header > .button').click();
// cy.get('#admin-circles > .content-box__info > .admin-header > .button').click();
// cy.location().should((loc) => {
// expect(loc.pathname).to.contain('admin-circle-create');
// expect(loc.pathname).to.contain('admin-circles-create');
// });
// });
// var name = new Uint32Array(1);
@ -72,8 +72,8 @@ context('Browser testing', () => {
// it('should allow Circle Creation', () => {
// cy.get('form > solid-form-label-text[name="name"] > label > input').type(name);
// cy.get('.content-box__info > solid-form > form > solid-form-label-text[name="description"] > label > input').type('With a great description!');
// cy.get('#admin-circle-create > .content-box__info > solid-form > form > [type="submit"]').click();
// cy.get('#admin-circle-list > div > div.table > solid-display').contains(name);
// cy.get('#admin-circles-create > .content-box__info > solid-form > form > [type="submit"]').click();
// cy.get('#admin-circles > div > div.table > solid-display').contains(name);
// });
// it('should open the circle information page', () => {
// cy.screenshot();