1.0.1 • Published 6 months ago

playdocs v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Install Playdocs

run

npm install playdocs

Example usage in a test file:

// example.test.ts
import { playdocs } from "playwright-playdocs";
import { expect } from "@playwright/test";

const test = playdocs({
  enabled: true,
  defaultDuration: 2000,
});

test("example test", async ({ page, playdocs }) => {
  await playdocs({
    text: "Loading page",
    metadata: { step: 1, category: "navigation" },
  });
  await page.goto("https://example.com");

  await playdocs({
    text: "Clicking login button",
    duration: 4000,
    metadata: { step: 2, category: "auth" },
  });
  await page.click("#login");
});
// Example playwright.config.ts configuration:
import { defineConfig } from "@playwright/test";
import { PlaydocsReporter } from "playwright-playdocs";

export default defineConfig({
  reporter: [
    ["html"],
    ["playwright-playdocs/reporter", {}], // or pass config options here
  ],
  use: {
    video: "on",
  },
});
1.0.1

6 months ago

1.0.0

6 months ago

0.0.4

6 months ago

0.0.3

6 months ago

0.0.2

6 months ago