thefrontside / thefrontside/interactors

Add action delegation

Open
#113 0 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 #90 we added filter delegation, in #102 we proposed locator delegation. The final piece of the puzzle is action delegation! Action delegation kind of already exists today:

HTML.extend('calendar')
  .selector('.calendar')
  .actions({
    async open(interactor) {
      await interactor.find(Button('Open').click());
    }
  });

The idea here is to align this with the filter syntax, to achieve something like the following:

HTML.extend('calendar')
  .selector('.calendar')
  .actions({
    open: Button('Open').click()
  });

Which would have identical behaviour.

The problem is that actually implementing this is probably very difficult, and will require some deep rethinking of interactions to make this possible.

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

No files or tests are named. Start by tracing the existing .actions implementation and the filter delegation from #90, then compare the locator delegation proposal in #102; done means the shorthand action syntax has identical behavior to the current async implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.