external-services-automation 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,10 +5,12 @@ export declare class PasswordSetupPage {
5
5
  readonly passwordInput: Locator;
6
6
  readonly confirmPasswordInput: Locator;
7
7
  readonly continueButton: Locator;
8
+ readonly dontUseMFAButton: Locator;
8
9
  constructor(page: Page);
9
10
  enterPassword(password: string): Promise<void>;
10
11
  enterConfirmPassword(password: string): Promise<void>;
11
12
  clickContinue(): Promise<void>;
12
13
  submitPasswordForm(password: string): Promise<void>;
13
14
  isOnPasswordSetupPage(): Promise<void>;
15
+ dontUseMFA(): Promise<void>;
14
16
  }
@@ -9,6 +9,7 @@ class PasswordSetupPage {
9
9
  this.passwordInput = page.locator('input[name="p_first_password"]');
10
10
  this.confirmPasswordInput = page.locator('input[name="p_second_password"]');
11
11
  this.continueButton = page.locator('button[type="submit"]:has-text("Continue")');
12
+ this.dontUseMFAButton = page.locator('//button[contains(text(), "multi-factor authentication")]');
12
13
  }
13
14
  async enterPassword(password) {
14
15
  await this.passwordInput.fill(password);
@@ -30,5 +31,10 @@ class PasswordSetupPage {
30
31
  await (0, test_1.expect)(this.confirmPasswordInput).toBeVisible();
31
32
  await (0, test_1.expect)(this.continueButton).toBeVisible();
32
33
  }
34
+ async dontUseMFA() {
35
+ if (await this.dontUseMFAButton.isVisible({ timeout: 10000 })) {
36
+ await this.dontUseMFAButton.click();
37
+ }
38
+ }
33
39
  }
34
40
  exports.PasswordSetupPage = PasswordSetupPage;
@@ -35,6 +35,7 @@ class KindeAuthService {
35
35
  else {
36
36
  throw new Error('Could not extract verification code from email');
37
37
  }
38
+ await this.passwordSetupPage.dontUseMFA();
38
39
  await this.passwordSetupPage.isOnPasswordSetupPage();
39
40
  const password = 'TestPassword123!';
40
41
  await this.passwordSetupPage.submitPasswordForm(password);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "external-services-automation",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "External services automation library for Playwright and Cucumber",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",