npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

external-services-automation

v1.0.23

Published

External services automation library for Playwright and Cucumber

Readme

External Services Automation Library

A TypeScript library for test automation with Playwright, focused on integrations with external services like Kinde (authentication) and Stripe (payments).

Installation

Install the package via npm:

npm install external-services-automation

Setup

Configure Your Test Framework

The library can be used with any test framework. Here's an example for Playwright:

// playwright.config.ts
import { defineConfig } from '@playwright/test';

export default defineConfig({
  testDir: './tests',
  use: {
    baseURL: process.env.BASE_URL || 'https://your-app.com',
  },
});

Usage

Import Components

import { 
  ExternalServicesWorld,
  LoginPage,
  RegisterPage,
  KindeAuthService,
  StripeService,
  GuerrillaMailClient
} from 'external-services-automation';

Use Services and Page Objects

// Authentication with Kinde
const authService = new KindeAuthService();
await authService.login(email, password);

// Payment processing with Stripe
const stripeService = new StripeService();
await stripeService.upgradeSubscription(planType);

// Page interactions
const loginPage = new LoginPage(page);
await loginPage.fillCredentials(email, password);

Available Components

Services

KindeAuthService

  • login(email: string, password: string) - Authenticates user with Kinde
  • register(email: string, firstName: string, lastName: string) - Creates new account
  • verifyEmail(code: string) - Verifies email with confirmation code

StripeService

  • upgradeSubscription(planType: string) - Upgrades subscription to specified plan
  • updatePaymentMethod(cardDetails: object) - Updates payment method
  • getCurrentSubscription() - Retrieves current subscription details

Page Objects

Kinde Pages

  • LoginPage - Handles login form interactions
  • RegisterPage - Manages account registration
  • ConfirmCodePage - Email verification code entry
  • PasswordSetupPage - Password creation and setup

Stripe Pages

  • CurrentSubscriptionPage - Displays current subscription details
  • UpdateSubscriptionPage - Subscription plan selection
  • UpdatePaymentMethodPage - Payment method management
  • ConfirmUpdatePage - Confirmation dialogs
  • LeftPanelPage - Navigation and sidebar interactions

Utilities

  • GuerrillaMailClient - Temporary email handling for account verification
    • createTempEmail() - Creates temporary email address
    • getVerificationCode() - Retrieves verification emails
    • cleanup() - Cleans up temporary email resources

World Extension

  • ExternalServicesWorld - Shared state management for test scenarios

Example Implementation

// In your test files
import { test, expect } from '@playwright/test';
import { KindeAuthService, StripeService, GuerrillaMailClient } from 'external-services-automation';

test.describe('External Services Integration', () => {
  let authService: KindeAuthService;
  let stripeService: StripeService;
  let tempEmail: GuerrillaMailClient;

  test.beforeEach(async () => {
    authService = new KindeAuthService();
    stripeService = new StripeService();
  });

  test('should create account and upgrade subscription', async () => {
    // Create temporary email for account verification
    tempEmail = new GuerrillaMailClient();
    const email = await tempEmail.createTempEmail();
    
    // Register new account
    await authService.register(email, 'John', 'Doe');
    
    // Verify email
    const verificationCode = await tempEmail.getVerificationCode();
    await authService.verifyEmail(verificationCode);
    
    // Upgrade subscription
    await stripeService.upgradeSubscription('premium');
    
    // Verify subscription status
    const subscription = await stripeService.getCurrentSubscription();
    expect(subscription.status).toBe('active');
    
    // Cleanup
    await tempEmail.cleanup();
  });

  test('should handle login with existing account', async () => {
    const result = await authService.login('[email protected]', 'password123');
    expect(result.success).toBe(true);
  });
});

Updates

To update to the latest version:

npm update external-services-automation

CI/CD

Bitbucket Pipelines

script:
  - npm install
  - npm test

Dependencies

The library requires the following peer dependencies to be installed in your project:

npm install @playwright/test axios-cookiejar-support dotenv tough-cookie

Version requirements:

  • @playwright/test ^1.40.0
  • axios-cookiejar-support ^6.0.2
  • dotenv ^16.4.5
  • tough-cookie ^5.1.2

Troubleshooting

Package Not Found

npm install external-services-automation

Import Errors

Make sure you're importing from the correct package name:

import { KindeAuthService } from 'external-services-automation';

Missing Peer Dependencies

npm install @playwright/test axios-cookiejar-support dotenv tough-cookie

Development

For contributors working on this library:

git clone https://bitbucket.org/connectist/external-services-automation.git
cd external-services-automation
npm install
npm run build

Links

  • NPM Package: https://www.npmjs.com/package/external-services-automation
  • Repository: https://bitbucket.org/connectist/external-services-automation