external-services-automation 1.0.30 → 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.
@@ -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.30",
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",