Skip to content

test(cypress): Add E2E tests for promoting highlight annotations#623

Merged
mergify[bot] merged 2 commits intobox:masterfrom
mingzexiao6:test-highlight-promotion
Oct 9, 2020
Merged

test(cypress): Add E2E tests for promoting highlight annotations#623
mergify[bot] merged 2 commits intobox:masterfrom
mingzexiao6:test-highlight-promotion

Conversation

@mingzexiao6
Copy link
Contributor

No description provided.

@mingzexiao6 mingzexiao6 requested a review from a team as a code owner October 9, 2020 18:39
jstoffan
jstoffan previously approved these changes Oct 9, 2020
cy.getByTestId('ba-Layer--highlight');

// Assert that only one highlight annotation created in the above test is present
cy.get('.ba-HighlightTarget').should('have.length', 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can cypress tests be run individually? Seems like we should try to avoid relying on side effects of other tests if possible

Copy link
Collaborator

Choose a reason for hiding this comment

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

We would need to manually delete any existing annotations in a teardown step after each test and/or suite.

Copy link
Contributor

Choose a reason for hiding this comment

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

That or we could go back to that logic @mxiao6 had to count the annotations before and after so it's more of a relative check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about combining them into one test?

@mingzexiao6 mingzexiao6 force-pushed the test-highlight-promotion branch from ce1b300 to 8f779f2 Compare October 9, 2020 19:45
@mergify mergify bot merged commit 0d00b10 into box:master Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants