File tree Expand file tree Collapse file tree 3 files changed +36
-3
lines changed Expand file tree Collapse file tree 3 files changed +36
-3
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ Tools via **Unix Command Line Interface** with no installation and just using **
26
26
- [ Ookla Speedtest CLI] ( #ookla-speedtest-cli )
27
27
- [ Google Cloud CLI] ( #google-cloud-cli )
28
28
- [ Graph Viz for docker compose] ( #graph-viz-for-docker-compose )
29
+ - [ Playwright] ( #playwright )
29
30
- [ Author] ( #author )
30
31
- [ Contributors] ( #contributors )
31
32
@@ -396,6 +397,10 @@ gcloud help
396
397
gcloud storage ls
397
398
` ` `
398
399
400
+ > [gcloud CLI overview](https://cloud.google.com/sdk/gcloud).
401
+
402
+ > [gcloud auth login](https://cloud.google.com/sdk/gcloud/reference/auth/login).
403
+
399
404
# ## Graph Viz for docker compose
400
405
401
406
This will create a dependency graph in ` display` only, ` dot` , or ` image` formats
@@ -423,9 +428,17 @@ docker-compose-viz render --output-format=image
423
428
docker-compose-viz render --output-format=image --output-file=graph.png
424
429
` ` `
425
430
426
- > [gcloud CLI overview](https://cloud.google.com/sdk/gcloud).
431
+ # ## Playwright
427
432
428
- > [gcloud auth login](https://cloud.google.com/sdk/gcloud/reference/auth/login).
433
+ ` ` ` shell
434
+ playwright # it will open the /bin/bash inside the container
435
+ # then you can run the other test related commands
436
+ npx playwright install chromium
437
+ npm run test
438
+ # etc...
439
+ ` ` `
440
+
441
+ > For more info, please check its [official documentation](https://playwright.dev/docs/docker).
429
442
430
443
# # Author
431
444
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ set -e
3
+
4
+ IMAGE=mcr.microsoft.com/playwright:v1.44.0-jammy
5
+ WORKDIR=/app
6
+
7
+ # should be executed from your working directory
8
+ docker run -it --rm \
9
+ --volume $PWD :$WORKDIR \
10
+ --workdir $WORKDIR \
11
+ --network=" host" \
12
+ --ipc=host \
13
+ $IMAGE " ${@ } "
Original file line number Diff line number Diff line change @@ -144,6 +144,11 @@ install_docker-compose-viz() {
144
144
sudo ln -sf ${BASEDIR} /bin/docker-compose-viz /usr/local/bin/docker-compose-viz
145
145
}
146
146
147
+ install_playwright () {
148
+ show_msg " Activating playwright..."
149
+ sudo ln -sf ${BASEDIR} /bin/playwright /usr/local/bin/playwright
150
+ }
151
+
147
152
install_all () {
148
153
install_aws
149
154
install_node
@@ -154,14 +159,15 @@ install_all() {
154
159
install_speedtest
155
160
install_gcloud
156
161
install_docker-compose-viz
162
+ install_playwright
157
163
}
158
164
159
165
# Main
160
166
161
167
show_begin
162
168
163
169
PS3=" Choose an option: "
164
- select opt in ALL aws node yarn yarn-berry serverless terraform speedtest gcloud docker-compose-viz EXIT; do
170
+ select opt in ALL aws node yarn yarn-berry serverless terraform speedtest gcloud docker-compose-viz playwright EXIT; do
165
171
case ${opt} in
166
172
ALL) install_all ;;
167
173
aws) install_aws ;;
@@ -173,6 +179,7 @@ select opt in ALL aws node yarn yarn-berry serverless terraform speedtest gcloud
173
179
speedtest) install_speedtest ;;
174
180
gcloud) install_gcloud ;;
175
181
docker-compose-viz) install_docker-compose-viz ;;
182
+ playwright) install_playwright ;;
176
183
EXIT) show_msg " Bye o/" ;;
177
184
* ) show_help " Error: incorrect option." && exit 2 ;;
178
185
esac
You can’t perform that action at this time.
0 commit comments