-
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.
test: enable asm e2e tests skiped (#17593)
- Loading branch information
1 parent
c4f66e0
commit 170bcda
Showing
2 changed files
with
64 additions
and
23 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 |
---|---|---|
|
@@ -4,16 +4,20 @@ | |
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { clearAllStorage } from '../../../../support/utils/clear-all-storage'; | ||
import * as asm from '../../../../helpers/asm'; | ||
import { addB2bProductToCartAndCheckout } from '../../../../helpers/b2b/b2b-checkout'; | ||
import * as checkout from '../../../../helpers/checkout-flow'; | ||
import { ELECTRONICS_BASESITE } from '../../../../helpers/checkout-flow'; | ||
import { POWERTOOLS_BASESITE } from '../../../../sample-data/b2b-checkout'; | ||
import { user } from '../../../../sample-data/checkout-flow'; | ||
import { register } from '../../../../helpers/auth-forms'; | ||
import { addB2bProductToCartAndCheckout } from '../../../../helpers/b2b/b2b-checkout'; | ||
import { clearAllStorage } from '../../../../support/utils/clear-all-storage'; | ||
import { interceptGet } from '../../../../support/utils/intercept'; | ||
|
||
context('B2B - Assisted Service Module', () => { | ||
const customer = { | ||
fullName: 'William Hunter', | ||
email: '[email protected]', | ||
}; | ||
|
||
before(() => { | ||
clearAllStorage(); | ||
}); | ||
|
@@ -27,24 +31,21 @@ context('B2B - Assisted Service Module', () => { | |
Cypress.env('BASE_SITE', ELECTRONICS_BASESITE); | ||
}); | ||
|
||
// This test only works if "sap-commerce-cloud-user-id" is added to the allowed headers of "corsfilter.commercewebservices.allowedHeaders" on the Commerce Cloud side (CXSPA-1355) | ||
it.skip("should fetch cost centers based on the emulated user's role", () => { | ||
it("should fetch cost centers based on the emulated user's role", () => { | ||
cy.cxConfig({ | ||
context: { | ||
baseSite: ['powertools-spa'], | ||
currency: ['USD'], | ||
}, | ||
}); | ||
|
||
cy.visit('/', { qs: { asm: true } }); | ||
|
||
cy.visit('/login/register'); | ||
|
||
register(user, true); | ||
|
||
cy.log('--> Agent logging in'); | ||
checkout.visitHomePage('asm=true'); | ||
cy.get('cx-asm-main-ui').should('exist'); | ||
cy.get('cx-asm-main-ui').should('be.visible'); | ||
asm.agentLogin('[email protected]', 'pw4all'); | ||
|
||
asm.startCustomerEmulation(user, true); | ||
cy.log('--> Agent emulate customer'); | ||
asm.startCustomerEmulation(customer, true); | ||
|
||
addB2bProductToCartAndCheckout(); | ||
|
||
|
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