Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
web: simplify
?inline
handler for Storybook (#12246)
* web: Add InvalidationFlow to Radius Provider dialogues ## What - Bugfix: adds the InvalidationFlow to the Radius Provider dialogues - Repairs: `{"invalidation_flow":["This field is required."]}` message, which was *not* propagated to the Notification. - Nitpick: Pretties `?foo=${true}` expressions: `s/\?([^=]+)=\$\{true\}/\1/` ## Note Yes, I know I'm going to have to do more magic when we harmonize the forms, and no, I didn't add the Property Mappings to the wizard, and yes, I know I'm going to have pain with the *new* version of the wizard. But this is a serious bug; you can't make Radius servers with *either* of the current dialogues at the moment. * web: simplify `?inline` handler for Storybook # What - Revise the `?inline` handler for Storybook - Enable headless test runs of E2E - Reduce headless testing to single instances # Why ## `?inline` handling Vite-for-Storybook-for-Web-Components has a requirement that all component CSS imports be suffixed with an `?inline` argument so Vite knows to put the CSS into the component and not inject it into the document head. This `?inline` argument is an implementation detail of Storybook. It would be irrelevant clutter added to our codebase. We were using `rollup-plugin-modify` to find every instance of an import-to-component, but the implementation was clunky and involved scanning the source code manually. `rollup-plugin-modify` version 3 has regular expressions and takes a function as an argument. This allows us to generate the CSS import maps on-the-fly when Storybook is run, eliminating a fragile build step. We can also remove the source code scanner for those imports. ## Changes to testing It's just nice to be able to run the E2E tests headlessly, without them eating up your screen real estate, flashing, or grabbing your mouse. WebdriverIO's testing of Web Components is new and, as we've seen, a bit cranky. The WebdriverIO team currently recommends not running the tests in parallel. We only have about 70 tests so far, and they're fairly speedy, especially when you don't have to invoke a browser session for every test.
- Loading branch information