external-services-automation 1.0.29 → 1.0.31

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.
@@ -6,8 +6,10 @@ export declare class LoginPage {
6
6
  readonly passwordInput: Locator;
7
7
  readonly emailErrorMessage: Locator;
8
8
  readonly createAccountLink: Locator;
9
+ readonly continueWithEmailAndPasswordButton: Locator;
9
10
  constructor(page: Page);
10
11
  getEmailNotExistsMessage(): Promise<string | null>;
11
12
  login(email: string, password?: string): Promise<void>;
12
13
  goToRegisterPage(): Promise<void>;
14
+ continueWithEmailAndPassword(): Promise<void>;
13
15
  }
@@ -9,6 +9,7 @@ class LoginPage {
9
9
  this.passwordInput = page.locator('#verify_password_p_password');
10
10
  this.emailErrorMessage = page.locator('#sign_up_sign_in_credentials_p_email_error_msg');
11
11
  this.createAccountLink = page.locator('//span[@class="signup-cta"]//a[text()="Sign up"]');
12
+ this.continueWithEmailAndPasswordButton = page.getByTestId('signup-provider-email');
12
13
  }
13
14
  async getEmailNotExistsMessage() {
14
15
  return await this.emailErrorMessage.textContent();
@@ -24,5 +25,8 @@ class LoginPage {
24
25
  async goToRegisterPage() {
25
26
  await this.createAccountLink.click();
26
27
  }
28
+ async continueWithEmailAndPassword() {
29
+ await this.continueWithEmailAndPasswordButton.click();
30
+ }
27
31
  }
28
32
  exports.LoginPage = LoginPage;
@@ -4,6 +4,7 @@ export declare class UpdatePaymentMethodPage {
4
4
  readonly pageContainer: Locator;
5
5
  readonly stripeIframe: Locator;
6
6
  readonly continueButton: Locator;
7
+ readonly subscribeButton: Locator;
7
8
  constructor(page: Page);
8
9
  clickContinue(): Promise<void>;
9
10
  isOnUpdatePaymentMethodPage(): Promise<void>;
@@ -8,6 +8,7 @@ class UpdatePaymentMethodPage {
8
8
  this.pageContainer = page.locator('[data-testid="page-container-main"]').first();
9
9
  this.stripeIframe = page.locator('iframe[src*="stripe.com"]').first();
10
10
  this.continueButton = page.locator('button[data-testid="confirm"]');
11
+ this.subscribeButton = page.getByTestId('hosted-payment-submit-button');
11
12
  }
12
13
  async clickContinue() {
13
14
  await this.continueButton.click();
@@ -9,4 +9,5 @@ export declare class StripeService {
9
9
  constructor(page: Page);
10
10
  upgradePlan(planType: string): Promise<void>;
11
11
  completePayment(): Promise<void>;
12
+ addPaymentAndSubscribe(): Promise<void>;
12
13
  }
@@ -37,5 +37,9 @@ class StripeService {
37
37
  await (0, test_1.expect)(this.page).toHaveURL(/emailawesome\.com/, { timeout: 10000 });
38
38
  await (0, test_1.expect)(this.page).not.toHaveURL(/stripe\.com/);
39
39
  }
40
+ async addPaymentAndSubscribe() {
41
+ await this.stripeUpdatePaymentMethodPage.fillCardInformation();
42
+ await this.stripeUpdatePaymentMethodPage.subscribeButton.click();
43
+ }
40
44
  }
41
45
  exports.StripeService = StripeService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "external-services-automation",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "description": "External services automation library for Playwright and Cucumber",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",