Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add iDEAL 2.0 test cases #89

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @ts-check
const { test, expect } = require('@playwright/test');

// test for iDEAL2
test('iDEAL', async ({ page }) => {
await page.goto('/');

Expand All @@ -10,27 +11,26 @@ test('iDEAL', async ({ page }) => {
// Select "iDEAL"
await page.getByRole('link', { name: 'iDEAL' }).click();
await expect(page.locator('text="Cart"')).toBeVisible();

// Click "Continue to checkout"
await page.getByRole('link', { name: 'Continue to checkout' }).click();

// Click "Continue to iDEAL"
await page.getByRole('button', { name: 'Continue to iDEAL' }).click();
await expect(page.locator('text="Scan with your banking app to pay"')).toBeVisible();

// Click "Select your bank"
const selectButton = await page.getByTitle('Select your bank');
if (await selectButton.count() === 0) {
// Click radio button for > Adyen-Web 5.53.x or higher
await page.getByPlaceholder('Search...').click();
} else {
await selectButton.click();
}
await page.getByRole('button', { name: 'Select your bank' }).click();

// Choose "Test Issuer"
await page.getByText('Test Issuer', { exact: true }).click();
// Click "TESTNL2A"
await page.getByRole('button', { name: 'TESTNL2A' }).click();
await expect(page.locator('text="Which test simulation to run?"')).toBeVisible();

// Click "Continue to Test Issuer"
await page.getByRole('button', { name: 'Continue to Test Issuer' }).click();
await expect(page.locator('text="iDEAL Issuer Simulation"')).toBeVisible();
// Click "Success"
await page.getByRole('button', { name: 'Success' }).click();

// Click "Continue"
await page.getByRole('button', { name: 'Continue' }).click();
await page.getByRole('link', { name: 'Return Home' }).click();

});

30 changes: 0 additions & 30 deletions tests/checkout/ideal.spec.js

This file was deleted.

36 changes: 36 additions & 0 deletions tests/checkout/ideal.spec.js.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// @ts-check
const { test, expect } = require('@playwright/test');

// test for iDEAL2
test('iDEAL', async ({ page }) => {
await page.goto('/');

await expect(page).toHaveTitle(/Checkout Demo Advanced/);
await expect(page.locator('text="Select a demo"')).toBeVisible();

// Select "iDEAL"
await page.getByRole('link', { name: 'iDEAL' }).click();
await expect(page.locator('text="Cart"')).toBeVisible();

// Click "Continue to checkout"
await page.getByRole('link', { name: 'Continue to checkout' }).click();

// Click "Continue to iDEAL"
await page.getByRole('button', { name: 'Continue to iDEAL' }).click();
await expect(page.locator('text="Scan with your banking app to pay"')).toBeVisible();

// Click "Select your bank"
await page.getByRole('button', { name: 'Select your bank' }).click();

// Click "TESTNL2A"
await page.getByRole('button', { name: 'TESTNL2A' }).click();
await expect(page.locator('text="Which test simulation to run?"')).toBeVisible();

// Click "Success"
await page.getByRole('button', { name: 'Success' }).click();

// Click "Continue"
await page.getByRole('link', { name: 'Return Home' }).click();

});

Loading