|
|
|
@ -13,21 +13,26 @@ export const genTest = (apiType, dbType) => {
|
|
|
|
|
cy.get("label").contains(label).parents(".ant-row").first().click(); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// Run once before test- create table
|
|
|
|
|
//
|
|
|
|
|
before(() => { |
|
|
|
|
mainPage.tabReset(); |
|
|
|
|
|
|
|
|
|
// // close team & auth tab
|
|
|
|
|
// cy.get('button.ant-tabs-tab-remove').should('exist').click();
|
|
|
|
|
|
|
|
|
|
cy.restoreLocalStorage(); |
|
|
|
|
cy.createTable(tableName); |
|
|
|
|
cy.saveLocalStorage(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
beforeEach(() => {}); |
|
|
|
|
// Run once before test- create table
|
|
|
|
|
//
|
|
|
|
|
beforeEach(() => { |
|
|
|
|
cy.restoreLocalStorage(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
afterEach(() => { |
|
|
|
|
cy.saveLocalStorage(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
after(() => { |
|
|
|
|
cy.restoreLocalStorage(); |
|
|
|
|
cy.deleteTable(tableName); |
|
|
|
|
cy.saveLocalStorage(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// Routine to create a new look up column
|
|
|
|
@ -42,7 +47,6 @@ export const genTest = (apiType, dbType) => {
|
|
|
|
|
.should("exist") |
|
|
|
|
.clear() |
|
|
|
|
.type(columnName); |
|
|
|
|
// cy.get(".nc-column-type-input").last().click().type("Duration");
|
|
|
|
|
cy.getActiveMenu(".nc-dropdown-grid-add-column") |
|
|
|
|
.find(".nc-column-type-input") |
|
|
|
|
.last() |
|
|
|
@ -60,7 +64,6 @@ export const genTest = (apiType, dbType) => {
|
|
|
|
|
.contains(durationFormat) |
|
|
|
|
.click(); |
|
|
|
|
|
|
|
|
|
// cy.get(".ant-btn-primary").contains("Save").should('exist').click();
|
|
|
|
|
cy.getActiveMenu(".nc-dropdown-grid-add-column") |
|
|
|
|
.find(".ant-btn-primary:visible") |
|
|
|
|
.contains("Save") |
|
|
|
@ -83,8 +86,6 @@ export const genTest = (apiType, dbType) => {
|
|
|
|
|
.trigger("mouseover", { force: true }) |
|
|
|
|
.click({ force: true }); |
|
|
|
|
|
|
|
|
|
// cy.get(".nc-column-edit").click();
|
|
|
|
|
// cy.get(".nc-column-edit").should("not.be.visible");
|
|
|
|
|
cy.getActiveMenu(".nc-dropdown-column-operations") |
|
|
|
|
.find(".nc-column-edit") |
|
|
|
|
.click(); |
|
|
|
@ -102,7 +103,6 @@ export const genTest = (apiType, dbType) => {
|
|
|
|
|
.contains(newDurationFormat) |
|
|
|
|
.click(); |
|
|
|
|
|
|
|
|
|
// cy.get(".ant-btn-primary:visible").contains("Save").click();
|
|
|
|
|
cy.getActiveMenu(".nc-dropdown-edit-column") |
|
|
|
|
.find(".ant-btn-primary:visible") |
|
|
|
|
.contains("Save") |
|
|
|
@ -145,9 +145,6 @@ export const genTest = (apiType, dbType) => {
|
|
|
|
|
.contains("Cancel") |
|
|
|
|
.should("exist") |
|
|
|
|
.click(); |
|
|
|
|
// mainPage.getCell(colName, index).find('input').then(($e) => {
|
|
|
|
|
// expect($e[0].value).to.equal(expectedValue)
|
|
|
|
|
// })
|
|
|
|
|
mainPage.getCell(colName, index).contains(expectedValue).should("exist"); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|