thefrontside / thefrontside/interactors

Update Action wrappers to make sure they can represent any interactor

Open
#144 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
36
Forks
2
Avg merge
4m
Merged PRs (30d)
2

Description

In order to integrate with the storybook debugger, we need to be able to represent interactors in code form and not just in text description form. Currently, an interactor sequence such as

async function play() {
  await TextField('Username').fillIn('cowboyd');
  await TextField('Password').fillIn('secure-password');
}

will be rendered in storybook as:

  1. fill in "cowboyd" into the textfield "Username"
  2. fill in "secure-password" into the textfield "Password"

That's because the current facilities to generate a textual representation of interactors is optimized for rendering user-readable errors inside the test failure output. However, we want to be able to render the interaction as close to code as possible, so that the storybook output looks like:

  1. TextField('Username').fillIn('cowboyd');
  2. TextField('Password').fillIn('secure-password');

This issue is set up to track that we have the pieces in place to do this:

  • print the interactor constructor, the locator and filters, and action name along with arguments.
  • represent hiearchies of interactors
  • print matchers as code instead of descriptions

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing facilities that generate textual interactor descriptions, using the Storybook debugger integration context as the goal. Check how constructors, locators, filters, actions, hierarchies, and matchers are currently represented; done means all three checklist items support code-like output for arbitrary interactors.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.