|
|
|
@ -31,11 +31,11 @@ export const genTest = (apiType, dbType) => {
|
|
|
|
|
|
|
|
|
|
beforeEach(() => { |
|
|
|
|
cy.restoreLocalStorage(); |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
afterEach(() => { |
|
|
|
|
cy.saveLocalStorage(); |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// after(() => {
|
|
|
|
|
// cy.closeTableTab("Country");
|
|
|
|
@ -49,48 +49,50 @@ export const genTest = (apiType, dbType) => {
|
|
|
|
|
childCol, |
|
|
|
|
aggregateFunc |
|
|
|
|
) => { |
|
|
|
|
|
|
|
|
|
cy.get(".nc-grid tr > th:last .nc-icon").click({ |
|
|
|
|
force: true, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
cy.getActiveMenu(".nc-dropdown-grid-add-column") |
|
|
|
|
.find('input.nc-column-name-input') |
|
|
|
|
.should('exist') |
|
|
|
|
.find("input.nc-column-name-input") |
|
|
|
|
.should("exist") |
|
|
|
|
.clear() |
|
|
|
|
.type(columnName); |
|
|
|
|
// cy.get(".nc-column-type-input").last().click().type("RollUp");
|
|
|
|
|
cy.getActiveMenu('.nc-dropdown-grid-add-column') |
|
|
|
|
cy.getActiveMenu(".nc-dropdown-grid-add-column") |
|
|
|
|
.find(".nc-column-type-input") |
|
|
|
|
.last() |
|
|
|
|
.click() |
|
|
|
|
.type("RollUp") |
|
|
|
|
cy.getActiveSelection('.nc-dropdown-column-type') |
|
|
|
|
.find('.ant-select-item-option') |
|
|
|
|
.type("RollUp"); |
|
|
|
|
cy.getActiveSelection(".nc-dropdown-column-type") |
|
|
|
|
.find(".ant-select-item-option") |
|
|
|
|
.contains("Rollup") |
|
|
|
|
.click(); |
|
|
|
|
|
|
|
|
|
// wait for re-rendering & title selection to re-appear
|
|
|
|
|
cy.wait(500); |
|
|
|
|
|
|
|
|
|
// Configure Child table & column names
|
|
|
|
|
fetchParentFromLabel("Child table"); |
|
|
|
|
cy.getActiveSelection('.nc-dropdown-relation-table') |
|
|
|
|
.find('.ant-select-item-option') |
|
|
|
|
cy.getActiveSelection(".nc-dropdown-relation-table") |
|
|
|
|
.find(".ant-select-item-option") |
|
|
|
|
.contains(childTable) |
|
|
|
|
.click(); |
|
|
|
|
|
|
|
|
|
fetchParentFromLabel("Child column"); |
|
|
|
|
cy.getActiveSelection('.nc-dropdown-relation-column') |
|
|
|
|
.find('.ant-select-item-option') |
|
|
|
|
cy.getActiveSelection(".nc-dropdown-relation-column") |
|
|
|
|
.find(".ant-select-item-option") |
|
|
|
|
.contains(childCol) |
|
|
|
|
.click(); |
|
|
|
|
|
|
|
|
|
fetchParentFromLabel("Aggregate function"); |
|
|
|
|
cy.getActiveSelection('.nc-dropdown-rollup-function') |
|
|
|
|
.find('.ant-select-item-option') |
|
|
|
|
cy.getActiveSelection(".nc-dropdown-rollup-function") |
|
|
|
|
.find(".ant-select-item-option") |
|
|
|
|
.contains(aggregateFunc) |
|
|
|
|
.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") |
|
|
|
|
.contains("Save") |
|
|
|
|
.click(); |
|
|
|
@ -138,9 +140,7 @@ export const genTest = (apiType, dbType) => {
|
|
|
|
|
|
|
|
|
|
// Verify first entry, will be displayed as alias here 'childColumn (from childTable)'
|
|
|
|
|
// intentionally verifying 4th item, as initial items are being masked out by list scroll down
|
|
|
|
|
mainPage.getCell("RollUpCol", 4) |
|
|
|
|
.contains("2") |
|
|
|
|
.should("exist"); |
|
|
|
|
mainPage.getCell("RollUpCol", 4).contains("2").should("exist"); |
|
|
|
|
|
|
|
|
|
// editColumnByName("RollUpCol_2", "RollUpCol_New");
|
|
|
|
|
deleteColumnByName("RollUpCol"); |
|
|
|
|