|
|
@ -2,9 +2,9 @@ import { loginPage } from "../../support/page_objects/navigation"; |
|
|
|
import { isXcdb, roles } from "../../support/page_objects/projectConstants"; |
|
|
|
import { isXcdb, roles } from "../../support/page_objects/projectConstants"; |
|
|
|
import { isTestSuiteActive } from "../../support/page_objects/projectConstants"; |
|
|
|
import { isTestSuiteActive } from "../../support/page_objects/projectConstants"; |
|
|
|
|
|
|
|
|
|
|
|
export const genTest = (type, xcdb) => { |
|
|
|
export const genTest = (apiType, dbType) => { |
|
|
|
describe(`${type.toUpperCase()} Project operations`, () => { |
|
|
|
describe(`${apiType.toUpperCase()} Project operations`, () => { |
|
|
|
if (!isTestSuiteActive(type, xcdb)) return; |
|
|
|
if (!isTestSuiteActive(apiType, dbType)) return; |
|
|
|
|
|
|
|
|
|
|
|
before(() => { |
|
|
|
before(() => { |
|
|
|
loginPage.signIn(roles.owner.credentials); |
|
|
|
loginPage.signIn(roles.owner.credentials); |
|
|
@ -12,7 +12,7 @@ export const genTest = (type, xcdb) => { |
|
|
|
|
|
|
|
|
|
|
|
it("Stop Project", () => { |
|
|
|
it("Stop Project", () => { |
|
|
|
//cy.visit('./#/projects')
|
|
|
|
//cy.visit('./#/projects')
|
|
|
|
cy.get(`.nc-${type}-project-row .mdi-stop-circle-outline`, { |
|
|
|
cy.get(`.nc-${apiType}-project-row .mdi-stop-circle-outline`, { |
|
|
|
timeout: 10000, |
|
|
|
timeout: 10000, |
|
|
|
}) |
|
|
|
}) |
|
|
|
.should("exist") |
|
|
|
.should("exist") |
|
|
@ -26,7 +26,7 @@ export const genTest = (type, xcdb) => { |
|
|
|
|
|
|
|
|
|
|
|
it("Start Project", () => { |
|
|
|
it("Start Project", () => { |
|
|
|
//cy.visit('./#/projects')
|
|
|
|
//cy.visit('./#/projects')
|
|
|
|
cy.get(`.nc-${type}-project-row .mdi-play-circle-outline`, { |
|
|
|
cy.get(`.nc-${apiType}-project-row .mdi-play-circle-outline`, { |
|
|
|
timeout: 10000, |
|
|
|
timeout: 10000, |
|
|
|
}) |
|
|
|
}) |
|
|
|
.should("exist") |
|
|
|
.should("exist") |
|
|
@ -41,7 +41,7 @@ export const genTest = (type, xcdb) => { |
|
|
|
it("Restart Project", () => { |
|
|
|
it("Restart Project", () => { |
|
|
|
if (!isXcdb()) { |
|
|
|
if (!isXcdb()) { |
|
|
|
//cy.visit('./#/projects')
|
|
|
|
//cy.visit('./#/projects')
|
|
|
|
cy.get(`.nc-${type}-project-row .mdi-restart`, { timeout: 10000 }) |
|
|
|
cy.get(`.nc-${apiType}-project-row .mdi-restart`, { timeout: 10000 }) |
|
|
|
.should("exist") |
|
|
|
.should("exist") |
|
|
|
.last() |
|
|
|
.last() |
|
|
|
.invoke("show") |
|
|
|
.invoke("show") |
|
|
@ -54,7 +54,7 @@ export const genTest = (type, xcdb) => { |
|
|
|
|
|
|
|
|
|
|
|
it("Delete Project", () => { |
|
|
|
it("Delete Project", () => { |
|
|
|
//cy.visit('./#/projects')
|
|
|
|
//cy.visit('./#/projects')
|
|
|
|
cy.get(`.nc-${type}-project-row .mdi-delete-circle-outline`, { |
|
|
|
cy.get(`.nc-${apiType}-project-row .mdi-delete-circle-outline`, { |
|
|
|
timeout: 10000, |
|
|
|
timeout: 10000, |
|
|
|
}) |
|
|
|
}) |
|
|
|
.should("exist") |
|
|
|
.should("exist") |
|
|
|