github clerk/javascript @clerk/testing@1.6.0

latest releases: @clerk/types@4.92.0, @clerk/clerk-js@5.99.0, @clerk/fastify@2.4.37...
6 months ago

Minor Changes

  • Add Playwright page objects for Clerk functionality. This functionality is directly extracted from the end-to-end integration test suite that Clerk uses to develop Clerk components. While the API is being refined for public consumption, it will be available under the @clerk/testing/playwright/unstable import, and is not subject to SemVer compatibility guidelines. (#5661) by @dstaley

    import { test } from '@playwright/test';
    import { createPageObjects } from '@clerk/testing/playwright/unstable';
    
    test('can sign up with email and password', async context => {
      const po = createPageObjects(context);
    
      // Go to sign up page
      await po.signUp.goTo();
    
      // Fill in sign up form
      await po.signUp.signUpWithEmailAndPassword({
        email: 'e2e+clerk_test@example.com',
        password: Math.random().toString(36),
      });
    
      // Verify email
      await po.signUp.enterTestOtpCode();
    
      // Check if user is signed in
      await po.expect.toBeSignedIn();
    });

Patch Changes

Don't miss a new javascript release

NewReleases is sending notifications on new releases.