creevey 0.10.0-beta.8 → 0.10.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORS +2 -0
- package/CHANGELOG.md +281 -0
- package/README.md +19 -41
- package/dist/client/addon/components/Addon.js +18 -8
- package/dist/client/addon/components/Addon.js.map +1 -1
- package/dist/client/addon/components/Panel.js +4 -4
- package/dist/client/addon/components/Panel.js.map +1 -1
- package/dist/client/addon/components/TestSelect.js +2 -2
- package/dist/client/addon/components/TestSelect.js.map +1 -1
- package/dist/client/addon/components/Tools.js +19 -9
- package/dist/client/addon/components/Tools.js.map +1 -1
- package/dist/client/addon/controller.d.ts +1 -1
- package/dist/client/addon/controller.js +3 -3
- package/dist/client/addon/controller.js.map +1 -1
- package/dist/client/addon/decorator.d.ts +1 -1
- package/dist/client/addon/makeDecorator.d.ts +9 -0
- package/dist/client/addon/makeDecorator.js +48 -0
- package/dist/client/addon/makeDecorator.js.map +1 -0
- package/dist/client/addon/manager.js +38 -39
- package/dist/client/addon/manager.js.map +1 -1
- package/dist/client/addon/preset.d.ts +0 -1
- package/dist/client/addon/preset.js +3 -2
- package/dist/client/addon/preset.js.map +1 -1
- package/dist/client/addon/preview.d.ts +1 -1
- package/dist/client/addon/withCreevey.d.ts +5 -3
- package/dist/client/addon/withCreevey.js +14 -21
- package/dist/client/addon/withCreevey.js.map +1 -1
- package/dist/client/shared/components/ImagesView/BlendView.d.ts +2 -2
- package/dist/client/shared/components/ImagesView/BlendView.js +18 -8
- package/dist/client/shared/components/ImagesView/BlendView.js.map +1 -1
- package/dist/client/shared/components/ImagesView/ImagesView.js +1 -1
- package/dist/client/shared/components/ImagesView/ImagesView.js.map +1 -1
- package/dist/client/shared/components/ImagesView/SideBySideView.d.ts +2 -2
- package/dist/client/shared/components/ImagesView/SideBySideView.js +19 -9
- package/dist/client/shared/components/ImagesView/SideBySideView.js.map +1 -1
- package/dist/client/shared/components/ImagesView/SlideView.d.ts +2 -2
- package/dist/client/shared/components/ImagesView/SlideView.js +19 -9
- package/dist/client/shared/components/ImagesView/SlideView.js.map +1 -1
- package/dist/client/shared/components/ImagesView/SwapView.d.ts +2 -2
- package/dist/client/shared/components/ImagesView/SwapView.js +31 -9
- package/dist/client/shared/components/ImagesView/SwapView.js.map +1 -1
- package/dist/client/shared/components/ImagesView/common.d.ts +1 -1
- package/dist/client/shared/components/PageFooter/PageFooter.js +1 -1
- package/dist/client/shared/components/PageFooter/PageFooter.js.map +1 -1
- package/dist/client/shared/components/PageFooter/Paging.js +1 -1
- package/dist/client/shared/components/PageFooter/Paging.js.map +1 -1
- package/dist/client/shared/components/PageHeader/ImagePreview.d.ts +2 -2
- package/dist/client/shared/components/PageHeader/ImagePreview.js +2 -1
- package/dist/client/shared/components/PageHeader/ImagePreview.js.map +1 -1
- package/dist/client/shared/components/PageHeader/PageHeader.js +34 -13
- package/dist/client/shared/components/PageHeader/PageHeader.js.map +1 -1
- package/dist/client/shared/components/ResultsPage.d.ts +2 -2
- package/dist/client/shared/components/ResultsPage.js +45 -15
- package/dist/client/shared/components/ResultsPage.js.map +1 -1
- package/dist/client/shared/creeveyClientApi.js +18 -1
- package/dist/client/shared/creeveyClientApi.js.map +1 -1
- package/dist/client/shared/helpers.d.ts +1 -3
- package/dist/client/shared/helpers.js +4 -19
- package/dist/client/shared/helpers.js.map +1 -1
- package/dist/client/web/CreeveyApp.d.ts +1 -0
- package/dist/client/web/CreeveyApp.js +44 -15
- package/dist/client/web/CreeveyApp.js.map +1 -1
- package/dist/client/web/CreeveyContext.d.ts +6 -0
- package/dist/client/web/CreeveyContext.js +21 -7
- package/dist/client/web/CreeveyContext.js.map +1 -1
- package/dist/client/web/CreeveyLoader.d.ts +1 -1
- package/dist/client/web/CreeveyLoader.js +3 -3
- package/dist/client/web/CreeveyLoader.js.map +1 -1
- package/dist/client/web/CreeveyView/SideBar/Checkbox.d.ts +4 -4
- package/dist/client/web/CreeveyView/SideBar/Checkbox.js +36 -6
- package/dist/client/web/CreeveyView/SideBar/Checkbox.js.map +1 -1
- package/dist/client/web/CreeveyView/SideBar/Search.js +20 -10
- package/dist/client/web/CreeveyView/SideBar/Search.js.map +1 -1
- package/dist/client/web/CreeveyView/SideBar/SideBar.js +26 -12
- package/dist/client/web/CreeveyView/SideBar/SideBar.js.map +1 -1
- package/dist/client/web/CreeveyView/SideBar/SideBarFooter.js +67 -13
- package/dist/client/web/CreeveyView/SideBar/SideBarFooter.js.map +1 -1
- package/dist/client/web/CreeveyView/SideBar/SideBarHeader.js +32 -12
- package/dist/client/web/CreeveyView/SideBar/SideBarHeader.js.map +1 -1
- package/dist/client/web/CreeveyView/SideBar/SuiteLink.d.ts +6 -6
- package/dist/client/web/CreeveyView/SideBar/SuiteLink.js +20 -13
- package/dist/client/web/CreeveyView/SideBar/SuiteLink.js.map +1 -1
- package/dist/client/web/CreeveyView/SideBar/TestLink.js +20 -13
- package/dist/client/web/CreeveyView/SideBar/TestLink.js.map +1 -1
- package/dist/client/web/CreeveyView/SideBar/TestStatusIcon.d.ts +2 -2
- package/dist/client/web/CreeveyView/SideBar/TestStatusIcon.js +2 -2
- package/dist/client/web/CreeveyView/SideBar/TestStatusIcon.js.map +1 -1
- package/dist/client/web/CreeveyView/SideBar/TestsStatus.d.ts +2 -2
- package/dist/client/web/CreeveyView/SideBar/TestsStatus.js +3 -2
- package/dist/client/web/CreeveyView/SideBar/TestsStatus.js.map +1 -1
- package/dist/client/web/CreeveyView/SideBar/Toggle.js +1 -1
- package/dist/client/web/CreeveyView/SideBar/Toggle.js.map +1 -1
- package/dist/client/web/KeyboardEventsContext.d.ts +1 -8
- package/dist/client/web/KeyboardEventsContext.js +79 -64
- package/dist/client/web/KeyboardEventsContext.js.map +1 -1
- package/dist/client/web/assets/index-CtSq3IhG.js +518 -0
- package/dist/client/web/index.html +1 -1
- package/dist/client/web/index.js +26 -11
- package/dist/client/web/index.js.map +1 -1
- package/dist/client/web/themes.d.ts +2 -0
- package/dist/client/web/themes.js +22 -0
- package/dist/client/web/themes.js.map +1 -0
- package/dist/creevey.d.ts +1 -1
- package/dist/creevey.js +122 -41
- package/dist/creevey.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/playwright/generator.d.ts +25 -0
- package/dist/playwright/generator.js +243 -0
- package/dist/playwright/generator.js.map +1 -0
- package/dist/playwright/helpers.d.ts +2 -0
- package/dist/playwright/helpers.js +29 -0
- package/dist/playwright/helpers.js.map +1 -0
- package/dist/playwright/reporter.d.ts +83 -0
- package/dist/playwright/reporter.js +334 -0
- package/dist/playwright/reporter.js.map +1 -0
- package/dist/playwright/setup.d.ts +3 -0
- package/dist/playwright/setup.js +72 -0
- package/dist/playwright/setup.js.map +1 -0
- package/dist/playwright.d.ts +1 -0
- package/dist/playwright.js +3 -1
- package/dist/playwright.js.map +1 -1
- package/dist/server/compare.d.ts +18 -0
- package/dist/server/compare.js +182 -0
- package/dist/server/compare.js.map +1 -0
- package/dist/server/config.d.ts +3 -3
- package/dist/server/config.js +75 -8
- package/dist/server/config.js.map +1 -1
- package/dist/server/connection.d.ts +3 -0
- package/dist/server/connection.js +28 -0
- package/dist/server/connection.js.map +1 -0
- package/dist/server/docker.d.ts +1 -1
- package/dist/server/docker.js +54 -32
- package/dist/server/docker.js.map +1 -1
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +165 -64
- package/dist/server/index.js.map +1 -1
- package/dist/server/master/api.d.ts +11 -6
- package/dist/server/master/api.js +88 -25
- package/dist/server/master/api.js.map +1 -1
- package/dist/server/master/handlers/capture-handler.d.ts +5 -0
- package/dist/server/master/handlers/capture-handler.js +25 -0
- package/dist/server/master/handlers/capture-handler.js.map +1 -0
- package/dist/server/master/handlers/index.d.ts +4 -0
- package/dist/server/master/handlers/index.js +21 -0
- package/dist/server/master/handlers/index.js.map +1 -0
- package/dist/server/master/handlers/ping-handler.d.ts +2 -0
- package/dist/server/master/handlers/ping-handler.js +8 -0
- package/dist/server/master/handlers/ping-handler.js.map +1 -0
- package/dist/server/master/handlers/static-handler.d.ts +1 -0
- package/dist/server/master/handlers/static-handler.js +20 -0
- package/dist/server/master/handlers/static-handler.js.map +1 -0
- package/dist/server/master/handlers/stories-handler.d.ts +4 -0
- package/dist/server/master/handlers/stories-handler.js +24 -0
- package/dist/server/master/handlers/stories-handler.js.map +1 -0
- package/dist/server/master/master.js +7 -24
- package/dist/server/master/master.js.map +1 -1
- package/dist/server/master/pool.d.ts +1 -0
- package/dist/server/master/pool.js +5 -3
- package/dist/server/master/pool.js.map +1 -1
- package/dist/server/master/queue.d.ts +1 -1
- package/dist/server/master/queue.js +14 -6
- package/dist/server/master/queue.js.map +1 -1
- package/dist/server/master/runner.d.ts +6 -6
- package/dist/server/master/runner.js +98 -130
- package/dist/server/master/runner.js.map +1 -1
- package/dist/server/master/server.d.ts +1 -1
- package/dist/server/master/server.js +193 -88
- package/dist/server/master/server.js.map +1 -1
- package/dist/server/master/start.d.ts +1 -2
- package/dist/server/master/start.js +13 -29
- package/dist/server/master/start.js.map +1 -1
- package/dist/server/master/testsManager.d.ts +81 -0
- package/dist/server/master/testsManager.js +282 -0
- package/dist/server/master/testsManager.js.map +1 -0
- package/dist/server/playwright/docker-file.d.ts +1 -1
- package/dist/server/playwright/docker-file.js +17 -8
- package/dist/server/playwright/docker-file.js.map +1 -1
- package/dist/server/playwright/docker.d.ts +2 -1
- package/dist/server/playwright/docker.js +10 -2
- package/dist/server/playwright/docker.js.map +1 -1
- package/dist/server/playwright/index-source.mjs +16 -0
- package/dist/server/playwright/internal.d.ts +7 -7
- package/dist/server/playwright/internal.js +144 -84
- package/dist/server/playwright/internal.js.map +1 -1
- package/dist/server/playwright/webdriver.d.ts +3 -3
- package/dist/server/playwright/webdriver.js +0 -6
- package/dist/server/playwright/webdriver.js.map +1 -1
- package/dist/server/providers/browser.js +4 -3
- package/dist/server/providers/browser.js.map +1 -1
- package/dist/server/providers/hybrid.js +2 -2
- package/dist/server/providers/hybrid.js.map +1 -1
- package/dist/server/report.d.ts +10 -0
- package/dist/server/report.js +45 -0
- package/dist/server/report.js.map +1 -0
- package/dist/server/reporters/creevey.d.ts +7 -0
- package/dist/server/reporters/creevey.js +63 -0
- package/dist/server/reporters/creevey.js.map +1 -0
- package/dist/server/reporters/index.d.ts +2 -0
- package/dist/server/reporters/index.js +16 -0
- package/dist/server/reporters/index.js.map +1 -0
- package/dist/server/reporters/junit.d.ts +16 -0
- package/dist/server/reporters/junit.js +167 -0
- package/dist/server/reporters/junit.js.map +1 -0
- package/dist/server/reporters/teamcity.d.ts +7 -0
- package/dist/server/reporters/teamcity.js +60 -0
- package/dist/server/reporters/teamcity.js.map +1 -0
- package/dist/server/selenium/internal.d.ts +4 -4
- package/dist/server/selenium/internal.js +56 -40
- package/dist/server/selenium/internal.js.map +1 -1
- package/dist/server/selenium/selenoid.js +12 -6
- package/dist/server/selenium/selenoid.js.map +1 -1
- package/dist/server/selenium/webdriver.d.ts +3 -3
- package/dist/server/selenium/webdriver.js +4 -8
- package/dist/server/selenium/webdriver.js.map +1 -1
- package/dist/server/shutdown.d.ts +1 -0
- package/dist/server/shutdown.js +23 -0
- package/dist/server/shutdown.js.map +1 -0
- package/dist/server/stories.d.ts +0 -1
- package/dist/server/stories.js +0 -12
- package/dist/server/stories.js.map +1 -1
- package/dist/server/telemetry.js +3 -3
- package/dist/server/telemetry.js.map +1 -1
- package/dist/server/testsFiles/parser.js +45 -5
- package/dist/server/testsFiles/parser.js.map +1 -1
- package/dist/server/utils.d.ts +23 -0
- package/dist/server/utils.js +114 -15
- package/dist/server/utils.js.map +1 -1
- package/dist/server/webdriver.d.ts +1 -1
- package/dist/server/worker/context.d.ts +3 -0
- package/dist/server/worker/context.js +15 -0
- package/dist/server/worker/context.js.map +1 -0
- package/dist/server/worker/match-image.d.ts +8 -12
- package/dist/server/worker/match-image.js +11 -178
- package/dist/server/worker/match-image.js.map +1 -1
- package/dist/server/worker/start.d.ts +2 -2
- package/dist/server/worker/start.js +41 -64
- package/dist/server/worker/start.js.map +1 -1
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.js +9 -7
- package/dist/shared/index.js.map +1 -1
- package/dist/types.d.ts +84 -43
- package/dist/types.js +65 -1
- package/dist/types.js.map +1 -1
- package/docs/cli.md +80 -0
- package/docs/config.md +179 -165
- package/docs/examples/playwright-reporer/playwright.config.ts +37 -0
- package/docs/migration-0.9-to-0.10.md +144 -0
- package/docs/playwright-reporter.md +357 -0
- package/docs/storybook.md +60 -0
- package/docs/tests.md +50 -45
- package/package.json +78 -83
- package/playwright.config.mts +46 -0
- package/src/client/addon/components/Addon.tsx +1 -1
- package/src/client/addon/components/Panel.tsx +4 -4
- package/src/client/addon/components/TestSelect.tsx +2 -2
- package/src/client/addon/components/Tools.tsx +2 -2
- package/src/client/addon/controller.ts +4 -4
- package/src/client/addon/makeDecorator.ts +69 -0
- package/src/client/addon/manager.ts +38 -37
- package/src/client/addon/preset.ts +2 -1
- package/src/client/addon/withCreevey.ts +16 -19
- package/src/client/shared/components/ImagesView/BlendView.tsx +1 -1
- package/src/client/shared/components/ImagesView/ImagesView.tsx +1 -1
- package/src/client/shared/components/ImagesView/SideBySideView.tsx +2 -2
- package/src/client/shared/components/ImagesView/SlideView.tsx +2 -2
- package/src/client/shared/components/ImagesView/SwapView.tsx +20 -2
- package/src/client/shared/components/ImagesView/common.ts +1 -1
- package/src/client/shared/components/PageFooter/PageFooter.tsx +1 -1
- package/src/client/shared/components/PageFooter/Paging.tsx +1 -1
- package/src/client/shared/components/PageHeader/ImagePreview.tsx +2 -1
- package/src/client/shared/components/PageHeader/PageHeader.tsx +23 -7
- package/src/client/shared/components/ResultsPage.tsx +33 -10
- package/src/client/shared/creeveyClientApi.ts +19 -1
- package/src/client/shared/helpers.ts +4 -24
- package/src/client/web/CreeveyApp.tsx +30 -9
- package/src/client/web/CreeveyContext.tsx +11 -0
- package/src/client/web/CreeveyLoader.tsx +2 -2
- package/src/client/web/CreeveyView/SideBar/Checkbox.tsx +3 -3
- package/src/client/web/CreeveyView/SideBar/Search.tsx +4 -4
- package/src/client/web/CreeveyView/SideBar/SideBar.tsx +11 -6
- package/src/client/web/CreeveyView/SideBar/SideBarFooter.tsx +48 -15
- package/src/client/web/CreeveyView/SideBar/SideBarHeader.tsx +20 -5
- package/src/client/web/CreeveyView/SideBar/SuiteLink.tsx +12 -12
- package/src/client/web/CreeveyView/SideBar/TestLink.tsx +10 -10
- package/src/client/web/CreeveyView/SideBar/TestStatusIcon.tsx +2 -2
- package/src/client/web/CreeveyView/SideBar/TestsStatus.tsx +3 -2
- package/src/client/web/CreeveyView/SideBar/Toggle.tsx +1 -1
- package/src/client/web/KeyboardEventsContext.tsx +61 -73
- package/src/client/web/index.tsx +10 -5
- package/src/client/web/themes.ts +24 -0
- package/src/creevey.ts +92 -38
- package/src/playwright/generator.ts +322 -0
- package/src/playwright/helpers.ts +31 -0
- package/src/playwright/reporter.ts +381 -0
- package/src/playwright/setup.ts +84 -0
- package/src/playwright.ts +1 -0
- package/src/server/compare.ts +260 -0
- package/src/server/config.ts +52 -9
- package/src/server/connection.ts +26 -0
- package/src/server/docker.ts +62 -34
- package/src/server/index.ts +166 -79
- package/src/server/master/api.ts +94 -28
- package/src/server/master/handlers/capture-handler.ts +20 -0
- package/src/server/master/handlers/index.ts +4 -0
- package/src/server/master/handlers/ping-handler.ts +6 -0
- package/src/server/master/handlers/static-handler.ts +16 -0
- package/src/server/master/handlers/stories-handler.ts +20 -0
- package/src/server/master/master.ts +10 -27
- package/src/server/master/pool.ts +7 -3
- package/src/server/master/queue.ts +21 -7
- package/src/server/master/runner.ts +123 -134
- package/src/server/master/server.ts +214 -101
- package/src/server/master/start.ts +19 -41
- package/src/server/master/testsManager.ts +316 -0
- package/src/server/playwright/docker-file.ts +20 -8
- package/src/server/playwright/docker.ts +16 -3
- package/src/server/playwright/index-source.mjs +16 -0
- package/src/server/playwright/internal.ts +176 -103
- package/src/server/playwright/webdriver.ts +4 -10
- package/src/server/providers/browser.ts +4 -3
- package/src/server/providers/hybrid.ts +2 -3
- package/src/server/report.ts +51 -0
- package/src/server/reporters/creevey.ts +71 -0
- package/src/server/reporters/index.ts +11 -0
- package/src/server/reporters/junit.ts +207 -0
- package/src/server/reporters/teamcity.ts +74 -0
- package/src/server/selenium/internal.ts +70 -53
- package/src/server/selenium/selenoid.ts +13 -6
- package/src/server/selenium/webdriver.ts +8 -12
- package/src/server/shutdown.ts +19 -0
- package/src/server/stories.ts +1 -12
- package/src/server/telemetry.ts +3 -3
- package/src/server/testsFiles/parser.ts +52 -4
- package/src/server/utils.ts +124 -16
- package/src/server/webdriver.ts +1 -1
- package/src/server/worker/context.ts +14 -0
- package/src/server/worker/match-image.ts +16 -248
- package/src/server/worker/start.ts +49 -79
- package/src/shared/index.ts +10 -8
- package/src/types.ts +91 -58
- package/types/global.d.ts +1 -0
- package/dist/client/web/assets/index-DB8lHlJw.js +0 -591
- package/dist/server/reporter.d.ts +0 -26
- package/dist/server/reporter.js +0 -108
- package/dist/server/reporter.js.map +0 -1
- package/dist/server/update.d.ts +0 -2
- package/dist/server/update.js +0 -53
- package/dist/server/update.js.map +0 -1
- package/src/server/reporter.ts +0 -139
- package/src/server/update.ts +0 -74
package/AUTHORS
CHANGED
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,284 @@
|
|
1
|
+
# [0.10.0](https://github.com/wKich/creevey/compare/e60f1f4e48afbf174e8aaff0480ddd74e3b7b9f9...fff6e5825b2488b3fd197f1d71ecf5d339762490) (TBC)
|
2
|
+
|
3
|
+
## Creevey Updates: Cool New Stuff, Features, and Fixes!
|
4
|
+
|
5
|
+
Hey everyone! We've got some updates for Creevey that we think you'll like. We've been working on making the testing framework better, improving how you work with it, and adding some new ways to connect it with other tools. This includes some big changes to how things work under the hood, new features like Playwright support and better reports, plus a bunch of bug fixes.
|
6
|
+
|
7
|
+
---
|
8
|
+
|
9
|
+
### What's New & Important:
|
10
|
+
|
11
|
+
#### 1. Playwright Integration is Here!
|
12
|
+
|
13
|
+
Creevey now works smoothly with Playwright! This gives you another solid option for browser automation, besides Selenium WebDriver. We've tried to make it flexible for different ways you might want to use it.
|
14
|
+
|
15
|
+
- **Using Playwright for Browser Automation:** You can set up Playwright right in your `creevey.config.ts`.
|
16
|
+
|
17
|
+
```typescript
|
18
|
+
// creevey.config.ts
|
19
|
+
import { CreeveyConfig } from 'creevey';
|
20
|
+
import { PlaywrightWebdriver } from 'creevey/playwright';
|
21
|
+
|
22
|
+
const config: CreeveyConfig = {
|
23
|
+
webdriver: PlaywrightWebdriver,
|
24
|
+
// Set `useDocker to false in CI environments to use standalone Playwright browsers
|
25
|
+
useDocker: !Boolean(process.env.CI),
|
26
|
+
browsers: {
|
27
|
+
chrome: {
|
28
|
+
browserName: 'chromium', // For Playwright, usually 'chromium', 'firefox', or 'webkit'
|
29
|
+
playwrightOptions: {
|
30
|
+
headless: false, // Example: show the browser while debugging
|
31
|
+
},
|
32
|
+
},
|
33
|
+
firefox: {
|
34
|
+
browserName: 'firefox',
|
35
|
+
},
|
36
|
+
},
|
37
|
+
};
|
38
|
+
|
39
|
+
export default config;
|
40
|
+
```
|
41
|
+
|
42
|
+
- **Playwright with Selenium Grid (Heads-up: Chrome Only for now):**
|
43
|
+
You can connect Playwright to a Selenium Grid. Just a heads-up, this only works with the Chrome browser because of how Playwright talks to Selenium Grid.
|
44
|
+
|
45
|
+
```typescript
|
46
|
+
// creevey.config.ts
|
47
|
+
import { CreeveyConfig } from 'creevey';
|
48
|
+
import { PlaywrightWebdriver } from 'creevey/playwright';
|
49
|
+
|
50
|
+
const config: CreeveyConfig = {
|
51
|
+
webdriver: PlaywrightWebdriver,
|
52
|
+
gridUrl: 'http://your-selenium-grid-url:4444/wd/hub', // Your Selenium Grid URL
|
53
|
+
browsers: {
|
54
|
+
chromeOnGrid: {
|
55
|
+
browserName: 'chrome', // Needs to be 'chrome' for Playwright with Selenium Grid
|
56
|
+
seleniumCapabilities: {
|
57
|
+
// Add any Selenium settings your Grid needs here
|
58
|
+
},
|
59
|
+
},
|
60
|
+
},
|
61
|
+
};
|
62
|
+
|
63
|
+
export default config;
|
64
|
+
```
|
65
|
+
|
66
|
+
- **Recording Traces and Video for Easier Debugging:**
|
67
|
+
To help you figure out what's going on in your tests, Creevey can use Playwright's trace and video recording. Just run Creevey in debug mode.
|
68
|
+
|
69
|
+
```bash
|
70
|
+
creevey --debug
|
71
|
+
```
|
72
|
+
|
73
|
+
You'll find the traces (`trace.zip`) and videos (`video.webm`) in the `traces` folder inside your report directory, sorted by process ID.
|
74
|
+
|
75
|
+
#### 2. Browser Config Changes for Selenium & Playwright (Heads-up: This is a Breaking Change)
|
76
|
+
|
77
|
+
We've changed how you set up browsers in `creevey.config.ts`. This helps make it clearer which settings are for Selenium and which are for Playwright.
|
78
|
+
|
79
|
+
- **How to Update:**
|
80
|
+
|
81
|
+
- Settings like `browserVersion` and `platformName` (and other custom Selenium settings) now need to go inside a `seleniumCapabilities` object.
|
82
|
+
- Playwright-specific settings should go into a `playwrightOptions` object.
|
83
|
+
- The new `webdriver` field lets you choose your WebDriver implementation. While it defaults to Selenium for now, this may change. We recommend explicitly setting it by importing and using either `SeleniumWebdriver` or `PlaywrightWebdriver`.
|
84
|
+
|
85
|
+
**Example:**
|
86
|
+
|
87
|
+
```typescript
|
88
|
+
// Before
|
89
|
+
const config: CreeveyConfig = {
|
90
|
+
browsers: {
|
91
|
+
chrome: {
|
92
|
+
browserName: 'chrome',
|
93
|
+
browserVersion: '90.0',
|
94
|
+
platformName: 'linux',
|
95
|
+
customSeleniumOption: 'value',
|
96
|
+
},
|
97
|
+
},
|
98
|
+
};
|
99
|
+
|
100
|
+
// After
|
101
|
+
import { SeleniumWebdriver } from 'creevey/selenium';
|
102
|
+
// or
|
103
|
+
// import { PlaywrightWebdriver } from 'creevey/playwright';
|
104
|
+
|
105
|
+
const config: CreeveyConfig = {
|
106
|
+
webdriver: SeleniumWebdriver, // or PlaywrightWebdriver
|
107
|
+
browsers: {
|
108
|
+
chrome: {
|
109
|
+
browserName: 'chrome',
|
110
|
+
// browserName: 'chromium', // For Playwright
|
111
|
+
seleniumCapabilities: {
|
112
|
+
// Selenium-specific stuff
|
113
|
+
browserVersion: '90.0',
|
114
|
+
platformName: 'linux',
|
115
|
+
customSeleniumOption: 'value',
|
116
|
+
},
|
117
|
+
playwrightOptions: {
|
118
|
+
// Playwright-specific stuff
|
119
|
+
headless: true,
|
120
|
+
// ... other Playwright launch options
|
121
|
+
},
|
122
|
+
},
|
123
|
+
},
|
124
|
+
};
|
125
|
+
```
|
126
|
+
|
127
|
+
#### 3. Mocha is Gone & There's a New Test Context API (Heads-up: This is a Big Breaking Change)
|
128
|
+
|
129
|
+
Creevey doesn't use the Mocha testing framework anymore. This makes things simpler internally and means you'll write tests a bit differently using a new `CreeveyTestContext`.
|
130
|
+
|
131
|
+
- **How to Update:**
|
132
|
+
|
133
|
+
- Change your tests to use the `context` parameter instead of `this`.
|
134
|
+
- Image matching methods are now called on the `context` object.
|
135
|
+
- The `context.webdriver` property gives you direct access to the configured WebDriver instance (Selenium or Playwright) for advanced browser interactions.
|
136
|
+
|
137
|
+
**Example:**
|
138
|
+
|
139
|
+
```typescript
|
140
|
+
// Before (Mocha style)
|
141
|
+
it('should match the image', async function () {
|
142
|
+
this.expect(await this.takeScreenshot()).to.matchImage('example');
|
143
|
+
});
|
144
|
+
|
145
|
+
// After (New Creevey context style)
|
146
|
+
it('should match the image', async (context) => {
|
147
|
+
await context.matchImage(await context.takeScreenshot(), 'example');
|
148
|
+
});
|
149
|
+
|
150
|
+
// Example using context.webdriver with Selenium WebDriver API
|
151
|
+
it('should interact with an element using Selenium', async (context) => {
|
152
|
+
const seleniumWebDriver = context.webdriver; // Assuming SeleniumWebdriver is configured
|
153
|
+
const element = await seleniumWebDriver.findElement({ css: '#myElement' });
|
154
|
+
await element.click();
|
155
|
+
// ... more Selenium interactions
|
156
|
+
await context.matchImage(await context.takeScreenshot(), 'selenium-interaction');
|
157
|
+
});
|
158
|
+
|
159
|
+
// Example using context.webdriver with Playwright API
|
160
|
+
it('should interact with an element using Playwright', async (context) => {
|
161
|
+
const playwrightPage = context.webdriver; // Assuming PlaywrightWebdriver is configured
|
162
|
+
await playwrightPage.click('#myElement');
|
163
|
+
// ... more Playwright interactions
|
164
|
+
await context.matchImage(await context.takeScreenshot(), 'playwright-interaction');
|
165
|
+
});
|
166
|
+
```
|
167
|
+
|
168
|
+
#### 4. New: Creevey Playwright Reporter
|
169
|
+
|
170
|
+
Now you can add Creevey's visual testing to your existing Playwright test suites with the new `CreeveyPlaywrightReporter`.
|
171
|
+
|
172
|
+
- **How to Use It:** Set up the reporter in your `playwright.config.ts` (or `.js`).
|
173
|
+
|
174
|
+
```typescript
|
175
|
+
// playwright.config.ts
|
176
|
+
import { defineConfig } from '@playwright/test';
|
177
|
+
|
178
|
+
export default defineConfig({
|
179
|
+
reporter: [
|
180
|
+
['list'], // Or any other standard Playwright reporter
|
181
|
+
[
|
182
|
+
'creevey/playwright-reporter',
|
183
|
+
{
|
184
|
+
// Optional: Creevey reporter specific settings
|
185
|
+
reportDir: './creevey-report', // Where the Creevey HTML report goes
|
186
|
+
screenDir: './creevey-images', // Where your reference (golden) images are stored
|
187
|
+
// You can pass other Creevey config options here too,
|
188
|
+
// like diffOptions, port, etc.
|
189
|
+
},
|
190
|
+
],
|
191
|
+
],
|
192
|
+
// ... other Playwright settings like projects, testDir, etc.
|
193
|
+
use: {
|
194
|
+
// Make sure your tests take screenshots that the reporter can find
|
195
|
+
// For example, using Playwright's toHaveScreenshot() or your own way
|
196
|
+
},
|
197
|
+
});
|
198
|
+
```
|
199
|
+
|
200
|
+
Your Playwright tests would then use familiar methods like `await expect(page).toHaveScreenshot('image-name.png');` or `await page.screenshot({ path: 'path/to/image.png' });`. The Creevey reporter will take care of the visual comparisons and create the report. Check out `docs/playwright-reporter.md` for more details.
|
201
|
+
|
202
|
+
#### 5. Approve Tests Right from the Report UI (Update Mode)
|
203
|
+
|
204
|
+
We've added an "Update Mode" so you can approve changes to test images directly in the Creevey report UI. No need to run Storybook or open browsers.
|
205
|
+
|
206
|
+
- The UI will show you when it's in update mode. You won't be able to run tests from the UI in this mode; it's all about reviewing and approving visual changes. To run Creevey in this UI Update mode, use the `report` command:
|
207
|
+
|
208
|
+
```bash
|
209
|
+
creevey report
|
210
|
+
```
|
211
|
+
|
212
|
+
- You can specify report directory to use for UI Update mode
|
213
|
+
|
214
|
+
#### 6. New JUnit Reporter & Better Reporter Options
|
215
|
+
|
216
|
+
- **JUnit Reporter:** You can now get JUnit-compatible XML reports, which is handy for CI/CD setups.
|
217
|
+
- **How to Use It:** Set `reporter: 'junit'` in your `creevey.config.ts`.
|
218
|
+
- You can tell it where to save the file with `reporterOptions: { outputFile: 'path/to/report.xml' }`.
|
219
|
+
- **Reporter Setup:** Setting up reporters has moved from command-line options to your `creevey.config.ts` file.
|
220
|
+
|
221
|
+
```typescript
|
222
|
+
// In creevey.config.ts
|
223
|
+
const config: CreeveyConfig = {
|
224
|
+
reporter: 'junit', // or 'teamcity', 'creevey'
|
225
|
+
reporterOptions: {
|
226
|
+
// custom options for the reporter you chose
|
227
|
+
// For JUnit: { outputFile: 'report.xml' }
|
228
|
+
},
|
229
|
+
};
|
230
|
+
```
|
231
|
+
|
232
|
+
#### 7. Try ODiff for Image Comparison
|
233
|
+
|
234
|
+
You can now use the `odiff` library to compare images, as an alternative to `pixelmatch`.
|
235
|
+
|
236
|
+
- **How to Use It:** Turn it on with the `--odiff` command-line flag.
|
237
|
+
- You can change its settings with `odiffOptions` in your Creevey config (by default, it uses `threshold: 0` and `antialiasing: true`).
|
238
|
+
|
239
|
+
#### 8. Easier Storybook Autostart
|
240
|
+
|
241
|
+
Starting Storybook with Creevey is now a bit simpler.
|
242
|
+
|
243
|
+
- **`--storybook-start` (`-s`) Flag:** This will automatically start your Storybook development server. Creevey will figure out if you're using npm, yarn, or pnpm.
|
244
|
+
- **How to Use It:** `creevey test -s` or `creevey test --storybook-start`
|
245
|
+
- If you want to use a different Storybook port, you can add `--storybook-port`.
|
246
|
+
- **Finds Free Ports Automatically:** If the usual Storybook port (6006) is busy, and you're using `-s`, Creevey will automatically find and use a port that's free.
|
247
|
+
|
248
|
+
---
|
249
|
+
|
250
|
+
### Other Cool Stuff and Fixes:
|
251
|
+
|
252
|
+
- **React 18 Update:** Creevey's UI parts and Storybook connection now use React 18. This is mostly an internal thing, but if you have custom React components that talk to Creevey, make sure they're compatible.
|
253
|
+
- **Build System Switched from Webpack to Vite:** We've changed the internal build system for client stuff to Vite. This means faster build times and a better development setup (like HMR). This is an internal change and probably won't affect you unless you had custom Webpack settings for Creevey.
|
254
|
+
- **Dependency Updates & Dynamic Imports:** We've updated several main dependencies (like `@koa/cors`, `@octokit/core`, `typescript`). Some parts of Creevey now load on demand to make things a bit faster. Functions like `getCreeveyCache()` and `getMatchers()` are now async.
|
255
|
+
- **Storybook Upgrades:** Creevey now works well with Storybook 8.x versions (like 8.4.1, 8.6.12). This includes some API changes, like how icons are imported (`@storybook/components` is now `@storybook/icons`) and how manager APIs are imported (`@storybook/api` is now `@storybook/manager-api`).
|
256
|
+
- **Under-the-Hood Improvements:**
|
257
|
+
- The internal HTTP server switched from Koa to Hyper-Express for better performance.
|
258
|
+
- How reporters are created and how they handle events is now managed centrally in the main Creevey runner.
|
259
|
+
- **Global Environment Variable:** We added a `__CREEVEY_ENV__` global variable. It's `false` in Storybook dev mode and `true` when Creevey is running tests.
|
260
|
+
- **`--noDocker` Option:** A command-line flag to turn off Docker, even if `useDocker: true` is in your config. The default way stories are provided has changed to `hybridStoriesProvider`.
|
261
|
+
- **Test File Extensions:** Added support for `.mts` and `.cts` test files.
|
262
|
+
- **Base64 Image Support:** Image matching functions can now handle base64 encoded image strings.
|
263
|
+
- **Video Recording Fix:** Playwright won't fail anymore if `ffmpeg` isn't around for video recording; it will just give a warning and continue without video.
|
264
|
+
- **UI/UX:**
|
265
|
+
- Added hotkeys for moving around the report more easily (e.g., Alt+Space to toggle images in SwapView).
|
266
|
+
- Images in report mode load better now.
|
267
|
+
- Screenshots of just the viewport are now the default, instead of full-page screenshots, to keep things consistent.
|
268
|
+
- **Fixes:**
|
269
|
+
- Lots of fixes for Docker container stuff, including cleaning them up and registry support.
|
270
|
+
- Better error messages from Selenium and Playwright.
|
271
|
+
- Fixes for reporter problems (TeamCity artifacts, JUnit compatibility).
|
272
|
+
- Fixed how regular expressions were handled between the main process and workers.
|
273
|
+
- Made sure processes shut down properly to avoid orphaned ones.
|
274
|
+
- Fixed some issues with browsers not starting correctly on the first run.
|
275
|
+
- **Dependency Management:** We regularly update dependencies, including big ones like ESLint and TypeScript. Moved several Storybook dependencies to `devDependencies`.
|
276
|
+
- **Code Quality:** Cleaned up logging, how tests are managed (the `TestsManager` class), and how themes are handled.
|
277
|
+
|
278
|
+
---
|
279
|
+
|
280
|
+
We hope these updates make using Creevey a better experience for you. As always, check out the documentation for more details, and let us know if you run into any problems. Happy testing!
|
281
|
+
|
1
282
|
# [0.9.0-beta.5](https://github.com/wKich/creevey/compare/v0.9.0-beta.4...v0.9.0-beta.5) (2023-04-14)
|
2
283
|
|
3
284
|
# [0.9.0-beta.4](https://github.com/wKich/creevey/compare/v0.9.0-beta.3...v0.9.0-beta.4) (2023-03-24)
|
package/README.md
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
[<img width="274" alt="Creevey" src="https://user-images.githubusercontent.com/4607770/220418756-89cf4f54-ccb7-4086-a74c-a044ea1d2a61.png">](https://harrypotter.fandom.com/wiki/Colin_Creevey)
|
2
2
|
|
3
|
-
**IMPORTANT** _Looking for any help with maintaining_
|
4
|
-
|
5
3
|
Cross-browser screenshot testing tool for [Storybook](https://storybook.js.org/) with fancy UI Runner.
|
6
4
|
|
7
5
|
[](https://www.npmjs.com/package/creevey)
|
@@ -28,19 +26,20 @@ It named after [Colin Creevey](https://harrypotter.fandom.com/wiki/Colin_Creevey
|
|
28
26
|
- [Pre-requisites](#pre-requisites)
|
29
27
|
- [How to Start](#how-to-start)
|
30
28
|
- [Comparison with other tools](#comparison-with-other-tools)
|
31
|
-
- [Config
|
32
|
-
- [
|
33
|
-
-
|
34
|
-
|
35
|
-
|
29
|
+
- [Config](docs/config.md)
|
30
|
+
- [CLI commands](docs/cli.md)
|
31
|
+
- [Storybook parameters](docs/storybook.md)
|
32
|
+
- [Write interactive tests](docs/tests.md)
|
33
|
+
- [Use your Selenium Grid (LambdaTest/BrowserStack/SauceLabs/etc)](docs/grid.md)
|
36
34
|
- [Future plans](#future-plans)
|
37
35
|
- [Known issues](#known-issues)
|
38
36
|
- [Used by](#used-by)
|
39
37
|
|
40
38
|
## Pre-requisites
|
41
39
|
|
42
|
-
- Make sure you have installed [Docker](https://www.docker.com/products/docker-desktop).
|
43
|
-
- Supported Storybook versions:
|
40
|
+
- Make sure you have installed [Docker](https://www.docker.com/products/docker-desktop). If you are going to use Selenium Grid or run screenshot tests exclusively in CI you don't need Docker in that case.
|
41
|
+
- Supported Storybook versions: >= 7.x.x
|
42
|
+
- Supported Node.js versions: >= 18.x.x
|
44
43
|
|
45
44
|
## How to start
|
46
45
|
|
@@ -53,44 +52,38 @@ yarn add -D creevey
|
|
53
52
|
- Add addon `creevey` into your storybook config
|
54
53
|
|
55
54
|
```js
|
56
|
-
// .storybook/main.
|
57
|
-
|
58
|
-
stories: [
|
59
|
-
/* ... */
|
60
|
-
],
|
55
|
+
// .storybook/main.ts
|
56
|
+
const config: StorybookConfig = {
|
57
|
+
stories: [ /* ... */ ],
|
61
58
|
addons: [
|
62
59
|
/* ... */
|
63
60
|
'creevey',
|
64
61
|
],
|
65
62
|
};
|
63
|
+
|
64
|
+
export default config;
|
66
65
|
```
|
67
66
|
|
68
|
-
- Start
|
67
|
+
- Start Creevey UI Runner, which starts Storybook automatically. (To start tests from CLI, run Creevey without `--ui` flag)
|
69
68
|
|
70
69
|
```bash
|
71
|
-
yarn
|
72
|
-
yarn creevey --ui
|
70
|
+
yarn creevey test -s --ui
|
73
71
|
```
|
74
72
|
|
75
|
-
And that's it.
|
73
|
+
- Open [http://localhost:3000](http://localhost:3000) in your browser. And that's it.
|
76
74
|
|
77
|
-
**NOTE:** In first run you may noticed, that all your tests are failing, it because you don't have source screenshot images yet. If you think, that all images are acceptable, you
|
75
|
+
**NOTE:** In first run you may noticed, that all your tests are failing, it because you don't have source screenshot images yet. If you think, that all images are acceptable, you can approve them all from UI.
|
78
76
|
|
79
77
|
**NOTE:** Creevey captures screenshot of the `#storybook-root` element and sometimes you need to capture a whole browser viewport. To achieve this you could define `captureElement` Creevey parameter for story or kind. Or you may pass any different css selector.
|
80
78
|
|
81
79
|
```tsx
|
82
80
|
// stories/MyModal.stories.tsx
|
83
|
-
|
84
|
-
// NOTE: Define parameter for all stories
|
85
81
|
export default {
|
86
82
|
title: 'MyModal',
|
87
|
-
|
83
|
+
component: MyModal,
|
88
84
|
};
|
89
85
|
|
90
|
-
|
91
|
-
|
92
|
-
export const MyModalStory = () => <MyModal />;
|
93
|
-
MyModalStory.parameters = { creevey: { captureElement: null } };
|
86
|
+
export const MyModalStory = { creevey: { captureElement: null } };
|
94
87
|
```
|
95
88
|
|
96
89
|
## Comparison with other tools
|
@@ -109,19 +102,11 @@ MyModalStory.parameters = { creevey: { captureElement: null } };
|
|
109
102
|
|
110
103
|
## Future plans
|
111
104
|
|
112
|
-
- Allow use different webdrivers not only `selenium`, but also `puppeteer` or `playwright`.
|
113
|
-
- Add ability to ignore elements.
|
114
105
|
- Allow to define different viewport sizes for specific stories or capture story with different args.
|
115
106
|
- And more, check [TODO](TODO.md) for more details. Also feel free to ask about feature that you want
|
116
107
|
|
117
108
|
## Known issues
|
118
109
|
|
119
|
-
### Creevey is trying to build storybook but fail or tests don't work
|
120
|
-
|
121
|
-
This might happens because Creevey patches storybook webpack config and build nodejs bundle with stories meta information. And in some cases Creevey couldn't properly remove all unnecessary code cause of side-effects in stories files or you create stories dynamically. Try to rewrite such places. If it still doesn't help, [send to me](mailto:creevey@kich.dev) bundle that Creevey created (it located in `node_modules/creevey/.cache/creevey/storybook/main.js`)
|
122
|
-
|
123
|
-
A little bit later I'll add possibility to run tests without building that bundle, so it fixes this issue.
|
124
|
-
|
125
110
|
### Docker-in-Docker
|
126
111
|
|
127
112
|
Currently it's not possible to run Creevey in this configuration. I'll fix this in later versions.
|
@@ -138,13 +123,6 @@ This cause to flaky screenshots. Possible solutions:
|
|
138
123
|
- Replace border to box-shadow `border: 1px solid red` -> `box-shadow: 0 0 0 1px red`
|
139
124
|
- Set max retries to more than 5
|
140
125
|
|
141
|
-
### You can't directly import `selenium-webdriver` package in story file
|
142
|
-
|
143
|
-
Because tests defined in story parameters and `selenium-webdriver` depends on nodejs builtin packages. Storybook may fail to build browser bundle. To avoid import use these workarounds:
|
144
|
-
|
145
|
-
- `.findElement(By.css('#storybook-root'))` -> `.findElement({ css: '#storybook-root' })`
|
146
|
-
- `.sendKeys(Keys.ENTER)` -> `.sendKeys(this.keys.ENTER)`
|
147
|
-
|
148
126
|
## Used by
|
149
127
|
|
150
128
|
| [](https://whisk.com/) | [](https://kontur.ru/) | [](https://www.abbyy.com/) |
|
@@ -15,17 +15,27 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
15
15
|
}) : function(o, v) {
|
16
16
|
o["default"] = v;
|
17
17
|
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
};
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
19
|
+
var ownKeys = function(o) {
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
21
|
+
var ar = [];
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
23
|
+
return ar;
|
24
|
+
};
|
25
|
+
return ownKeys(o);
|
26
|
+
};
|
27
|
+
return function (mod) {
|
28
|
+
if (mod && mod.__esModule) return mod;
|
29
|
+
var result = {};
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
31
|
+
__setModuleDefault(result, mod);
|
32
|
+
return result;
|
33
|
+
};
|
34
|
+
})();
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
36
|
exports.Addon = void 0;
|
27
37
|
const react_1 = __importStar(require("react"));
|
28
|
-
const components_1 = require("
|
38
|
+
const components_1 = require("storybook/internal/components");
|
29
39
|
const Panel_js_1 = require("./Panel.js");
|
30
40
|
const Addon = ({ active, browser, controller }) => {
|
31
41
|
const [tests, setTests] = (0, react_1.useState)([]);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Addon.js","sourceRoot":"","sources":["../../../../src/client/addon/components/Addon.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"Addon.js","sourceRoot":"","sources":["../../../../src/client/addon/components/Addon.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwD;AACxD,8DAA4D;AAE5D,yCAAmC;AAQ5B,MAAM,KAAK,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAc,EAAsB,EAAE;IACvF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAa,EAAE,CAAC,CAAC;IAEnD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,IAAA,gBAAQ,EAAC,UAAU,CAAC,cAAc,CAAC,CAAC;IAEhF,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,MAAM,EAAE,CAAC;YACX,UAAU,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;YACrC,MAAM,YAAY,GAAG,UAAU,CAAC,2BAA2B,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;YACtF,QAAQ,CAAC,YAAY,CAAC,CAAC;QACzB,CAAC;IACH,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;IAElC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,WAAW,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC,MAAM,EAAE,EAAE;YACrD,iBAAiB,CAAC,MAAM,CAAC,CAAC;YAC1B,MAAM,MAAM,GAAG,UAAU,CAAC,2BAA2B,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;YAChF,QAAQ,CAAC,MAAM,CAAC,CAAC;QACnB,CAAC,CAAC,CAAC;QACH,OAAO,WAAW,CAAC;IACrB,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,WAAW,GAAG,UAAU,CAAC,cAAc,CAAC,GAAG,EAAE;YACjD,QAAQ,CAAC,UAAU,CAAC,2BAA2B,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;QAC7E,CAAC,CAAC,CAAC;QACH,OAAO,WAAW,CAAC;IACrB,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;IAE1B,OAAO,MAAM,CAAC,CAAC,CAAC,CACd,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CACb,8BAAC,gBAAK,IACJ,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,UAAU,CAAC,iBAAiB,EAC1C,cAAc,EAAE,UAAU,CAAC,cAAc,GACzC,CACH,CAAC,CAAC,CAAC,CACF,8BAAC,wBAAW,0BAA8B,CAC3C,CACF,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC;AAzCW,QAAA,KAAK,SAyChB"}
|
@@ -5,12 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.Panel = void 0;
|
7
7
|
const react_1 = __importDefault(require("react"));
|
8
|
-
const components_1 = require("
|
9
|
-
const theming_1 = require("
|
8
|
+
const components_1 = require("storybook/internal/components");
|
9
|
+
const theming_1 = require("storybook/theming");
|
10
|
+
const types_js_1 = require("../../../types.js");
|
10
11
|
const ResultsPage_js_1 = require("../../shared/components/ResultsPage.js");
|
11
12
|
const helpers_js_1 = require("../../shared/helpers.js");
|
12
13
|
const TestSelect_js_1 = __importDefault(require("./TestSelect.js"));
|
13
|
-
const lodash_1 = require("lodash");
|
14
14
|
const Wrapper = theming_1.styled.div(({ isRunning }) => ({
|
15
15
|
opacity: isRunning ? 0.5 : 1,
|
16
16
|
height: '100%',
|
@@ -29,7 +29,7 @@ const Panel = ({ tests, selectedTestId, onChangeTest }) => {
|
|
29
29
|
result?.results?.length ? (react_1.default.createElement(Wrapper, { isRunning: isRunning },
|
30
30
|
react_1.default.createElement(ResultsPage_js_1.ResultsPage, { height: '100%', key: `${result.id}_${result.results.length}`, path: (0, helpers_js_1.getTestPath)(result), results: result.results, approved: result.approved,
|
31
31
|
// addon doesn't work, add only stubs
|
32
|
-
retry: 0, onRetryChange:
|
32
|
+
retry: 0, onRetryChange: types_js_1.noop, imageName: "", onImageChange: types_js_1.noop }))) : null));
|
33
33
|
};
|
34
34
|
exports.Panel = Panel;
|
35
35
|
//# sourceMappingURL=Panel.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Panel.js","sourceRoot":"","sources":["../../../../src/client/addon/components/Panel.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAmC;AACnC,
|
1
|
+
{"version":3,"file":"Panel.js","sourceRoot":"","sources":["../../../../src/client/addon/components/Panel.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAmC;AACnC,8DAAuD;AACvD,+CAA2C;AAC3C,gDAAmD;AACnD,2EAAqE;AACrE,wDAAsD;AACtD,oEAAyC;AASzC,MAAM,OAAO,GAAG,gBAAM,CAAC,GAAG,CAAyB,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;IACrE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC5B,MAAM,EAAE,MAAM;CACf,CAAC,CAAC,CAAC;AAEJ,MAAM,mBAAmB,GAAG,gBAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IACrD,OAAO,EAAE,KAAK;IACd,MAAM,EAAE,aAAa,KAAK,CAAC,cAAc,EAAE;CAC5C,CAAC,CAAC,CAAC;AAEG,MAAM,KAAK,GAAG,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,YAAY,EAAc,EAAe,EAAE;IACxF,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,cAAc,CAAC,CAAC;IAE1D,MAAM,SAAS,GAAG,MAAM,EAAE,MAAM,KAAK,SAAS,CAAC;IAE/C,OAAO,CACL;QACG,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,CACnB,8BAAC,mBAAmB;YAClB,8BAAC,uBAAU,IAAC,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,GAAI,CACpE,CACvB;QACA,SAAS,IAAI,8BAAC,mBAAM,OAAG;QACvB,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CACzB,8BAAC,OAAO,IAAC,SAAS,EAAE,SAAS;YAC3B,8BAAC,4BAAW,IACV,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,GAAG,MAAM,CAAC,EAAE,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,EAC5C,IAAI,EAAE,IAAA,wBAAW,EAAC,MAAM,CAAC,EACzB,OAAO,EAAE,MAAM,CAAC,OAAO,EACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,qCAAqC;gBACrC,KAAK,EAAE,CAAC,EACR,aAAa,EAAE,eAAI,EACnB,SAAS,EAAC,EAAE,EACZ,aAAa,EAAE,eAAI,GACnB,CACM,CACX,CAAC,CAAC,CAAC,IAAI,CACJ,CACP,CAAC;AACJ,CAAC,CAAC;AA/BW,QAAA,KAAK,SA+BhB"}
|
@@ -5,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.default = TestSelect;
|
7
7
|
const react_1 = __importDefault(require("react"));
|
8
|
-
const components_1 = require("
|
8
|
+
const components_1 = require("storybook/internal/components");
|
9
9
|
const icons_1 = require("@storybook/icons");
|
10
|
-
const theming_1 = require("
|
10
|
+
const theming_1 = require("storybook/theming");
|
11
11
|
const utils_js_1 = require("../utils.js");
|
12
12
|
const LinkIconContainer = theming_1.styled.span(({ theme }) => ({
|
13
13
|
display: 'inline-block',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TestSelect.js","sourceRoot":"","sources":["../../../../src/client/addon/components/TestSelect.tsx"],"names":[],"mappings":";;;;;AAoBA,6BA2BC;AA/CD,kDAAmC;AACnC,
|
1
|
+
{"version":3,"file":"TestSelect.js","sourceRoot":"","sources":["../../../../src/client/addon/components/TestSelect.tsx"],"names":[],"mappings":";;;;;AAoBA,6BA2BC;AA/CD,kDAAmC;AACnC,8DAAqF;AACrF,4CAA4C;AAC5C,+CAA2C;AAE3C,0CAAmD;AAQnD,MAAM,iBAAiB,GAAG,gBAAM,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IACpD,OAAO,EAAE,cAAc;IACvB,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW;IAC9B,SAAS,EAAE,QAAQ;CACpB,CAAC,CAAC,CAAC;AAEJ,SAAwB,UAAU,CAAC,KAAsB;IACvD,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,cAAc,CAAC,EAAE,QAAQ,IAAI,EAAE,CAAC;IACxF,OAAO,CACL,8BAAC,wBAAW,IACV,OAAO,EAAC,OAAO,EACf,SAAS,EAAC,QAAQ,EAClB,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CACvB,8BAAC,4BAAe,IACd,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC7B,EAAE,EAAE,CAAC,CAAC,EAAE;gBACR,KAAK,EAAE,CAAC,CAAC,QAAQ,IAAI,EAAE;gBACvB,MAAM,EAAE,KAAK,CAAC,cAAc,KAAK,CAAC,CAAC,EAAE;gBACrC,OAAO,EAAE,GAAG,EAAE;oBACZ,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;oBACzB,MAAM,EAAE,CAAC;gBACX,CAAC;gBACD,IAAI,EAAE,8BAAC,iBAAiB,QAAE,IAAA,+BAAoB,EAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAqB;aACtF,CAAC,CAAC,GACH,CACH;QAED,8BAAC,mBAAM,IAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAC,SAAS;YACpC,8BAAC,gBAAQ,OAAG;YACX,QAAQ,CACF,CACG,CACf,CAAC;AACJ,CAAC"}
|
@@ -15,20 +15,30 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
15
15
|
}) : function(o, v) {
|
16
16
|
o["default"] = v;
|
17
17
|
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
};
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
19
|
+
var ownKeys = function(o) {
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
21
|
+
var ar = [];
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
23
|
+
return ar;
|
24
|
+
};
|
25
|
+
return ownKeys(o);
|
26
|
+
};
|
27
|
+
return function (mod) {
|
28
|
+
if (mod && mod.__esModule) return mod;
|
29
|
+
var result = {};
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
31
|
+
__setModuleDefault(result, mod);
|
32
|
+
return result;
|
33
|
+
};
|
34
|
+
})();
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
36
|
exports.Tools = void 0;
|
27
37
|
const react_1 = __importStar(require("react"));
|
28
38
|
const qs_1 = require("qs");
|
29
|
-
const components_1 = require("
|
39
|
+
const components_1 = require("storybook/internal/components");
|
30
40
|
const icons_1 = require("@storybook/icons");
|
31
|
-
const theming_1 = require("
|
41
|
+
const theming_1 = require("storybook/theming");
|
32
42
|
const Icons_js_1 = require("./Icons.js");
|
33
43
|
const types_js_1 = require("../../../types.js");
|
34
44
|
const helpers_js_1 = require("../../shared/helpers.js");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Tools.js","sourceRoot":"","sources":["../../../../src/client/addon/components/Tools.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"Tools.js","sourceRoot":"","sources":["../../../../src/client/addon/components/Tools.tsx"],"names":[],"mappings":"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"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { denormalizeStoryParameters } from '../../shared/index.js';
|
2
2
|
import { CreeveyStatus, CreeveyUpdate, TestData, TestStatus, StoriesRaw } from '../../types.js';
|
3
3
|
import { CreeveyClientApi } from '../shared/creeveyClientApi.js';
|
4
|
-
import { API } from '
|
4
|
+
import { API } from 'storybook/manager-api';
|
5
5
|
export declare const ADDON_ID = "creevey";
|
6
6
|
export declare class CreeveyController {
|
7
7
|
storybookApi: API;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.CreeveyController = exports.ADDON_ID = void 0;
|
4
|
-
const types_1 = require("
|
4
|
+
const types_1 = require("storybook/internal/types");
|
5
5
|
const index_js_1 = require("../../shared/index.js");
|
6
6
|
const types_js_1 = require("../../types.js");
|
7
7
|
const creeveyClientApi_js_1 = require("../shared/creeveyClientApi.js");
|
@@ -9,13 +9,13 @@ const helpers_js_1 = require("../shared/helpers.js");
|
|
9
9
|
const utils_js_1 = require("./utils.js");
|
10
10
|
exports.ADDON_ID = 'creevey';
|
11
11
|
// TODO Add `useController` hook
|
12
|
-
// TODO use `import { useGlobals, useStorybookApi } from '
|
12
|
+
// TODO use `import { useGlobals, useStorybookApi } from 'storybook/manager-api';`
|
13
13
|
class CreeveyController {
|
14
14
|
storybookApi;
|
15
15
|
storyId = '';
|
16
16
|
activeBrowser = '';
|
17
17
|
selectedTestId = '';
|
18
|
-
status = { isRunning: false, tests: {}, browsers: [] };
|
18
|
+
status = { isRunning: false, tests: {}, browsers: [], isUpdateMode: false };
|
19
19
|
creeveyApi = null;
|
20
20
|
stories = {};
|
21
21
|
updateStatusListeners = [];
|