Browse Source

test: CY corrections post rebase

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/3563/head
Raju Udava 2 years ago
parent
commit
1d0ad20cfc
  1. 19
      scripts/cypress/integration/common/4h_kanban.js
  2. 8
      scripts/cypress/support/commands.js

19
scripts/cypress/integration/common/4h_kanban.js

@ -46,6 +46,7 @@ function verifyKanbanStackOrder(order) {
function verifyKanbanStackFooterCount(count) { function verifyKanbanStackFooterCount(count) {
cy.get(".nc-kanban-stack").each(($el, index) => { cy.get(".nc-kanban-stack").each(($el, index) => {
cy.wrap($el) cy.wrap($el)
.scrollIntoView()
.find(".nc-kanban-data-count") .find(".nc-kanban-data-count")
.should( .should(
"contain", "contain",
@ -329,6 +330,7 @@ export const genTest = (apiType, dbType) => {
}); });
it("Add stack", () => { it("Add stack", () => {
cy.viewOpen("kanban", 0);
cy.get(".nc-kanban-add-edit-stack-menu-btn").should("exist").click(); cy.get(".nc-kanban-add-edit-stack-menu-btn").should("exist").click();
cy.getActiveMenu(".nc-dropdown-kanban-add-edit-stack-menu").should( cy.getActiveMenu(".nc-dropdown-kanban-add-edit-stack-menu").should(
"be.visible" "be.visible"
@ -371,9 +373,7 @@ export const genTest = (apiType, dbType) => {
// expand back // expand back
cy.get(".nc-kanban-collapsed-stack").click(); cy.get(".nc-kanban-collapsed-stack").click();
cy.get(".nc-kanban-collapsed-stack") cy.get(".nc-kanban-collapsed-stack").should("not.exist");
.should("not.exist")
.should("have.length", 0);
}); });
it("Add record to stack", () => { it("Add record to stack", () => {
@ -426,15 +426,7 @@ export const genTest = (apiType, dbType) => {
"NC-17", "NC-17",
"Test", "Test",
]); ]);
verifyKanbanStackFooterCount([ verifyKanbanStackFooterCount(["0", "4", "5", "8", "6", "6", "1"]);
"0",
"178",
"194",
"223",
"195",
"210",
"1",
]);
mainPage.toggleShowSystemFields(); mainPage.toggleShowSystemFields();
}); });
@ -447,7 +439,7 @@ export const genTest = (apiType, dbType) => {
cy.get(".nc-expand-col-Title") cy.get(".nc-expand-col-Title")
.find(".nc-cell > input") .find(".nc-cell > input")
.then(($el) => { .then(($el) => {
expect($el[0].value).to.have.string("ACE GOLDFINGER"); expect($el[0].value).to.have.string("BAREFOOT MANCHURIAN");
}); });
cy.get("body").type("{esc}"); cy.get("body").type("{esc}");
}); });
@ -475,6 +467,7 @@ export const genTest = (apiType, dbType) => {
"R", "R",
"NC-17", "NC-17",
]); ]);
verifyKanbanStackFooterCount(["1", "4", "5", "8", "6", "6"]);
}); });
it("Delete Kanban view", () => { it("Delete Kanban view", () => {

8
scripts/cypress/support/commands.js

@ -592,6 +592,14 @@ Cypress.Commands.add("viewRename", (viewType, viewIndex, newName) => {
cy.get(`.nc-${viewType}-view-item`).contains(`${newName}`).should("exist"); cy.get(`.nc-${viewType}-view-item`).contains(`${newName}`).should("exist");
}); });
// viewOpen
// : open view by index (0-based, exclude default view)
//
Cypress.Commands.add("viewOpen", (viewType, viewIndex) => {
// click on view
cy.get(`.nc-${viewType}-view-item`).eq(viewIndex).click();
});
// openTableView // openTableView
// : open view by type & name // : open view by type & name
// //

Loading…
Cancel
Save