-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/cxspa 4235 - cypress tests seller edit (#17838)
Cypress test for seller edit: -added test story for the seller edit process new functionality tests: - seller edit mode - change expiry date - give discount - submit quote (seller) Co-authored-by: Ulrich Stellmacher <[email protected]>
- Loading branch information
1 parent
9e40555
commit 029a457
Showing
2 changed files
with
260 additions
and
4 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -12,6 +12,8 @@ const TEST_PRODUCT_HAMMER_DRILLING_NAME = 'DH40MR'; | |
const BUYER_EMAIL = '[email protected]'; | ||
const BUYER_PASSWORD = '12341234'; | ||
const BUYER_USER = 'Gi Sun'; | ||
const SALESREP_EMAIL = '[email protected]'; | ||
const SALESREP_PASSWORD = '12341234'; | ||
const MSG_TYPE_WARNING = '[GlobalMessage] Warning'; | ||
const PRODUCT_AMOUNT_30: number = 30; | ||
|
||
|
@@ -90,8 +92,8 @@ context('Quote', () => { | |
quote.checkItemQuantity(itemIndex, (PRODUCT_AMOUNT_30 + 1).toString()); | ||
quote.changeItemQuantityByStepper(itemIndex, '-'); | ||
quote.checkItemQuantity(itemIndex, PRODUCT_AMOUNT_30.toString()); | ||
quote.changeItemQuantityByCounter(1, '1'); | ||
quote.checkItemQuantity(itemIndex, '1'); | ||
quote.changeItemQuantityByCounter(itemIndex, '10'); | ||
quote.checkItemQuantity(itemIndex, '10'); | ||
quote.checkSubmitBtn(false); | ||
quote.checkItemVisible(itemIndex, TEST_PRODUCT_HAMMER_DRILLING_ID); | ||
quote.removeItem(itemIndex); | ||
|
@@ -137,4 +139,31 @@ context('Quote', () => { | |
quote.checkQuoteState(quote.STATUS_CANCELED); | ||
}); | ||
}); | ||
|
||
describe('Edit quote process - seller (sales assistant) perspective (CXSPA-4235)', () => { | ||
beforeEach(() => { | ||
quote.prepareQuote( | ||
POWERTOOLS, | ||
TEST_PRODUCT_HAMMER_DRILLING_ID, | ||
PRODUCT_AMOUNT_30, | ||
true | ||
); | ||
quote.submitQuote(); | ||
quote.checkQuoteState(quote.STATUS_SUBMITTED); | ||
quote.logoutBuyer(POWERTOOLS); | ||
quote.enableASMMode(POWERTOOLS); | ||
quote.loginASM(POWERTOOLS, SALESREP_EMAIL, SALESREP_PASSWORD); | ||
quote.selectCustomerAndOpenQuote(POWERTOOLS, BUYER_EMAIL); | ||
quote.enableEditQuoteMode(); | ||
}); | ||
it('Should set an expiry date, give a discount and submit the quote', () => { | ||
quote.setExpiryDate(); | ||
quote.checkExpiryDate(); | ||
quote.checkTotalEstimatedPrice('$26,160.00'); | ||
quote.setDiscount('100'); | ||
quote.checkTotalEstimatedPrice('$26,060.00'); | ||
quote.submitQuote(); | ||
quote.checkQuoteState(quote.STATUS_SUBMITTED); | ||
}); | ||
}); | ||
}); |
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