Skip to content

[Feature] Mocking libraries for window.liquid and window.webln provider #2675

Description

@louisinger

Feature description

Writing Playwright tests for Alby integration with a web app is a bit tricky due to the authentication service dependencie. It's also a lot of work to do the onboarding steps while testing (switch network, generate master keys etc...)

Describe the solution

A library providing  window.liquid & window.webln mocks (ideally injectable in playwright test config?).

  • A plus could be to let the developer configures the mock objects (custom network, custom master key etc...).
  • Not sure if the mock object should show the popups but at least it should be possible to set up the user input (reject/accept the popup request, "remember my choice" case etc.)

Describe alternatives

we could mock only the authentication service, then the developer would launch the service + build Alby with that service to run its Playwright tests.

Additional context

this issue follows a reflexion while writing tests for fuji app: fuji-money/app#155

Are you working on this?

None

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ideaA feature idea that needs to be more specification

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions