-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
E2e quote details page tabbing test (#17974)
Co-authored-by: Ulrich Stellmacher <[email protected]> Co-authored-by: steinsebastian <[email protected]>
- Loading branch information
1 parent
aa3e366
commit b0a1583
Showing
2 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
projects/storefrontapp-e2e-cypress/cypress/e2e/accessibility/quote-tabbing.e2e.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,52 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 SAP Spartacus team <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { verifyTabbingOrder } from '../../helpers/accessibility/tabbing-order'; | ||
import * as quote from '../../helpers/quote'; | ||
import { clickAllowAllFromBanner } from '../../helpers/anonymous-consents'; | ||
import { tabbingOrderConfig } from '../../helpers/accessibility/b2b/tabbing-order.config'; | ||
|
||
const containerSelectorQuoteDetails = 'main'; | ||
const POWERTOOLS = 'powertools-spa'; | ||
const TEST_PRODUCT_HAMMER_DRILLING_ID = '3887130'; | ||
const BUYER_EMAIL = '[email protected]'; | ||
const BUYER_PASSWORD = '12341234'; | ||
const BUYER_USER = 'Gi Sun'; | ||
const MSG_TYPE_WARNING = '[GlobalMessage] Warning'; | ||
const PRODUCT_AMOUNT_30: number = 30; | ||
|
||
describe('Tabbing order for Quote', () => { | ||
context('Quote', () => { | ||
let globalMessageSettings: any; | ||
beforeEach(() => { | ||
globalMessageSettings = { | ||
globalMessages: { | ||
[MSG_TYPE_WARNING]: { | ||
timeout: 10000, | ||
}, | ||
}, | ||
}; | ||
cy.cxConfig(globalMessageSettings); | ||
cy.visit('/'); | ||
clickAllowAllFromBanner(); | ||
quote.login(BUYER_EMAIL, BUYER_PASSWORD, BUYER_USER); | ||
quote.registerGetQuoteRoute(POWERTOOLS); | ||
quote.prepareQuote( | ||
POWERTOOLS, | ||
TEST_PRODUCT_HAMMER_DRILLING_ID, | ||
PRODUCT_AMOUNT_30, | ||
true | ||
); | ||
}); | ||
|
||
it('should allow to navigate with tab key within the quote details page', () => { | ||
verifyTabbingOrder( | ||
containerSelectorQuoteDetails, | ||
tabbingOrderConfig.quoteDetailsPage | ||
); | ||
}); | ||
}); | ||
}); |
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