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

test: migrate markdown editor to component tests [TOL-1355] #1553

Merged
merged 5 commits into from
Feb 19, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
test: force selectall
  • Loading branch information
MayaGillilan committed Feb 14, 2024
commit 47403c63f0ef871892dabb63451b1c01fbbc11c6
4 changes: 2 additions & 2 deletions cypress/component/markdown/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ const getInput = () => {
};

export const type = (value: string): Cypress.Chainable => {
return getInput().focus().type(value, { force: true });
return getInput().type(value, { force: true });
};

export const clearAll = (): void => {
//Using extra select all because of flakiness with a single clear
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✂️

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment looks like excessive?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, I didn't want to assume it would be obvious since clear() also does .type('{selectall}'), but we could remove it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, then makes sense! Maybe mention it there then for those who didn't know that (me)?

getInput().type('{selectall}{selectall}').clear({ force: true });
getInput().type('{selectall}', { force: true }).clear({ force: true });
checkRemoved();
};

Expand Down
Loading