Skip to content

Commit

Permalink
Fix Text: ensure that oauth2 accept button is clicked if required
Browse files Browse the repository at this point in the history
  • Loading branch information
paustint committed Nov 3, 2024
1 parent 35e254f commit d75b540
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/jetstream-e2e/src/pageObjectModels/OrganizationsPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ export class OrganizationsPage {
await salesforcePage.getByLabel('Password').click();
await salesforcePage.getByLabel('Password').fill(password);

const pageClosePromise = salesforcePage.waitForEvent('close');
const pageClosePromise = salesforcePage.waitForEvent('close', { timeout: 30000 });

await salesforcePage.getByRole('button', { name: 'Log In' }).click();

try {
const allowLocator = this.page.getByRole('button', { name: 'Allow' });
await expect(allowLocator).toBeVisible({ timeout: 5000 });
const allowLocator = salesforcePage.getByRole('button', { name: 'Allow' });
await expect(allowLocator).toBeVisible({ timeout: 1000 });
await allowLocator.click();
} catch {
// ignore error - this is expected if the org is already authorized
Expand Down

0 comments on commit d75b540

Please sign in to comment.