Merge branch 'develop' into feat/kanban-view

This commit is contained in:
Wing-Kam Wong
2022-10-07 20:21:26 +08:00
77 changed files with 1332 additions and 530 deletions

View File

@@ -8,10 +8,7 @@ export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(apiType, dbType)) return;
function addNewRow(index, cellValue) {
cy.get(".nc-add-new-row-btn:visible").should("exist");
cy.get(".nc-add-new-row-btn").click();
cy.wait(2000);
mainPage.addNewRowExpand("tablex");
// cy.get("#data-table-form-Title > input").first().type(cellValue);
cy.get(".nc-expand-col-Title")

View File

@@ -52,7 +52,7 @@ export const genTest = (apiType, dbType) => {
);
// add a row to end of Country table
cy.get(".nc-add-new-row-btn").click();
mainPage.addNewRowExpand("Country");
cy.get(".nc-expand-col-Country")
.find(".nc-cell > input")
.first()

View File

@@ -127,8 +127,7 @@ export const genTest = (apiType, dbType) => {
isNewRow = false
) => {
if (isNewRow) {
cy.get(".nc-add-new-row-btn:visible").should("exist");
cy.get(".nc-add-new-row-btn").click();
mainPage.addNewRowExpand("DurationTable");
} else {
// mainPage.getRow(index).find(".nc-row-expand-icon").click({ force: true });
cy.get(".nc-row-expand")

View File

@@ -183,8 +183,7 @@ export const genTest = (apiType, dbType) => {
cy.openTableTab("Sheet2", 0);
// Click on `Add new row` button
cy.get(".nc-add-new-row-btn:visible").should("exist");
cy.get(".nc-add-new-row-btn").click();
mainPage.addNewRowExpand("Sheet2");
// Title
cy.get(".nc-expand-col-Title")

View File

@@ -13,35 +13,17 @@ const generateLinkWithPwd = () => {
.should("be.visible");
// enable checkbox & feed pwd, save
cy.getActiveModal(".nc-modal-share-view")
.find(".ant-collapse")
.should("exist")
.click();
cy.getActiveModal(".nc-modal-share-view")
.find(".ant-checkbox-input")
.should("exist")
.first()
.then(($el) => {
if (!$el.prop("checked")) {
cy.wrap($el).click({ force: true });
cy.getActiveModal(".nc-modal-share-view")
.find('input[type="password"]')
.clear()
.type("1");
cy.getActiveModal(".nc-modal-share-view")
.find('button:contains("Save password")')
.click();
cy.toastWait("Successfully updated");
}
});
cy.get('[data-cy="nc-modal-share-view__with-password"]').click();
cy.get('[data-cy="nc-modal-share-view__password"]').clear().type('1')
cy.get('[data-cy="nc-modal-share-view__save-password"]').click();
cy.toastWait("Successfully updated");
// copy link text, visit URL
cy.getActiveModal(".nc-modal-share-view")
.find(".nc-share-link-box")
.then(($obj) => {
linkText = $obj.text().trim();
cy.log(linkText);
});
cy.get('[data-cy="nc-modal-share-view__link"]').then(($el) => {
linkText = $el.text();
// todo: visit url?
cy.log(linkText);
})
};
export const genTest = (apiType, dbType) => {

View File

@@ -401,7 +401,7 @@ export const genTest = (apiType, dbType) => {
it(`Generate default Shared GRID view URL`, () => {
// add row
cy.get(".nc-add-new-row-btn").click();
mainPage.addNewRowExpand("Country");
cy.get(".nc-expand-col-Country")
.find(".nc-cell > input")
.should("exist")

View File

@@ -428,7 +428,7 @@ export const genTest = (apiType, dbType) => {
it(`Generate default Shared GRID view URL`, () => {
// add row
cy.get(".nc-add-new-row-btn").click();
mainPage.addNewRowExpand("Country");
cy.get(".nc-expand-col-Country")
.find(".nc-cell > input")
.should("exist")

View File

@@ -148,8 +148,7 @@ function clearServerData() {
}
function addNewRow(index, cellValue) {
cy.get(".nc-add-new-row-btn:visible").should("exist");
cy.get(".nc-add-new-row-btn").click();
mainPage.addNewRowExpand("Temp");
cy.get(".nc-expand-col-Title")
.should("exist")