-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: e2e tests for riverty * chore: linting DE.spec.mjs * chore: changing test name and linting * fix: fixing the tests for sfra5 * chore: removing test.only * fix: fixing locator for klarna tests
- Loading branch information
Showing
8 changed files
with
82 additions
and
14 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 |
---|---|---|
|
@@ -34,4 +34,8 @@ | |
}, { | ||
"id": "ja_JP", | ||
"currencyCode": "JPY" | ||
}, | ||
{ | ||
"id": "de_DE", | ||
"currencyCode": "EUR" | ||
}] |
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 |
---|---|---|
|
@@ -7,4 +7,5 @@ export const regionsEnum = { | |
SE: 'sv_SE', | ||
IN: 'hi_IN', | ||
JP: 'ja_JP', | ||
DE: 'de_DE', | ||
}; |
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 |
---|---|---|
|
@@ -233,4 +233,21 @@ export class ShopperData { | |
houseNumberOrName: '37', | ||
}, | ||
}; | ||
DERiverty = { | ||
shopperName: { | ||
firstName: 'John', | ||
lastName: 'Doe', | ||
}, | ||
telephone: '0513744112', | ||
successShopperEmail: '[email protected]', | ||
refusalShopperEmail: '[email protected]', | ||
address: { | ||
city: 'Verl', | ||
country: 'DE', | ||
stateOrProvince: '', | ||
postalCode: '33415', | ||
street: 'Gütersloher Str.', | ||
houseNumberOrName: '123', | ||
}, | ||
}; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -157,9 +157,9 @@ export default class CheckoutPageSFRA5 { | |
await this.submitShipping(); | ||
}; | ||
|
||
setEmail = async () => { | ||
setEmail = async (email = '[email protected]') => { | ||
await this.checkoutPageUserEmailInput.fill(''); | ||
await this.checkoutPageUserEmailInput.fill('[email protected]'); | ||
await this.checkoutPageUserEmailInput.fill(email); | ||
// Pressing Tab to simulate component re-rendering and waiting the components to re-mount | ||
await this.page.keyboard.press('Tab'); | ||
await new Promise(r => setTimeout(r, 2000)); | ||
|
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 |
---|---|---|
|
@@ -100,12 +100,12 @@ export default class CheckoutPageSFRA { | |
await this.page.goto(this.getCartUrl(locale)); | ||
} | ||
|
||
goToCheckoutPageWithFullCart = async (locale, itemCount = 1) => { | ||
goToCheckoutPageWithFullCart = async (locale, itemCount = 1, email) => { | ||
await this.addProductToCart(locale, itemCount); | ||
await this.successMessage.waitFor({ visible: true, timeout: 20000 }); | ||
|
||
await this.navigateToCheckout(locale); | ||
await this.setEmail(); | ||
await this.setEmail(email); | ||
await this.checkoutGuest.click(); | ||
}; | ||
|
||
|
@@ -165,13 +165,13 @@ export default class CheckoutPageSFRA { | |
await this.submitShipping(); | ||
}; | ||
|
||
setEmail = async () => { | ||
setEmail = async (email = '[email protected]') => { | ||
/* After filling the shopper details, clicking "Next" has an autoscroll | ||
feature, which leads the email field to be missed, hence the flakiness. | ||
Waiting until the full page load prevents this situation */ | ||
await this.page.waitForLoadState('networkidle'); | ||
await this.checkoutPageUserEmailInput.fill(''); | ||
await this.checkoutPageUserEmailInput.fill('[email protected]'); | ||
await this.checkoutPageUserEmailInput.fill(email); | ||
}; | ||
|
||
submitShipping = async () => { | ||
|
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