Skip to content

test: add PDP/PLP add to cart dialog e2e test #20102

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

Merged
merged 13 commits into from
Apr 23, 2025
Merged

Conversation

uroslates
Copy link
Contributor

@uroslates uroslates requested a review from a team as a code owner March 20, 2025 10:58
@github-actions github-actions bot marked this pull request as draft March 20, 2025 10:58
@uroslates uroslates marked this pull request as ready for review March 20, 2025 11:04
Copy link

cypress bot commented Mar 20, 2025

spartacus    Run #47832

Run Properties:  status check passed Passed #47832  •  git commit 670d4f03ca ℹ️: Merge 04d6fbafd4195f691e00acac1b55595807edc247 into d66c5b24eaaa8dd74b7dc51f7f92...
Project spartacus
Branch Review feature/CXSPA-9645
Run status status check passed Passed #47832
Run duration 05m 01s
Commit git commit 670d4f03ca ℹ️: Merge 04d6fbafd4195f691e00acac1b55595807edc247 into d66c5b24eaaa8dd74b7dc51f7f92...
Committer Uros Lates
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 3
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 136
View all changes introduced in this branch ↗︎

Copy link
Contributor

@Pio-Bar Pio-Bar left a comment

Choose a reason for hiding this comment

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

Let's pull the latest develop changes and use the new a11yRunContinuumTest command.

@github-actions github-actions bot marked this pull request as draft April 7, 2025 07:44
@uroslates uroslates changed the title test: add PDP add to cart dialog e2e test test: add PDP/PLP add to cart dialog e2e test Apr 7, 2025
@uroslates uroslates requested a review from Pio-Bar April 7, 2025 09:36
@uroslates uroslates marked this pull request as ready for review April 7, 2025 09:36
});
});

context('Add to Cart (PLP)', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the modal triggered from a PLP any different to the one from elsewhere? If not, would one test be enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

Comment on lines 21 to 23
cy.get('cx-added-to-cart-dialog')
.get('.cx-modal-content')
.a11yRunContinuumTest();
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to get some content from the modal to make sure Cypress waits long enough. Currently the test runs on a mostly empty dialog.

Screenshot 2025-04-07 at 16 37 53

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied.

@github-actions github-actions bot marked this pull request as draft April 7, 2025 17:18
@uroslates uroslates marked this pull request as ready for review April 7, 2025 17:29
@uroslates uroslates requested a review from Pio-Bar April 7, 2025 17:29
Pio-Bar
Pio-Bar previously approved these changes Apr 8, 2025
it('Item Added to Cart Dialog', () => {
cy.visit(siteContextSelector.PRODUCT_PATH_2);
cy.get('cx-add-to-cart button[type=submit]').click();
cy.get('cx-added-to-cart-dialog .cx-modal-content cx-cart-item')
Copy link
Contributor

Choose a reason for hiding this comment

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

cy.get('cx-added-to-cart-dialog .cx-modal-content cx-cart-item') is fine for making sure that the dialog has loaded first. But then we should run the scope of this test on the entire dialog DOM.
cy.get('cx-added-to-cart-dialog').a11yRunContinuumTest();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied!

@github-actions github-actions bot marked this pull request as draft April 9, 2025 09:12
@uroslates uroslates marked this pull request as ready for review April 9, 2025 09:17
@uroslates uroslates requested a review from Zeyber April 9, 2025 09:17
Zeyber
Zeyber previously approved these changes Apr 10, 2025
@github-actions github-actions bot marked this pull request as draft April 12, 2025 12:04
@uroslates uroslates marked this pull request as ready for review April 12, 2025 12:05
@github-actions github-actions bot marked this pull request as draft April 23, 2025 13:19
@Zeyber Zeyber marked this pull request as ready for review April 23, 2025 13:19
@github-actions github-actions bot marked this pull request as draft April 23, 2025 13:38
@Zeyber Zeyber marked this pull request as ready for review April 23, 2025 13:39
Copy link
Contributor

Merge Checks Failed

Please push a commit to re-trigger the build.
To push an empty commit you can use `git commit --allow-empty -m "Trigger Build"`

@github-actions github-actions bot marked this pull request as draft April 23, 2025 13:40
@Zeyber Zeyber marked this pull request as ready for review April 23, 2025 13:40
Copy link
Contributor

Merge Checks Failed

Please push a commit to re-trigger the build.
To push an empty commit you can use `git commit --allow-empty -m "Trigger Build"`

@github-actions github-actions bot marked this pull request as draft April 23, 2025 14:40
@Zeyber Zeyber marked this pull request as ready for review April 23, 2025 14:42
@Zeyber Zeyber merged commit ba4b931 into develop Apr 23, 2025
33 checks passed
@Zeyber Zeyber deleted the feature/CXSPA-9645 branch April 23, 2025 15:08
rmch91 pushed a commit that referenced this pull request May 5, 2025
rmch91 pushed a commit that referenced this pull request May 5, 2025
rmch91 pushed a commit that referenced this pull request May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants