|
|
@ -13,21 +13,26 @@ export const genTest = (apiType, dbType) => { |
|
|
|
cy.get("label").contains(label).parents(".ant-row").first().click(); |
|
|
|
cy.get("label").contains(label).parents(".ant-row").first().click(); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// Run once before test- create table
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
before(() => { |
|
|
|
before(() => { |
|
|
|
mainPage.tabReset(); |
|
|
|
cy.restoreLocalStorage(); |
|
|
|
|
|
|
|
|
|
|
|
// // close team & auth tab
|
|
|
|
|
|
|
|
// cy.get('button.ant-tabs-tab-remove').should('exist').click();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cy.createTable(tableName); |
|
|
|
cy.createTable(tableName); |
|
|
|
|
|
|
|
cy.saveLocalStorage(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Run once before test- create table
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
beforeEach(() => { |
|
|
|
|
|
|
|
cy.restoreLocalStorage(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
beforeEach(() => {}); |
|
|
|
afterEach(() => { |
|
|
|
|
|
|
|
cy.saveLocalStorage(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
after(() => { |
|
|
|
after(() => { |
|
|
|
|
|
|
|
cy.restoreLocalStorage(); |
|
|
|
cy.deleteTable(tableName); |
|
|
|
cy.deleteTable(tableName); |
|
|
|
|
|
|
|
cy.saveLocalStorage(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// Routine to create a new look up column
|
|
|
|
// Routine to create a new look up column
|
|
|
@ -42,7 +47,6 @@ export const genTest = (apiType, dbType) => { |
|
|
|
.should("exist") |
|
|
|
.should("exist") |
|
|
|
.clear() |
|
|
|
.clear() |
|
|
|
.type(columnName); |
|
|
|
.type(columnName); |
|
|
|
// cy.get(".nc-column-type-input").last().click().type("Duration");
|
|
|
|
|
|
|
|
cy.getActiveMenu(".nc-dropdown-grid-add-column") |
|
|
|
cy.getActiveMenu(".nc-dropdown-grid-add-column") |
|
|
|
.find(".nc-column-type-input") |
|
|
|
.find(".nc-column-type-input") |
|
|
|
.last() |
|
|
|
.last() |
|
|
@ -53,6 +57,10 @@ export const genTest = (apiType, dbType) => { |
|
|
|
.contains("Duration") |
|
|
|
.contains("Duration") |
|
|
|
.click(); |
|
|
|
.click(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fix me! wait till the modal rendering (input highlight) is completed
|
|
|
|
|
|
|
|
// focus shifts back to the input field to select text after the dropdown is rendered
|
|
|
|
|
|
|
|
cy.wait(500); |
|
|
|
|
|
|
|
|
|
|
|
// Configure Duration format
|
|
|
|
// Configure Duration format
|
|
|
|
fetchParentFromLabel("Duration Format"); |
|
|
|
fetchParentFromLabel("Duration Format"); |
|
|
|
cy.getActiveSelection(".nc-dropdown-duration-option") |
|
|
|
cy.getActiveSelection(".nc-dropdown-duration-option") |
|
|
@ -60,7 +68,6 @@ export const genTest = (apiType, dbType) => { |
|
|
|
.contains(durationFormat) |
|
|
|
.contains(durationFormat) |
|
|
|
.click(); |
|
|
|
.click(); |
|
|
|
|
|
|
|
|
|
|
|
// cy.get(".ant-btn-primary").contains("Save").should('exist').click();
|
|
|
|
|
|
|
|
cy.getActiveMenu(".nc-dropdown-grid-add-column") |
|
|
|
cy.getActiveMenu(".nc-dropdown-grid-add-column") |
|
|
|
.find(".ant-btn-primary:visible") |
|
|
|
.find(".ant-btn-primary:visible") |
|
|
|
.contains("Save") |
|
|
|
.contains("Save") |
|
|
@ -83,8 +90,6 @@ export const genTest = (apiType, dbType) => { |
|
|
|
.trigger("mouseover", { force: true }) |
|
|
|
.trigger("mouseover", { force: true }) |
|
|
|
.click({ 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") |
|
|
|
cy.getActiveMenu(".nc-dropdown-column-operations") |
|
|
|
.find(".nc-column-edit") |
|
|
|
.find(".nc-column-edit") |
|
|
|
.click(); |
|
|
|
.click(); |
|
|
@ -95,6 +100,11 @@ export const genTest = (apiType, dbType) => { |
|
|
|
.should("exist") |
|
|
|
.should("exist") |
|
|
|
.clear() |
|
|
|
.clear() |
|
|
|
.type(newName); |
|
|
|
.type(newName); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fix me! wait till the modal rendering (input highlight) is completed
|
|
|
|
|
|
|
|
// focus shifts back to the input field to select text after the dropdown is rendered
|
|
|
|
|
|
|
|
cy.wait(500); |
|
|
|
|
|
|
|
|
|
|
|
// Configure Duration format
|
|
|
|
// Configure Duration format
|
|
|
|
fetchParentFromLabel("Duration Format"); |
|
|
|
fetchParentFromLabel("Duration Format"); |
|
|
|
cy.getActiveSelection(".nc-dropdown-duration-option") |
|
|
|
cy.getActiveSelection(".nc-dropdown-duration-option") |
|
|
@ -102,7 +112,6 @@ export const genTest = (apiType, dbType) => { |
|
|
|
.contains(newDurationFormat) |
|
|
|
.contains(newDurationFormat) |
|
|
|
.click(); |
|
|
|
.click(); |
|
|
|
|
|
|
|
|
|
|
|
// cy.get(".ant-btn-primary:visible").contains("Save").click();
|
|
|
|
|
|
|
|
cy.getActiveMenu(".nc-dropdown-edit-column") |
|
|
|
cy.getActiveMenu(".nc-dropdown-edit-column") |
|
|
|
.find(".ant-btn-primary:visible") |
|
|
|
.find(".ant-btn-primary:visible") |
|
|
|
.contains("Save") |
|
|
|
.contains("Save") |
|
|
@ -145,9 +154,6 @@ export const genTest = (apiType, dbType) => { |
|
|
|
.contains("Cancel") |
|
|
|
.contains("Cancel") |
|
|
|
.should("exist") |
|
|
|
.should("exist") |
|
|
|
.click(); |
|
|
|
.click(); |
|
|
|
// mainPage.getCell(colName, index).find('input').then(($e) => {
|
|
|
|
|
|
|
|
// expect($e[0].value).to.equal(expectedValue)
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
mainPage.getCell(colName, index).contains(expectedValue).should("exist"); |
|
|
|
mainPage.getCell(colName, index).contains(expectedValue).should("exist"); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|