Browse Source

[test] cypress: skip project creation multiple times on cypress linear execution

Signed-off-by: Raju Udava <sivadstala@gmail.com>
pull/714/head
Raju Udava 3 years ago
parent
commit
13c1a4ba38
  1. 4
      .gitignore
  2. 17
      scripts/cypress/integration/common/00_pre_configurations.js

4
.gitignore vendored

@ -79,3 +79,7 @@ mongod
.history .history
/packages/nocodb/docker/main.js.LICENSE.txt /packages/nocodb/docker/main.js.LICENSE.txt
/packages/nocodb/noco_log.db /packages/nocodb/noco_log.db
# Cypress
#=========
shared.json

17
scripts/cypress/integration/common/00_pre_configurations.js

@ -21,8 +21,21 @@ export const genTest = (type, xcdb) => {
// click home button // click home button
mainPage.toolBarTopLeft(mainPage.HOME).click() mainPage.toolBarTopLeft(mainPage.HOME).click()
// create requested project
projectsPage.createProject(proj.basic, proj.config) cy.get('.nc-container').then((obj) => {
cy.log(obj)
// if project already created, open
// else, create a new one
if (true == obj[0].innerHTML.includes(proj.basic.name)) {
projectsPage.openProject(proj.basic.name)
} else {
projectsPage.createProject(proj.basic, proj.config)
}
// create requested project
// projectsPage.createProject(proj.basic, proj.config)
})
}) })
} }

Loading…
Cancel
Save