Added check for Stripe Pass in Stripe Connect test utils (#19633)

refs https://linear.app/tryghost/issue/ENG-599
- Portal tests occasionally failed without clear cause on CI, possibly
due to GH runner region
- Portal tests never successfully ran locally for US-based IPs because
of a required prompt for Stripe Pass
This commit is contained in:
Steve Larson 2024-01-31 11:52:09 -06:00 committed by GitHub
parent 123ccdb6f9
commit 1ed34aebac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -330,6 +330,14 @@ const completeStripeSubscription = async (page) => {
await fillInputIfExists(page, '#billingAddressLine2', 'Apt 1');
await fillInputIfExists(page, '#billingLocality', 'Testville');
// some regions have a stripe pass checkbox that blocks the submit button
if (await page.isVisible('#enableStripePass')) {
const checkbox = await page.locator('#enableStripePass');
if (await checkbox.isChecked()) {
await checkbox.uncheck();
}
}
// Wait for submit button complete
await page.waitForSelector('[data-testid="hosted-payment-submit-button"].SubmitButton--complete', {state: 'attached'});