-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v6' into poc/component-tree-shaking-new-operator-v2
- Loading branch information
Showing
265 changed files
with
3,532 additions
and
3,182 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
'@adyen/adyen-web': major | ||
--- | ||
|
||
Redesign with Bento design tokens.\ | ||
Remove default placeholders, merchants can configure placeholders via the configuration object.\ | ||
Add `showContextualElement` and `contextualText` for the form field, merchants can configure them via configuration object.\ | ||
New spinner.\ | ||
Phone prefix drop down contains flag icons.\ | ||
Ideal issuer names align to the right.\ | ||
Fix the stored card icon overlapping with the error icon.\ | ||
Scss code refactoring.\ | ||
Use the same syntax for 'required' error message in the Personal details and Address components. |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
API_VERSION=v68 | ||
API_VERSION=v69 | ||
|
||
CHECKOUT_API_KEY= | ||
|
||
|
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
102 changes: 102 additions & 0 deletions
102
packages/e2e-playwright/tests/card/card.contextualTexts.spec.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,102 @@ | ||
import { test, expect } from '../../pages/cards/card.fixture'; | ||
import { AMEX_CARD } from '../utils/constants'; | ||
import LANG from '../../../lib/src/language/locales/en-US.json'; | ||
|
||
const EXPIRY_DATE_CONTEXTUAL_TEXT = LANG['creditCard.expiryDate.contextualText']; | ||
const CVC_CONTEXTUAL_TEXT_3_DIGITS = LANG['creditCard.securityCode.contextualText.3digits']; | ||
const CVC_CONTEXTUAL_TEXT_4_DIGITS = LANG['creditCard.securityCode.contextualText.4digits']; | ||
const CVC_ERROR = LANG['error.va.sf-cc-cvc.01']; | ||
|
||
test('#1 Should inspect the card inputs and see they have contextual elements set', async ({ cardPage }) => { | ||
const { card, page } = cardPage; | ||
|
||
await card.isComponentVisible(); | ||
|
||
// checkout expiryDate element | ||
await expect(card.expiryDateContextualElement).toHaveText(EXPIRY_DATE_CONTEXTUAL_TEXT); | ||
const expiryDateAriaHidden = await card.expiryDateContextualElement.getAttribute('aria-hidden'); | ||
await expect(expiryDateAriaHidden).toEqual('true'); | ||
|
||
// iframe expiryDate element | ||
await expect(card.expiryDateIframeContextualElement).toHaveText(EXPIRY_DATE_CONTEXTUAL_TEXT); | ||
|
||
// checkout security code contextual element | ||
await expect(card.cvcContextualElement).toHaveText(CVC_CONTEXTUAL_TEXT_3_DIGITS); | ||
const cvcAriaHidden = await card.cvcContextualElement.getAttribute('aria-hidden'); | ||
await expect(cvcAriaHidden).toEqual('true'); | ||
|
||
// iframe security code element | ||
await expect(card.cvcIframeContextualElement).toHaveText(CVC_CONTEXTUAL_TEXT_3_DIGITS); | ||
|
||
// Type amex number and see the contextual element change in the CVC field | ||
await card.typeCardNumber(AMEX_CARD); | ||
|
||
await expect(card.cvcContextualElement).toHaveText(CVC_CONTEXTUAL_TEXT_4_DIGITS); | ||
await expect(card.cvcIframeContextualElement).toHaveText(CVC_CONTEXTUAL_TEXT_4_DIGITS); | ||
|
||
// Delete the card number and see the contextual element reset in the CVC field | ||
await card.deleteCardNumber(); | ||
|
||
await expect(card.cvcContextualElement).toHaveText(CVC_CONTEXTUAL_TEXT_3_DIGITS); | ||
await expect(card.cvcIframeContextualElement).toHaveText(CVC_CONTEXTUAL_TEXT_3_DIGITS); | ||
}); | ||
|
||
test('#2 Should inspect the cvc input for a contextual text set, then it should be replaced by an error, then reset', async ({ cardPage }) => { | ||
const { card, page } = cardPage; | ||
|
||
await card.isComponentVisible(); | ||
|
||
// checkout security code contextual element | ||
await expect(card.cvcContextualElement).toHaveText(CVC_CONTEXTUAL_TEXT_3_DIGITS); | ||
let cvcAriaHidden = await card.cvcContextualElement.getAttribute('aria-hidden'); | ||
await expect(cvcAriaHidden).toEqual('true'); | ||
|
||
// error element hidden | ||
await expect(card.cvcErrorElement).not.toBeVisible(); | ||
|
||
// iframe security code contextual element | ||
await expect(card.cvcIframeContextualElement).toHaveText(CVC_CONTEXTUAL_TEXT_3_DIGITS); | ||
|
||
// press pay to generate errors | ||
await cardPage.pay(); | ||
|
||
// checkout security code error element | ||
await expect(card.cvcErrorElement).toBeVisible(); | ||
await expect(card.cvcErrorElement).toHaveText(CVC_ERROR); | ||
cvcAriaHidden = await card.cvcErrorElement.getAttribute('aria-hidden'); | ||
await expect(cvcAriaHidden).toEqual('true'); | ||
|
||
// contextual element being hidden | ||
await expect(card.cvcContextualElement).not.toBeVisible(); | ||
|
||
// iframe contextual (error) element | ||
await expect(card.cvcIframeContextualElement).toHaveText(CVC_ERROR); | ||
|
||
// Allow default focusing after validation to happen | ||
await page.waitForTimeout(1000); | ||
|
||
// type | ||
await card.typeCvc('737'); | ||
|
||
// reset | ||
await expect(card.cvcContextualElement).toBeVisible(); | ||
await expect(card.cvcContextualElement).toHaveText(CVC_CONTEXTUAL_TEXT_3_DIGITS); | ||
// error element hidden | ||
await expect(card.cvcErrorElement).not.toBeVisible(); | ||
|
||
await expect(card.cvcIframeContextualElement).toHaveText(CVC_CONTEXTUAL_TEXT_3_DIGITS); | ||
}); | ||
|
||
test('#3 Should find no contextualElements because the config says to not show them', async ({ cardNoContextualElementPage }) => { | ||
const { card, page } = cardNoContextualElementPage; | ||
|
||
await card.isComponentVisible(); | ||
|
||
// checkout contextual elements not present | ||
await expect(card.expiryDateContextualElement).not.toBeVisible(); | ||
await expect(card.cvcContextualElement).not.toBeVisible(); | ||
|
||
// iframe contextual elements - present but without text | ||
await expect(card.expiryDateIframeContextualElement).toHaveText(''); | ||
await expect(card.cvcIframeContextualElement).toHaveText(''); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,6 @@ | |
"whatwg-fetch": "^3.6.2" | ||
}, | ||
"dependencies": { | ||
"@adyen/adyen-web": "5.50.1" | ||
"@adyen/adyen-web": "5.51.0" | ||
} | ||
} |
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
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
Oops, something went wrong.