Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use destructured interactor methods inside composite actions #7

Closed
cowboyd opened this issue Jul 26, 2021 · 0 comments · Fixed by #111
Closed

Cannot use destructured interactor methods inside composite actions #7

cowboyd opened this issue Jul 26, 2021 · 0 comments · Fixed by #111

Comments

@cowboyd
Copy link
Member

cowboyd commented Jul 26, 2021

Action methods are not currently bound in some, if not all circumstances. This means that they cannot be destructured inside a composite action:

expected: does not throw error

export const MyInteractor = HTML.extend('my-interactor')
  .actions({
    focusAndClick: async ({ focus, click }) => {
      await focus();
      await click();
    }
  })

actual: Error this is undefined

@jnicklas jnicklas transferred this issue from thefrontside/bigtest Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant