Skip to content

soyximo/playdocs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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",
  },
});

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors