|
|
@ -162,14 +162,16 @@ Cypress.Commands.add("openTableTab", (tn, rc) => { |
|
|
|
.click({ force: true }); |
|
|
|
.click({ force: true }); |
|
|
|
|
|
|
|
|
|
|
|
cy.get(".nc-project-tree") |
|
|
|
cy.get(".nc-project-tree") |
|
|
|
.contains(tn, { timeout: 6000 }) |
|
|
|
.contains(tn) |
|
|
|
|
|
|
|
.should('exist') |
|
|
|
.first() |
|
|
|
.first() |
|
|
|
.click({ force: true }); |
|
|
|
.click({ force: true }); |
|
|
|
|
|
|
|
|
|
|
|
cy.get(`.project-tab`).contains(tn, { timeout: 10000 }).should("exist"); |
|
|
|
cy.get(`.project-tab`).contains(tn).should("exist"); |
|
|
|
|
|
|
|
|
|
|
|
cy.get(".nc-project-tree") |
|
|
|
cy.get(".nc-project-tree") |
|
|
|
.find(".v-list-item__title:contains(Tables)", { timeout: 10000 }) |
|
|
|
.find(".v-list-item__title:contains(Tables)") |
|
|
|
|
|
|
|
.should('exist') |
|
|
|
.first() |
|
|
|
.first() |
|
|
|
.click({ force: true }); |
|
|
|
.click({ force: true }); |
|
|
|
|
|
|
|
|
|
|
@ -221,7 +223,7 @@ Cypress.Commands.add("openOrCreateGqlProject", (_args) => { |
|
|
|
cy.contains("GRAPHQL APIs").closest("label").click(); |
|
|
|
cy.contains("GRAPHQL APIs").closest("label").click(); |
|
|
|
cy.get(".database-field input").click().clear().type("sakila"); |
|
|
|
cy.get(".database-field input").click().clear().type("sakila"); |
|
|
|
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").should('exist').click(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -280,11 +282,13 @@ Cypress.Commands.add("createTable", (name) => { |
|
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("deleteTable", (name, dbType) => { |
|
|
|
Cypress.Commands.add("deleteTable", (name, dbType) => { |
|
|
|
cy.get(".nc-project-tree") |
|
|
|
cy.get(".nc-project-tree") |
|
|
|
.find(".v-list-item__title:contains(Tables)", { timeout: 10000 }) |
|
|
|
.find(".v-list-item__title:contains(Tables)") |
|
|
|
|
|
|
|
.should('exist') |
|
|
|
.first() |
|
|
|
.first() |
|
|
|
.click(); |
|
|
|
.click(); |
|
|
|
cy.get(".nc-project-tree") |
|
|
|
cy.get(".nc-project-tree") |
|
|
|
.contains(name, { timeout: 6000 }) |
|
|
|
.contains(name) |
|
|
|
|
|
|
|
.should('exist') |
|
|
|
.first() |
|
|
|
.first() |
|
|
|
.click({ force: true }); |
|
|
|
.click({ force: true }); |
|
|
|
cy.get(`.project-tab:contains(${name}):visible`).should("exist"); |
|
|
|
cy.get(`.project-tab:contains(${name}):visible`).should("exist"); |
|
|
@ -301,13 +305,15 @@ Cypress.Commands.add("deleteTable", (name, dbType) => { |
|
|
|
Cypress.Commands.add("renameTable", (oldName, newName) => { |
|
|
|
Cypress.Commands.add("renameTable", (oldName, newName) => { |
|
|
|
// expand project tree
|
|
|
|
// expand project tree
|
|
|
|
cy.get(".nc-project-tree") |
|
|
|
cy.get(".nc-project-tree") |
|
|
|
.find(".v-list-item__title:contains(Tables)", { timeout: 10000 }) |
|
|
|
.find(".v-list-item__title:contains(Tables)") |
|
|
|
|
|
|
|
.should('exist') |
|
|
|
.first() |
|
|
|
.first() |
|
|
|
.click(); |
|
|
|
.click(); |
|
|
|
|
|
|
|
|
|
|
|
// right click on project table name
|
|
|
|
// right click on project table name
|
|
|
|
cy.get(".nc-project-tree") |
|
|
|
cy.get(".nc-project-tree") |
|
|
|
.contains(oldName, { timeout: 6000 }) |
|
|
|
.contains(oldName) |
|
|
|
|
|
|
|
.should('exist') |
|
|
|
.first() |
|
|
|
.first() |
|
|
|
.rightclick(); |
|
|
|
.rightclick(); |
|
|
|
|
|
|
|
|
|
|
@ -328,18 +334,21 @@ Cypress.Commands.add("renameTable", (oldName, newName) => { |
|
|
|
|
|
|
|
|
|
|
|
// close expanded project tree
|
|
|
|
// close expanded project tree
|
|
|
|
cy.get(".nc-project-tree") |
|
|
|
cy.get(".nc-project-tree") |
|
|
|
.find(".v-list-item__title:contains(Tables)", { timeout: 10000 }) |
|
|
|
.find(".v-list-item__title:contains(Tables)") |
|
|
|
|
|
|
|
.should('exist') |
|
|
|
.first() |
|
|
|
.first() |
|
|
|
.click(); |
|
|
|
.click(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("createColumn", (table, columnName) => { |
|
|
|
Cypress.Commands.add("createColumn", (table, columnName) => { |
|
|
|
cy.get(".nc-project-tree") |
|
|
|
cy.get(".nc-project-tree") |
|
|
|
.find(".v-list-item__title:contains(Tables)", { timeout: 10000 }) |
|
|
|
.find(".v-list-item__title:contains(Tables)") |
|
|
|
|
|
|
|
.should('exist') |
|
|
|
.first() |
|
|
|
.first() |
|
|
|
.click(); |
|
|
|
.click(); |
|
|
|
cy.get(".nc-project-tree") |
|
|
|
cy.get(".nc-project-tree") |
|
|
|
.contains(table, { timeout: 6000 }) |
|
|
|
.contains(table) |
|
|
|
|
|
|
|
.should('exist') |
|
|
|
.first() |
|
|
|
.first() |
|
|
|
.click({ force: true }); |
|
|
|
.click({ force: true }); |
|
|
|
cy.get(`.project-tab:contains(${table}):visible`).should("exist"); |
|
|
|
cy.get(`.project-tab:contains(${table}):visible`).should("exist"); |
|
|
@ -366,7 +375,7 @@ Cypress.Commands.add("openViewsTab", (vn, rc) => { |
|
|
|
cy.task("log", `[openViewsTab] ${vn} ${rc}`); |
|
|
|
cy.task("log", `[openViewsTab] ${vn} ${rc}`); |
|
|
|
|
|
|
|
|
|
|
|
cy.get(".nc-project-tree") |
|
|
|
cy.get(".nc-project-tree") |
|
|
|
.find(".v-list-item__title:contains(Tables)", { timeout: 10000 }) |
|
|
|
.find(".v-list-item__title:contains(Tables)") |
|
|
|
.should("exist") |
|
|
|
.should("exist") |
|
|
|
.first() |
|
|
|
.first() |
|
|
|
.click({ force: true }); |
|
|
|
.click({ force: true }); |
|
|
@ -376,10 +385,11 @@ Cypress.Commands.add("openViewsTab", (vn, rc) => { |
|
|
|
.first() |
|
|
|
.first() |
|
|
|
.click({ force: true }); |
|
|
|
.click({ force: true }); |
|
|
|
|
|
|
|
|
|
|
|
cy.get(`.project-tab`).contains(vn, { timeout: 10000 }).should("exist"); |
|
|
|
cy.get(`.project-tab`).contains(vn).should("exist"); |
|
|
|
|
|
|
|
|
|
|
|
cy.get(".nc-project-tree") |
|
|
|
cy.get(".nc-project-tree") |
|
|
|
.find(".v-list-item__title:contains(Tables)", { timeout: 10000 }) |
|
|
|
.find(".v-list-item__title:contains(Tables)") |
|
|
|
|
|
|
|
.should('exist') |
|
|
|
.first() |
|
|
|
.first() |
|
|
|
.click({ force: true }); |
|
|
|
.click({ force: true }); |
|
|
|
|
|
|
|
|
|
|
@ -391,7 +401,7 @@ Cypress.Commands.add("openViewsTab", (vn, rc) => { |
|
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("closeViewsTab", (vn) => { |
|
|
|
Cypress.Commands.add("closeViewsTab", (vn) => { |
|
|
|
cy.task("log", `[closeViewsTab] ${vn}`); |
|
|
|
cy.task("log", `[closeViewsTab] ${vn}`); |
|
|
|
cy.get(`.project-tab`).contains(vn, { timeout: 10000 }).should("exist"); |
|
|
|
cy.get(`.project-tab`).contains(vn).should("exist"); |
|
|
|
cy.get(`[href="#view||||${vn}"]`) |
|
|
|
cy.get(`[href="#view||||${vn}"]`) |
|
|
|
.find("button.mdi-close") |
|
|
|
.find("button.mdi-close") |
|
|
|
.click({ force: true }); |
|
|
|
.click({ force: true }); |
|
|
|