@docker/extension-test-helper
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

@docker/extension-test-helper

This package provides helper methods to start the UI app of Docker Desktop from puppeteer, navigate to and test a given extension.

This package is experimental.

Installation

npm install @docker/extension-test-helper

Example usage

import { DesktopUI } from '@docker/extension-test-helper';
import { exec as originalExec } from 'child_process';
import * as util from 'util';

export const exec = util.promisify(originalExec);

await exec('docker extension install -f my/extension');

const dashboard = await DesktopUI.start();
const extensionPanel = await dashboard.navigateToExtension('my/extension');

// use extensionPanel to click on buttons, make assertions etc. using puppeteer APIs
await extensionPanel.waitForSelector('#someElementId');

Package Sidebar

Install

npm i @docker/extension-test-helper

Weekly Downloads

1

Version

0.1.1

License

Apache-2.0

Unpacked Size

8.37 kB

Total Files

4

Last publish

Collaborators

  • rossipedia-docker
  • crazymax
  • lucas.bernalte.docker
  • lizzthabet
  • gtardif
  • ebriney
  • jeanlaurent
  • serjkarneichyk
  • rumpl
  • mark-dr