Fix flaky test for creating variant (#2032)
* fix flaky test for creating variant * fix flaky
This commit is contained in:
parent
9c2ed377cc
commit
97eeccc917
3 changed files with 8 additions and 4 deletions
|
@ -88,7 +88,7 @@ filterTests({ definedTags: ["all", "critical", "refactored"] }, () => {
|
|||
price,
|
||||
attribute: attributeValues[0]
|
||||
});
|
||||
enterHomePageChangeChannelAndReturn(defaultChannel.name);
|
||||
selectChannelInHeader(defaultChannel.name);
|
||||
variantsShouldBeVisible({ name, price });
|
||||
getProductVariants(createdProduct.id, defaultChannel.slug);
|
||||
})
|
||||
|
|
|
@ -46,6 +46,7 @@ export function createFirstVariant({
|
|||
cy.addAliasToGraphRequest("ProductVariantBulkCreate")
|
||||
.get(VARIANTS_SELECTORS.nextButton)
|
||||
.click()
|
||||
.confirmationMessageShouldAppear()
|
||||
.waitForRequestAndCheckIfNoErrors("@ProductVariantBulkCreate")
|
||||
.waitForProgressBarToNotBeVisible()
|
||||
.get(AVAILABLE_CHANNELS_FORM.menageChannelsButton)
|
||||
|
@ -68,7 +69,9 @@ export function createVariant({
|
|||
.get(VARIANTS_SELECTORS.skuInput)
|
||||
.should("be.enabled")
|
||||
.get(BUTTON_SELECTORS.back)
|
||||
.click();
|
||||
.click()
|
||||
.get(PRODUCT_DETAILS.productNameInput)
|
||||
.should("be.enabled");
|
||||
selectChannelForVariantAndFillUpPrices({
|
||||
channelName,
|
||||
variantName: attributeName,
|
||||
|
|
|
@ -64,8 +64,9 @@ export function selectChannelInPicker(channelName) {
|
|||
export function selectChannelInHeader(channelName) {
|
||||
cy.get(HEADER_SELECTORS.channelSelect).click();
|
||||
cy.contains(SHARED_ELEMENTS.selectOption, channelName)
|
||||
.scrollIntoView()
|
||||
.click();
|
||||
.click({ force: true })
|
||||
.get(SHARED_ELEMENTS.selectOption)
|
||||
.should("not.exist");
|
||||
}
|
||||
|
||||
export function selectChannelInDetailsPages(channelName) {
|
||||
|
|
Loading…
Reference in a new issue