feature: user, project, channel and job offer create test flows and project, channel and job offer edit test flows
This commit is contained in:
35
cypress/integration/retire-project.spec.js
Normal file
35
cypress/integration/retire-project.spec.js
Normal file
@ -0,0 +1,35 @@
|
||||
/// <reference types="Cypress" />
|
||||
/* globals cy, expect */
|
||||
|
||||
context('Retire Project Browser Testing', () => {
|
||||
before(() => {
|
||||
cy.clearLocalStorage({ domain: null });
|
||||
cy.clearCookies({ domain: null });
|
||||
});
|
||||
it('should visit user login screen', () => cy.userLogin());
|
||||
describe('Project Retirement process', () => {
|
||||
it('should login', () => cy.login());
|
||||
it('should visit the project creation screen', () => cy.naviagte('/admin/admin-projects'));
|
||||
it('should visit the last project edit screen', () => {
|
||||
cy.get('solid-display[widget-project="hubl-menu-fix-url-project"][fields="project"]:last-child solid-display')
|
||||
.invoke('attr', 'data-src')
|
||||
.then(url => cy.encodeUrl(url).then(id => {
|
||||
cy.naviagte('/project/@' + id + '/project-information/project-edit');
|
||||
}));
|
||||
});
|
||||
it('should click button to retire the project', () => {
|
||||
cy.scrollTo('bottom');
|
||||
cy.get('solid-delete[data-label="Retirer"] button').click();
|
||||
});
|
||||
it('should stay on project edit screen', () => {
|
||||
cy.get('solid-display[widget-project="hubl-menu-fix-url-project"]:last-child solid-display')
|
||||
.invoke('attr', 'data-src')
|
||||
.then(url => cy.encodeUrl(url).then(id => {
|
||||
cy.location().should((loc) => {
|
||||
expect(loc.pathname).to.eq('/project/@' + id + '/project-information/project-edit');
|
||||
});
|
||||
}));
|
||||
});
|
||||
// TO-DO: ceraify what needs to happen after and do the checks
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user