-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CXSPA-3836 first e2e test for configurator integration (#17636)
- Loading branch information
1 parent
ca2b9ef
commit 1ed5e63
Showing
4 changed files
with
124 additions
and
8 deletions.
There are no files selected for viewing
70 changes: 70 additions & 0 deletions
70
...storefrontapp-e2e-cypress/cypress/e2e/regression/quote/quote-configurator.e2e-flaky.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 SAP Spartacus team <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import * as quote from '../../../helpers/quote'; | ||
import * as cart from '../../../helpers/cart'; | ||
import * as configurationCart from '../../../helpers/product-configurator-cart'; | ||
import * as configuratorOverview from '../../../helpers/product-configurator-overview'; | ||
|
||
const POWERTOOLS = 'powertools-spa'; | ||
const testProductConfigurable = 'CONF_BANDSAW_ML'; | ||
const testProductConfigurableWithIssues = 'CONF_SCREWDRIVER_S'; | ||
const testProductConfigurableTextfield = '2116282'; | ||
const EMAIL = '[email protected]'; | ||
const PASSWORD = '12341234'; | ||
const USER = 'Gi Sun'; | ||
|
||
context('Quote<->Configurator integration', () => { | ||
beforeEach(() => { | ||
cy.visit('/'); | ||
quote.login(EMAIL, PASSWORD, USER); | ||
}); | ||
|
||
describe('Request quote process with VC configurable product', () => { | ||
it('should not allow to request quote if configuration has issues', () => { | ||
quote.addProductToCartForQuotePreparation( | ||
POWERTOOLS, | ||
testProductConfigurableWithIssues, | ||
'1' | ||
); | ||
quote.clickOnRequestQuoteInCart(); | ||
|
||
//we are still in cart, for now just check that | ||
//TODO check for messages once https://jira.tools.sap/browse/CXSPA-4079 is done | ||
cy.get('cx-cart-details').should('exist'); | ||
|
||
//remove conflicting entry | ||
cart.removeCartItem({ name: testProductConfigurableWithIssues }); | ||
}); | ||
|
||
it('should support creation of a draft quote including VC configurable product', () => { | ||
quote.requestQuote(POWERTOOLS, testProductConfigurable, '1'); | ||
|
||
//check: quote is in status draft | ||
quote.checkQuoteInDraftState(false, testProductConfigurable); | ||
|
||
//check: we can navigate to the VC overview page | ||
configurationCart.clickOnDisplayConfigurationLink(0); | ||
cy.get('cx-configurator-overview-sidebar').should('be.visible'); | ||
|
||
//check: back navigation is possible | ||
configuratorOverview.clickContinueToCartBtnOnOPAndExpectQuote(); | ||
}); | ||
}); | ||
|
||
describe('Request quote process with textfield configurable product', () => { | ||
it('should support creation of a draft quote including textfield configurable product', () => { | ||
quote.requestQuote(POWERTOOLS, testProductConfigurableTextfield, '1'); | ||
|
||
//check: quote is in status draft | ||
quote.checkQuoteInDraftState(false, testProductConfigurableTextfield); | ||
|
||
//check: we can navigate to the textfield configurator form | ||
configurationCart.clickOnDisplayConfigurationLink(0); | ||
cy.get('cx-configurator-textfield-form').should('be.visible'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters