update: wrapping up and final adjustments to completed test flows
This commit is contained in:
cypress
README.md
integration
create-channel.spec.jscreate-job-offer.spec.jscreate-project.spec.jscreate-user.spec.jsdelete-channel.spec.jsedit-channel.spec.jsedit-job-offer.spec.jsedit-project.spec.jsedit-user.spec.jsleave-channel.spec.jsleave-project.spec.jslist-job-offers.spec.jslist-users.spec.jsretire-channel.spec.jsretire-project.spec.js
@ -3,10 +3,15 @@
|
||||
|
||||
context('Retire Project Browser Testing', () => {
|
||||
let menuQuery = [
|
||||
'solid-display.project-tab',
|
||||
'solid-display:last-child',
|
||||
'solid-display[order-by="customer.name"]'
|
||||
];
|
||||
'solid-display.project-tab',
|
||||
'solid-display:last-child',
|
||||
'solid-display[order-by="customer.name"]'
|
||||
],
|
||||
menuCountQuery = [
|
||||
'solid-display.project-tab',
|
||||
'solid-display',
|
||||
'solid-display[order-by="customer.name"]'
|
||||
];
|
||||
before(() => {
|
||||
cy.clearLocalStorageSnapshot();
|
||||
cy.clearLocalStorage({ domain: null });
|
||||
@ -15,8 +20,9 @@ context('Retire Project Browser Testing', () => {
|
||||
beforeEach(() => cy.restoreLocalStorage());
|
||||
afterEach(() => cy.saveLocalStorage());
|
||||
it('should visit user login screend', () => cy.userLogin());
|
||||
it('should login', () => cy.login());
|
||||
describe('Project Retirement process', () => {
|
||||
it('should login', () => cy.login());
|
||||
let projectsLength;
|
||||
it('should visit the projects list screen', () => cy.naviagte('/admin/admin-projects'));
|
||||
it('should visit the last project edit screen', () => {
|
||||
cy.get(menuQuery.join(' '))
|
||||
@ -25,9 +31,11 @@ context('Retire Project Browser Testing', () => {
|
||||
cy.naviagte('/project/@' + id + '/project-information/project-edit');
|
||||
}));
|
||||
});
|
||||
it('should count the number of joined projects', () => {
|
||||
cy.get(menuCountQuery.join(' ')).its('length').then(length => projectsLength = length);
|
||||
});
|
||||
it('should click button to retire the project', () => {
|
||||
cy.scrollTo('bottom');
|
||||
cy.get('solid-delete[data-label="Retirer"] button').click();
|
||||
cy.get('solid-multiple[name="members"] solid-delete[data-label="Retirer"] button').click();
|
||||
});
|
||||
it('should stay on project edit screen', () => {
|
||||
cy.get(menuQuery.join(' '))
|
||||
@ -38,6 +46,10 @@ context('Retire Project Browser Testing', () => {
|
||||
});
|
||||
}));
|
||||
});
|
||||
// TO-DO: clearify what needs to happen after and do the checks
|
||||
it('should check if project was retired', () => {
|
||||
cy.get(menuCountQuery.join(' ')).its('length').should(length => {
|
||||
expect(length).to.eq(projectsLength - 1);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user