Interactor inspector #873
Replies: 5 comments 4 replies
-
In the future, we would like to extend inspector to lint interactable elements if some of them are unreachable. |
Beta Was this translation helpful? Give feedback.
-
@wKich what do think is the smallest usable integration with Storybook that we could do? |
Beta Was this translation helpful? Give feedback.
-
Here is a little demo with the actions editor Creevey.-.Google.Chrome.2021-02-23.23-47-36.mp4 |
Beta Was this translation helpful? Give feedback.
-
Created repo with source code of inspector PoC https://github.com/wKich/interactors-inspector |
Beta Was this translation helpful? Give feedback.
-
Added playground link https://codesandbox.io/s/hps8y |
Beta Was this translation helpful? Give feedback.
-
Here are useful links:
__BIGTEST_TOGGLE_INSPECTOR__
global functionI want to discuss what I've made for the first try of Interactor Inspector and our next steps.
To clarify, Interactor Inspector is a part of Playground that allows user to inspect DOM elements, their properties, write simple action scripts, or experiment with writing custom interactions. It should give the user a brief look at how interactors work and their pros/cons. It also could be helpful to play around with new test scenarios.
I created a little app. You can inject a bundle of that app to your page application and see all elements that built-in interactors have matched. You can see where the target element is located, its props, and run some actions against them.
The current status still lacks an actions editor and the ability to write custom interactors. I'm going to finish that part this week and share the repo for review.
So I think that the matched interactors list with the actions editor is the core part of the inspector. It seems pretty useful, and it works. The main question what our next steps. And where/how we'd like to integrate it.
I suggest we reuse the Inspector's code in the Storybook integration. We could create a browser extension that allows users to inspect any website (I don't know how it should work for mobile). It could be a part of the BigTest package as a pre-built entry point for webpack/rollup.
We can create a playground on the docs page, but I don't think that it will be helpful. We can't simply load external URLs in an iframe and inject inspector because of CORS and CSP. The only way to do it is how QA Wolf works. They run headless chrome as a backend service and forward rendered imaged and user actions to/from a client's browser.
Beta Was this translation helpful? Give feedback.
All reactions