Skip to content

Implement @lytics/playwright-adapters (Filesystem & Slack) #4

Description

@prosdev

Branch: feat/implement-public-adapters

Priority: Medium

Estimate: 2-3 hours

Parent Epic: #1

Dependencies: #2

Description

Create generic, reusable adapters for filesystem storage and Slack notifications. These adapters are product-agnostic and useful for any team adopting the reporter framework. FilesystemAdapter provides local JSON storage for development/debugging. SlackAdapter sends formatted test summaries to Slack channels.

Acceptance Criteria

  • FilesystemAdapter writes JSON files to specified directory with configurable formatting
  • SlackAdapter sends formatted messages to Slack webhook with test stats, failures, and flaky tests
  • Both adapters implement ResultAdapter interface
  • Unit tests pass with 80%+ coverage
  • Can be used standalone or combined with other adapters
  • Published to public npm registry
  • README includes configuration examples and screenshots

Technical Requirements

  • Implement FilesystemAdapter with directory creation and JSON writing
  • Migrate Slack notification logic from slack-reporter.ts to SlackAdapter
  • Add configurable message formatting for Slack (success/failure colors, emoji, etc.)
  • Add TypeScript examples for both adapters
  • Support environment variable configuration (SLACK_WEBHOOK_URL, etc.)
  • Handle file system errors gracefully in FilesystemAdapter

New Files

  • packages/adapters/src/filesystem/FilesystemAdapter.ts
  • packages/adapters/src/filesystem/FilesystemAdapter.test.ts
  • packages/adapters/src/slack/SlackAdapter.ts
  • packages/adapters/src/slack/SlackAdapter.test.ts
  • packages/adapters/README.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions