feature: project retire test flow

This commit is contained in:
Jure Ursic 2020-07-03 19:27:55 +02:00
parent 8b84de7b37
commit 6f2a8aa877
1 changed files with 9 additions and 4 deletions

View File

@ -2,16 +2,21 @@
/* globals cy, expect */
context('Retire Project Browser Testing', () => {
let menuQuery = [
'solid-display.project-tab',
'solid-display:last-child',
'solid-display[order-by="customer.name"]'
];;
before(() => {
cy.clearLocalStorage({ domain: null });
cy.clearCookies({ domain: null });
});
it('should visit user login screen', () => cy.userLogin());
it('should visit user login screend', () => 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')
cy.get(menuQuery.join(' '))
.invoke('attr', 'data-src')
.then(url => cy.encodeUrl(url).then(id => {
cy.naviagte('/project/@' + id + '/project-information/project-edit');
@ -22,7 +27,7 @@ context('Retire Project Browser Testing', () => {
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')
cy.get(menuQuery.join(' '))
.invoke('attr', 'data-src')
.then(url => cy.encodeUrl(url).then(id => {
cy.location().should((loc) => {
@ -30,6 +35,6 @@ context('Retire Project Browser Testing', () => {
});
}));
});
// TO-DO: ceraify what needs to happen after and do the checks
// TO-DO: clearify what needs to happen after and do the checks
});
});