wip: towards v1

Signed-off-by: Pranav C <pranavxc@gmail.com>
This commit is contained in:
Pranav C
2022-04-05 00:15:11 +05:30
parent 829c52925a
commit 8733948056
531 changed files with 157998 additions and 44971 deletions

View File

@@ -1,3 +1,5 @@
import { projectsPage } from "./navigation";
const path = require("path");
/**
@@ -57,6 +59,8 @@ export class _mainPage {
}
navigationDraw(item) {
// open settings tab
cy.get(".nc-team-settings").should("exist").click();
// if (item == this.ROLE_VIEW)
// return cy.get('.nc-nav-drawer').find('.v-list').last()
// else
@@ -64,21 +68,21 @@ export class _mainPage {
switch (item) {
case this.AUDIT:
return cy.get(".nc-settings-audit");
return cy.get(".nc-settings-audit:visible").should("exist");
case this.APPSTORE:
return cy.get(".nc-settings-appstore");
return cy.get(".nc-settings-appstore:visible").should("exist");
case this.TEAM_N_AUTH:
return cy.get(".nc-settings-teamauth");
return cy.get(".nc-settings-teamauth:visible").should("exist");
case this.PROJ_METADATA:
return cy.get(".nc-settings-projmeta");
return cy.get(".nc-settings-projmeta:visible").should("exist");
case this.ROLE_VIEW_EDITOR:
return cy.get(".nc-preview-editor");
return cy.get(".nc-preview-editor:visible").should("exist");
case this.ROLE_VIEW_COMMENTER:
return cy.get(".nc-preview-commenter");
return cy.get(".nc-preview-commenter:visible").should("exist");
case this.ROLE_VIEW_VIEWER:
return cy.get(".nc-preview-viewer");
return cy.get(".nc-preview-viewer:visible").should("exist");
case this.ROLE_VIEW_RESET:
return cy.get(".nc-preview-reset");
return cy.get(".nc-preview-reset:visible").should("exist");
}
}
@@ -223,6 +227,8 @@ export class _mainPage {
cy.toastWait(
"Successfully installed and email notification will use SMTP configuration"
);
this.closeMetaTab();
};
resetSMTP = () => {
@@ -234,6 +240,8 @@ export class _mainPage {
.click({ force: true });
cy.getActiveModal().find("button").contains("Submit").click();
cy.toastWait("Plugin uninstalled successfully");
this.closeMetaTab();
};
shareView = () => {
@@ -291,9 +299,10 @@ export class _mainPage {
cy.get(".nc-sort-field-select div").first().click();
cy.snipActiveMenu("Menu_SortField_fieldSelection");
cy.get(`.menuable__content__active .v-list-item:contains(${field})`)
.first()
.click();
// cy.get(`.menuable__content__active .v-list-item:contains(${field})`)
// .first()
// .click();
cy.getActiveMenu().find(`.nc-sort-fld-${field}`).click();
cy.get(".nc-sort-dir-select div").first().click();
cy.snipActiveMenu("Menu_SortField_criteriaSelection");
cy.get(
@@ -310,22 +319,22 @@ export class _mainPage {
filterField = (field, operation, value) => {
cy.get(".nc-filter-menu-btn").click();
cy.wait(2000);
cy.contains("Add Filter").click();
cy.wait(2000);
cy.snipActiveMenu("Menu_FilterField");
cy.get(".nc-filter-field-select").last().click();
cy.get(".nc-filter-field-select").should("exist").last().click();
cy.snipActiveMenu("Menu_FilterField-fieldSelect");
cy.getActiveMenu()
.find(`.v-list-item:contains(${field})`)
.first()
.click();
cy.get(".nc-filter-operation-select").last().click();
cy.getActiveMenu().find(`.nc-filter-fld-${field}`).click();
cy.get(".nc-filter-operation-select").should("exist").last().click();
cy.snipActiveMenu("Menu_FilterField-operationSelect");
cy.getActiveMenu().find(`.v-list-item:contains(${operation})`).click();
if (operation != "is null" && operation != "is not null") {
cy.get(".nc-filter-value-select input:text")
.should("exist")
.last()
.type(`${value}`);
cy.get(".nc-filter-operation-select").last().click();
@@ -460,9 +469,11 @@ export class _mainPage {
closeMetaTab() {
// user href link to find meta mgmt tab
cy.get('[href="#disableOrEnableModel||||Meta Management"]')
.find("button.mdi-close")
.click({ force: true });
// cy.get('[href="#disableOrEnableModel||||Meta Management"]')
// .find("button.mdi-close")
// .click({ force: true });
cy.get("body").click("bottomRight");
// refresh
cy.refreshTableTab();
}
@@ -490,6 +501,16 @@ export class _mainPage {
// cy.toastWait(`Table metadata recreated successfully`);
// cy.get(`.nc-metasync-row-${tbl}`).should("exist");
}
tabReset() {
// temporary disable (kludge)
// mainPage.toolBarTopLeft(mainPage.HOME).click({ force: true });
// cy.get(".project-row").should("exist").click({ force: true });
// projectsPage.waitHomePageLoad();
// option-2
// cy.openTableTab("Country", 0);
// cy.get(".mdi-close").click({ multiple: true });
}
}
export const mainPage = new _mainPage();