Skip to content

Commit

Permalink
Removing stipe side of purchase test
Browse files Browse the repository at this point in the history
  • Loading branch information
bardsley committed Aug 13, 2024
1 parent 02ad224 commit 6d0e5fd
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions tests/pass/selector.mobile.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,17 @@ test('buying a full pass', async ({ page }: {page: Page}) => {
await page.getByRole('button', { name: 'Continue' }).click();
// await page.waitForTimeout(3000);
await expect(page.locator('#checkout')).toBeVisible()
const stripeIframe = await page.waitForSelector('#checkout iframe')
const stripeFrame = await stripeIframe.contentFrame()
await stripeFrame.getByLabel('Card number').fill('4111111111111111');
await stripeFrame.getByLabel('Expiration').fill('04/30');
await stripeFrame.getByPlaceholder('CVC').fill('242');
await stripeFrame.getByPlaceholder('Full name on card').fill(fullName);
await stripeFrame.getByLabel('Postal code').fill('AB12 3DE');
await page.screenshot({ path: './test-results/pass/checkout-page-filled-out.png', fullPage: true })

await stripeFrame.getByTestId('hosted-payment-submit-button').click(); // DEoesn't submit form, not sure why but also we can test other side of it without stripe
// Getting rid off stripe test, we'll do that via API testing
// const stripeIframe = await page.waitForSelector('#checkout iframe')
// const stripeFrame = await stripeIframe.contentFrame()
// await stripeFrame.getByLabel('Card number').fill('4111111111111111');
// await stripeFrame.getByLabel('Expiration').fill('04/30');
// await stripeFrame.getByPlaceholder('CVC').fill('242');
// await stripeFrame.getByPlaceholder('Full name on card').fill(fullName);
// await stripeFrame.getByLabel('Postal code').fill('AB12 3DE');
// await page.screenshot({ path: './test-results/pass/checkout-page-filled-out.png', fullPage: true })

// await stripeFrame.getByTestId('hosted-payment-submit-button').click(); // DEoesn't submit form, not sure why but also we can test other side of it without stripe

});

0 comments on commit 6d0e5fd

Please sign in to comment.