Skip to content

Commit 9614658

Browse files
committed
docs: updated readme with instructions on how to run studio end-to-end test
1 parent 9261dca commit 9614658

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

README.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,18 @@ This mono repo, formerly called Web-Component, now called Studio-Web, combines f
3131
- [Studio-Web](#studio-web)
3232
- [Understanding where the components come from when you run locally](#understanding-where-the-components-come-from-when-you-run-locally)
3333
- [Testing](#testing)
34+
- [TL;DR](#tldr)
3435
- [Web-Component](#web-component-1)
3536
- [Studio-Web](#studio-web-1)
37+
- [End-to-End tests](#end-to-end-tests)
3638
- [Internationalization (i18n) and localization (l10n)](#internationalization-i18n-and-localization-l10n)
37-
- [Build \& Publish](#build--publish-the-web-component)
39+
- [Build \& Publish the Web Component](#build--publish-the-web-component)
3840
- [Preparing to publish the Web Component \& Angular Wrapper](#preparing-to-publish-the-web-component--angular-wrapper)
3941
- [Web Component \& Angular Wrapper - via a tag push](#web-component--angular-wrapper---via-a-tag-push)
4042
- [Web Component \& Angular Wrapper - manually - please don't do this!](#web-component--angular-wrapper---manually---please-dont-do-this)
41-
- [Build \& Deploy the Studio-Web App](#build--deploy-the-studio-web-app)
43+
- [Build \& Deploy the Studio-Web app](#build--deploy-the-studio-web-app)
44+
- [Automated Deployment](#automated-deployment)
45+
- [Build Studio-Web and deploy it somewhere else](#build-studio-web-and-deploy-it-somewhere-else)
4246
- [Maintainers](#maintainers)
4347
- [Contributing](#contributing)
4448
- [Acknowledgements](#acknowledgements)
@@ -189,6 +193,10 @@ to serve or import. In the instructions above, we actually show two methods you
189193
npm install
190194
npx nx run-many --targets=serve-test-data,serve,test:once --projects=web-component
191195
# Ctrl-C once "✔ All specs passed! 01:01 34 34" appears (34 specs as of writing)
196+
npx playwright install --with-deps firefox chromium webkit
197+
npx nx run-many --targets=serve-test-data,serve-web-api,serve,serve-fr,serve-es --projects=web-component,studio-web --parallel 6
198+
npx nx e2e studio-web
199+
#Expect "47 passed (4.6m)" (47 tests as of writing)
192200
npx nx test:once studio-web
193201
# Expect "TOTAL: 25 SUCCESS" (25 tests as of writing)
194202
npx nx extract-i18n studio-web
@@ -224,10 +232,29 @@ Alternatively run together as:
224232
#### Studio-Web
225233

226234
To run the unit tests for Studio-Web, first build `web-component` in one of the ways listed
227-
above (or just `npx nx build web-component`) if you have not already done so, and then run:
235+
above (or just `npx nx build web-component`) if you have not already done so, and then
236+
run:
228237

229238
npx nx test:once studio-web
230239

240+
##### End-to-End tests
241+
242+
To run the end-to-end tests for Studio-Web, please check the following:
243+
244+
- Ensure that you have built the `web-component` (run `npx nx build web-component`)
245+
- Check that `studio-cli` is installed and running (run `npx nx serve-web-api studio-web`)
246+
- Confirm that `studio-web` is up and running (run `npx nx run-many --targets=serve,serve-fr,serve-es --projects=studio-web --parallel 3`). Your browser must be able to load `http://localhost:4200/` before you proceed.
247+
- Verify that `playwright` is installed and configured (run `npx playwright install --with-deps firefox chromium webkit`)
248+
249+
Alternatively run together as:
250+
251+
npx playwright install --with-deps firefox chromium webkit && npx nx run-many --targets=serve-test-data,serve-web-api,serve,serve-fr,serve-es --projects=web-component,studio-web --parallel 6
252+
253+
Once you have confirmed that everything is online and working run:
254+
`npx nx e2e studio-web` and wait for the report.
255+
256+
**PS**: If you want to run a spec interactively you can run `npx nx e2e-ui studio-web` to get playwright interactive user interface.
257+
231258
### Internationalization (i18n) and localization (l10n)
232259

233260
`studio-web` is localized in French and Spanish. When you add new strings that need localizing,

0 commit comments

Comments
 (0)