Skip to content

Releases: cloudfour/pleasantest

v0.6.0

30 Jun 17:17
913f15b
Compare
Choose a tag to compare

Minor Changes

  • #115 b4eb08d Thanks @calebeby! - Replace vite-based module server with wmr-based custom module server
    (This is probably a breaking change - minor bump is only because pre-1.0)

  • #126 e06e6bc Thanks @calebeby! - Improve error message display for errors coming from browsers

  • #116 5afa0a6 Thanks @calebeby! - Add support for static files and css requested directly

  • #106 994b810 Thanks @calebeby! - Cache browser instances locally instead of globally

Patch Changes

v0.5.0

08 Jun 20:40
1b6003b
Compare
Choose a tag to compare

Minor Changes

Patch Changes

  • 7705216 Thanks @calebeby! - Update @testing-library/dom to v7.31.2. This change fixes some issues with label associations.

v0.4.1

01 Jun 20:23
b968311
Compare
Choose a tag to compare

Patch Changes

  • #78 55b75f9 Thanks @calebeby! - Handle errors thrown by browser launcher instead of silently hanging

v0.4.0

26 May 17:03
8d49845
Compare
Choose a tag to compare

Minor Changes

  • #61 be9eef7 Thanks @calebeby! - Update puppeteer to v9.1.1

    Chromium version is now 91.0.4469.0 (r869685)

Patch Changes

v0.3.0

13 May 21:03
204fb24
Compare
Choose a tag to compare

Minor Changes

  • 4e0335c #58 Thanks @calebeby! - Implement user.clear()

    Additionally, the default delay between keypresses in user.type has been decreased to 1ms.

  • f5c2fab #60 Thanks @calebeby! - Implement user.selectOptions()

v0.2.2

26 Apr 18:00
93bf33d
Compare
Choose a tag to compare

Patch Changes

  • 31cc1a9 #55 Thanks @calebeby! - Export JSHandle and ElementHandle types from puppeteer. Now if you want to use those types you can import them directly from test-mule.

v0.2.1

23 Apr 17:02
6aa66e4
Compare
Choose a tag to compare

Patch Changes

  • ae4a89a #53 Thanks @calebeby! - Bundle types for @testing-library/dom so people don't have to install @testing-library/dom (closes #50)

v0.2.0

25 Mar 00:44
d21b235
Compare
Choose a tag to compare

Minor Changes

  • 064e5b4 #48 Thanks @calebeby! - - Add user.type method

    • Add actionability checks: visible and attached
  • beb1914 #43 Thanks @calebeby! - Provide a helpful message if the user forgets to use await.

    For example, if a user forgets to use await in the jest-dom assertion:

    test(
      'example',
      withBrowser(async ({ screen, utils }) => {
        await utils.injectHTML('<button>Hi</button>');
        const button = await screen.getByText(/hi/i);
        expect(button).toBeVisible();
      }),
    );

    Then a useful error message is produced:

    Cannot execute assertion toBeVisible after test finishes. Did you forget to await?
    
      103 |     await utils.injectHTML('<button>Hi</button>');
      104 |     const button = await screen.getByText(/hi/i);
    > 105 |     expect(button).toBeVisible();
          |                    ^
      106 |   }),
      107 | );
      108 |
    

    This is also handled for utility functions, user methods, and Testing Library queries.

  • 732fbff #45 Thanks @calebeby! - Now it is possible to pass variables to the browser in runJS:

    import { withBrowser } from 'test-mule';
    
    test(
      'runJS example with argument',
      withBrowser(async ({ utils, screen }) => {
        // element is an ElementHandle (pointer to an element in the browser)
        const element = await screen.getByText(/button/i);
        // we can pass element into runJS and the default exported function can access it as an Element
        await utils.runJS(
          `
            export default (element) => console.log(element);
          `,
          [element],
        );
      }),
    );

v0.1.0

25 Feb 02:53
095eb0a
Compare
Choose a tag to compare

Minor Changes