-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
🦋 Changeset detectedLatest commit: 87b37b5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
- 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.
*/ | ||
cy.visit(urlList.sales); | ||
createSale({ | ||
saleName, | ||
channelName: channel.name, | ||
discountValue, | ||
}); | ||
// Make sure the product is searchable before assigning |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Remove unnecessary comments
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
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
* 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]>
What type of PR is this?
Related Issues or Documents
Usage Instructions, Screenshots, Recordings
Have you written tests?
[Optional] Description