|
|
@ -7,55 +7,74 @@ export const genTest = (type, xcdb) => { |
|
|
|
describe(`${type.toUpperCase()} Project operations`, () => { |
|
|
|
describe(`${type.toUpperCase()} Project operations`, () => { |
|
|
|
if(!isTestSuiteActive(type, xcdb)) return; |
|
|
|
if(!isTestSuiteActive(type, xcdb)) return; |
|
|
|
|
|
|
|
|
|
|
|
before(() => { |
|
|
|
// before(() => {
|
|
|
|
loginPage.signIn(roles.owner.credentials) |
|
|
|
// loginPage.signIn(roles.owner.credentials)
|
|
|
|
}) |
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
|
|
beforeEach(() => { |
|
|
|
|
|
|
|
cy.restoreLocalStorage(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
afterEach(() => { |
|
|
|
// beforeEach(() => {
|
|
|
|
cy.saveLocalStorage(); |
|
|
|
// cy.restoreLocalStorage();
|
|
|
|
}); |
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// afterEach(() => {
|
|
|
|
|
|
|
|
// cy.saveLocalStorage();
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
it('Create Project', () => { |
|
|
|
// it('Create Project', () => {
|
|
|
|
cy.contains('New Project').trigger('onmouseover').trigger('mouseenter'); |
|
|
|
// cy.contains('New Project').trigger('onmouseover').trigger('mouseenter');
|
|
|
|
cy.get('.create-external-db-project').click() |
|
|
|
// cy.get('.create-external-db-project').click()
|
|
|
|
cy.url({timeout: 50000}).should('contain', '#/project/') |
|
|
|
// cy.url({timeout: 50000}).should('contain', '#/project/')
|
|
|
|
if (type === 'graphql') { |
|
|
|
// if (type === 'graphql') {
|
|
|
|
cy.contains('GRAPHQL APIs').closest('label').click() |
|
|
|
// cy.contains('GRAPHQL APIs').closest('label').click()
|
|
|
|
} |
|
|
|
// }
|
|
|
|
cy.get('.database-field input').click().clear().type('dummy_db') |
|
|
|
// cy.get('.database-field input').click().clear().type('dummy_db')
|
|
|
|
cy.contains('Test Database Connection').click() |
|
|
|
// cy.contains('Test Database Connection').click()
|
|
|
|
cy.contains('Ok & Save Project', {timeout: 3000}).click() |
|
|
|
// cy.contains('Ok & Save Project', {timeout: 3000}).click()
|
|
|
|
cy.url({timeout: 50000}).should('contain', '#/nc/') |
|
|
|
// cy.url({timeout: 50000}).should('contain', '#/nc/')
|
|
|
|
}); |
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
it('Stop Project', () => { |
|
|
|
it('Stop Project', () => { |
|
|
|
cy.visit('./#/projects') |
|
|
|
//cy.visit('./#/projects')
|
|
|
|
cy.get(`.nc-${type}-project-row .mdi-stop-circle-outline`, {timeout: 10000}).last().invoke('show').click(); |
|
|
|
cy.get(`.nc-${type}-project-row .mdi-stop-circle-outline`, { timeout: 10000 }) |
|
|
|
cy.contains('Submit').closest('button').click(); |
|
|
|
.last() |
|
|
|
}); |
|
|
|
.invoke('show') |
|
|
|
|
|
|
|
.click(); |
|
|
|
|
|
|
|
cy.contains('Submit') |
|
|
|
|
|
|
|
.closest('button') |
|
|
|
|
|
|
|
.click(); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
it('Start Project', () => { |
|
|
|
it('Start Project', () => { |
|
|
|
cy.visit('./#/projects') |
|
|
|
//cy.visit('./#/projects')
|
|
|
|
cy.get(`.nc-${type}-project-row .mdi-play-circle-outline`, {timeout: 10000}).last().invoke('show').click(); |
|
|
|
cy.get(`.nc-${type}-project-row .mdi-play-circle-outline`, { timeout: 10000 }) |
|
|
|
|
|
|
|
.last() |
|
|
|
|
|
|
|
.invoke('show') |
|
|
|
|
|
|
|
.click(); |
|
|
|
cy.contains('Submit').closest('button').click(); |
|
|
|
cy.contains('Submit').closest('button').click(); |
|
|
|
}); |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
it('Restart Project', () => { |
|
|
|
it('Restart Project', () => { |
|
|
|
cy.visit('./#/projects') |
|
|
|
//cy.visit('./#/projects')
|
|
|
|
cy.get(`.nc-${type}-project-row .mdi-restart`, {timeout: 10000}).last().invoke('show').click(); |
|
|
|
cy.wait(1000) |
|
|
|
cy.contains('Submit').closest('button').click(); |
|
|
|
cy.get(`.nc-${type}-project-row .mdi-restart`, { timeout: 10000 }) |
|
|
|
}); |
|
|
|
.last() |
|
|
|
|
|
|
|
.invoke('show') |
|
|
|
|
|
|
|
.click(); |
|
|
|
|
|
|
|
cy.contains('Submit') |
|
|
|
|
|
|
|
.closest('button') |
|
|
|
|
|
|
|
.click(); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
it('Delete Project', () => { |
|
|
|
it('Delete Project', () => { |
|
|
|
cy.visit('./#/projects') |
|
|
|
//cy.visit('./#/projects')
|
|
|
|
cy.get(`.nc-${type}-project-row .mdi-delete-circle-outline`, {timeout: 10000}).last().invoke('show').click(); |
|
|
|
cy.wait(1000) |
|
|
|
cy.contains('Submit').closest('button').click(); |
|
|
|
cy.get(`.nc-${type}-project-row .mdi-delete-circle-outline`, { timeout: 10000 }) |
|
|
|
}); |
|
|
|
.last() |
|
|
|
|
|
|
|
.invoke('show') |
|
|
|
|
|
|
|
.click(); |
|
|
|
|
|
|
|
cy.contains('Submit') |
|
|
|
|
|
|
|
.closest('button') |
|
|
|
|
|
|
|
.click(); |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|