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

[QA] Fix tests for SALEOR_1801, SALEOR_1802 & SALEOR_3002 #4852

Merged
merged 8 commits into from
May 14, 2024

Conversation

michalina-graczyk
Copy link
Member

@michalina-graczyk michalina-graczyk commented May 9, 2024

What type of PR is this?

  • 💅 Refactor
  • 🌟 Feature
  • 🔥 Bug Fix
  • 🔩 Maintenance
  • 🛠 Workflow CI/CD changes

Related Issues or Documents

  • closes #

Usage Instructions, Screenshots, Recordings

Have you written tests?

  • Yes!
  • No... here is why: Writing tests are mandatory, please replace this text with why test are not included in this PR

[Optional] Description

Copy link

changeset-bot bot commented May 9, 2024

🦋 Changeset detected

Latest commit: 87b37b5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
saleor-dashboard Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@szczecha szczecha changed the base branch from main to 3.18 May 10, 2024 08:27
- product being available in search
- product variant being set to onSale

Resolves issues with
- Unable to find product while assigning from discounts
- Checking discounted value too quickly before the sale got processed.
@github-actions github-actions bot temporarily deployed to pr-fix-tests-for-1801-1802 May 11, 2024 20:41 Destroyed
@github-actions github-actions bot temporarily deployed to storybook pr-fix-tests-for-1801-1802 May 11, 2024 20:41 Destroyed
@github-actions github-actions bot temporarily deployed to pr-fix-tests-for-1801-1802 May 11, 2024 20:45 Destroyed
@github-actions github-actions bot temporarily deployed to storybook pr-fix-tests-for-1801-1802 May 11, 2024 20:45 Destroyed
@michalina-graczyk michalina-graczyk marked this pull request as ready for review May 11, 2024 20:45
@michalina-graczyk michalina-graczyk requested review from a team, andrzejewsky and poulch and removed request for a team May 11, 2024 20:45
@michalina-graczyk michalina-graczyk changed the title WIP - Fix tests for 1801 1802 Fix tests for 1801 1802 May 11, 2024
@github-actions github-actions bot temporarily deployed to storybook pr-fix-tests-for-1801-1802 May 11, 2024 20:52 Destroyed
@github-actions github-actions bot temporarily deployed to pr-fix-tests-for-1801-1802 May 11, 2024 20:52 Destroyed
@michalina-graczyk michalina-graczyk changed the title Fix tests for 1801 1802 [QA] Fix tests for 1801 1802 May 13, 2024
@michalina-graczyk michalina-graczyk requested a review from a team May 13, 2024 08:44
*/
cy.visit(urlList.sales);
createSale({
saleName,
channelName: channel.name,
discountValue,
});
// Make sure the product is searchable before assigning
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Remove unnecessary comments

Copy link
Member Author

Choose a reason for hiding this comment

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

Tbh I left it intentionally, it is easier to read the code but I can remove it

@@ -146,6 +146,7 @@ describe("As a staff user I want to manage apps", () => {
.click()
.get(BUTTON_SELECTORS.confirm)
.click()
.wait(3000)
Copy link
Contributor

Choose a reason for hiding this comment

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

I thought that we've agreed to not add explicit waits and instead we should wait for a specific action/element.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes but in this case, we want to make it work. It is Cypress that we are removing, it is a temporary quick solution

throw new Error(
`Product with name ${productName} is not visible in search results. Retried for ${retries} times`,
`Product with name ${productName} is not visible in search results. Retried for ${maxRetries} times`,
);
} else {
cy.wait(5000);
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

Copy link
Member Author

Choose a reason for hiding this comment

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

this one was before my changes

@michalina-graczyk michalina-graczyk merged commit ad6c8b7 into 3.18 May 14, 2024
17 of 19 checks passed
@michalina-graczyk michalina-graczyk deleted the fix-tests-for-1801-1802 branch May 14, 2024 09:24
michalina-graczyk added a commit that referenced this pull request May 15, 2024
* Add fixes

* WIP

* wip

* Added waiting for:
- product being available in search
- product variant being set to onSale

Resolves issues with
- Unable to find product while assigning from discounts
- Checking discounted value too quickly before the sale got processed.

* Revert package-lock.json

* Add missing LB

* Add changeset

* Add quick fix for SALEOR_3002

---------

Co-authored-by: wojteknowacki <[email protected]>
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