Skip to content

feat(devtools): add support for custom test-id attributes#227

Merged
smeijer merged 2 commits intodevelopfrom
feature/support-custom-testid
Jul 1, 2020
Merged

feat(devtools): add support for custom test-id attributes#227
smeijer merged 2 commits intodevelopfrom
feature/support-custom-testid

Conversation

@delca85
Copy link
Member

@delca85 delca85 commented Jun 30, 2020

What:

I added a settings modal to chrome extension with the aim of setting a custom testId attribute to be used by queries in chrome extension.

Why:

An issue was opened by a testing-playground user (#213).

How:

  1. install and use reach dialog
  2. add a Dialog in MenuBar.js containing an input that receives the custom testId by the user
  3. when the user clicks the Dialog ok button a message of type SET_CUSTOM_TEST_ID is sent to contentScript
  4. content-script launch the new configure function on parser that calls configure by testing-library setting the custom attribute as new test id attribute

Checklist:

  • Tests
  • Ready to be merged

The modal is totally not styled, since the logic I developed is hopefully to be merged with the #226 by @smeijer .

I am linking a video to show how it works right now.

@smeijer
Copy link
Member

smeijer commented Jul 1, 2020

Thanks, @delca85! Awesome work.

I'm going to merge it as is and will update the UI in a follow-up PR.

@smeijer smeijer changed the title add settings to chrome extension to define custom test id attribute feat(devtools): add support for custom test-id attributes Jul 1, 2020
@smeijer smeijer merged commit 933e59c into develop Jul 1, 2020
@smeijer smeijer deleted the feature/support-custom-testid branch July 1, 2020 18:25
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 this pull request may close these issues.

2 participants