Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft]changing the test so it gets to the delete&edit buttns #1237

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions cypress/e2e/models/migration/controls/tagcategory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,25 @@ import {
cancelForm,
click,
clickByText,
clickItemInKebabMenu,
confirm,
inputText,
performRowActionByIcon,
selectItemsPerPage,
selectUserPerspective,
submitForm,
} from "../../../../utils/utils";
import { navMenu, navTab } from "../../../views/menu.view";
import { button, controls, migration, SEC, tags, tdTag, trTag } from "../../../types/constants";
import {
button,
controls,
deleteAction,
migration,
SEC,
tags,
tdTag,
trTag,
} from "../../../types/constants";
import { createTagCategoryButton, rankInput } from "../../../views/tags.view";
import * as commonView from "../../../views/common.view";
import { clickTags, fillName } from "./tags";
Expand Down Expand Up @@ -90,12 +101,7 @@ export class TagCategory {

edit(updatedValue: { name?: string; rank?: number; color?: string }, cancel = false): void {
TagCategory.openList();
cy.get(tdTag)
.contains(this.name)
.parent(trTag)
.within(() => {
click(commonView.editButton);
});
performRowActionByIcon(this.name, commonView.pencilIcon);
if (cancel) {
cancelForm();
} else {
Expand All @@ -118,12 +124,8 @@ export class TagCategory {
delete(cancel = false): void {
// Opening tags list only if another tab is opened
TagCategory.openList();
cy.get(tdTag, { timeout: 2 * SEC })
.contains(this.name)
.parent(trTag)
.within(() => {
click(commonView.deleteButton);
});

clickItemInKebabMenu(this.name, deleteAction);
if (cancel) {
click(commonView.confirmCancelButton);
} else {
Expand Down
3 changes: 2 additions & 1 deletion cypress/e2e/models/migration/controls/tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
applyAction,
confirm,
click,
performRowActionByIcon,
} from "../../../../utils/utils";
import {
dropdownMenuToggle,
Expand Down Expand Up @@ -114,7 +115,7 @@ export class Tag {
edit(updatedValue: { name?: string; tagcategory?: string }, cancel = false): void {
Tag.openList();
expandRowDetails(this.tagCategory);
this.clickTagAction(editAction);
performRowActionByIcon(this.name, commonView.pencilIcon);
if (cancel) {
cancelForm();
} else {
Expand Down
Loading