Skip to content

Commit

Permalink
fixing e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sponglord committed Oct 9, 2023
1 parent 02e30bf commit da70aeb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/e2e/tests/cards/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const MAESTRO_CARD = '5000550000000029';
export const BCMC_CARD = '6703444444444449'; // actually dual branded bcmc & maestro
export const BCMC_DUAL_BRANDED_VISA = '4871049999999910'; // dual branded visa & bcmc
export const UNKNOWN_BIN_CARD = '135410014004955'; // card that is not in the test DBs (uatp)
export const UNKNOWN_VISA_CARD = '4111111111111111'; // card that is not in the test DBs (visa)
export const UNKNOWN_VISA_CARD = '41111111'; // card is now in the test DBs (visa) - so keep it short to stop it firing binLookup
export const AMEX_CARD = '370000000000002';

export const DUAL_BRANDED_CARD_EXCLUDED = '4001230000000004'; // dual branded visa/star
Expand Down
10 changes: 6 additions & 4 deletions packages/e2e/tests/issuerLists/ideal/ideal.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Selector, ClientFunction } from 'testcafe';
import { ISSUERLISTS_URL } from '../../pages';

fixture`Testing iDeal (IssuerLists)`.page(`${ISSUERLISTS_URL}?countryCode=NL`);
fixture.only`Testing iDeal (IssuerLists)`.page(`${ISSUERLISTS_URL}?countryCode=NL`);

const getComponentData = ClientFunction(() => {
return window.ideal.data;
Expand All @@ -14,13 +14,14 @@ test('should make an iDeal payment', async t => {
.expect(Selector('.adyen-checkout__dropdown__list').hasClass('adyen-checkout__dropdown__list--active'))
.ok();

await t.click(Selector('.adyen-checkout__dropdown__list').child(0));
await t.click(Selector('.adyen-checkout__dropdown__list').child(1));

const stateData = await getComponentData();

await t.expect(stateData.paymentMethod).eql({
type: 'ideal',
issuer: '1121'
issuer: '1121',
checkoutAttemptId: 'do-not-track'
});

await t.expect(stateData.clientStateDataIndicator).eql(true);
Expand All @@ -35,7 +36,8 @@ test('should make an iDeal payment using a highlighted issuer', async t => {

await t.expect(stateData.paymentMethod).eql({
type: 'ideal',
issuer: '1121'
issuer: '1121',
checkoutAttemptId: 'do-not-track'
});

await t.expect(stateData.clientStateDataIndicator).eql(true);
Expand Down

0 comments on commit da70aeb

Please sign in to comment.