Skip to content

Commit b003c0f

Browse files
committed
chore: updating examples for new and legacy cypress config
1 parent d4b1639 commit b003c0f

File tree

376 files changed

+61808
-1958
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

376 files changed

+61808
-1958
lines changed

.circleci/config.yml

Lines changed: 131 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,32 @@ jobs:
3535
- checkout
3636
- run: npm ci
3737
- run: npm run semantic-release
38+
39+
cyrun:
40+
docker:
41+
- image: cypress/base:16.13.2
42+
parameters:
43+
jobname:
44+
type: string
45+
steps:
46+
- attach_workspace:
47+
at: ~/
48+
- run:
49+
command: npm run test
50+
working_directory: examples/<< parameters.jobname >>
51+
- store_artifacts:
52+
path: examples/<< parameters.jobname >>/coverage
53+
- run:
54+
name: Verify Code Coverage
55+
command: npm run coverage:verify
56+
working_directory: examples/<< parameters.jobname >>
57+
- run:
58+
name: Check code coverage files 📈
59+
# we will check the final coverage report
60+
# to make sure it only has files we are interested in
61+
# because there are files covered at 0 in the report
62+
command: npm run coverage:check-files
63+
working_directory: examples/<< parameters.jobname >>
3864

3965
test-code-coverage-plugin:
4066
docker:
@@ -56,8 +82,19 @@ workflows:
5682

5783
- cypress/install:
5884
cache-key: 'cache-{{ arch }}-{{ .Branch }}-{{ checksum "package-lock.json" }}'
85+
pre-steps:
86+
- run: npm i -g npm@latest
87+
post-install:
88+
- run:
89+
name: Install deps for examples/old-cypress-config
90+
command: npm ci
91+
working_directory: examples/old-cypress-config
92+
- run:
93+
name: Install deps for examples/new-cypress-config
94+
command: npm ci
95+
working_directory: examples/new-cypress-config
5996
post-steps:
60-
- run: npm run check:markdown
97+
- run: npm run check:markdown
6198

6299
- lint:
63100
requires:
@@ -66,3 +103,96 @@ workflows:
66103
- test-code-coverage-plugin:
67104
requires:
68105
- cypress/install
106+
107+
- cyrun:
108+
name: test-<< matrix.jobname>>
109+
requires:
110+
- cypress/install
111+
matrix:
112+
parameters:
113+
jobname:
114+
- old-cypress-config/all-files
115+
- old-cypress-config/backend
116+
- old-cypress-config/before-all-visit
117+
- old-cypress-config/before-each-visit
118+
- old-cypress-config/exclude-files
119+
- old-cypress-config/frontend
120+
- old-cypress-config/fullstack
121+
- old-cypress-config/one-spec
122+
- old-cypress-config/same-folder
123+
- old-cypress-config/support-files
124+
- old-cypress-config/ts-example
125+
- old-cypress-config/unit-tests-js
126+
- old-cypress-config/use-webpack
127+
- new-cypress-config/all-files
128+
- new-cypress-config/backend
129+
- new-cypress-config/before-all-visit
130+
- new-cypress-config/before-each-visit
131+
- new-cypress-config/exclude-files
132+
- new-cypress-config/frontend
133+
- new-cypress-config/fullstack
134+
- new-cypress-config/one-spec
135+
- new-cypress-config/same-folder
136+
- new-cypress-config/support-files
137+
- new-cypress-config/ts-example
138+
- new-cypress-config/unit-tests-js
139+
- new-cypress-config/use-webpack
140+
141+
# - cypress/run:
142+
# name: Windows test
143+
# executor:
144+
# # executor comes from the "windows" orb
145+
# name: win/default
146+
# shell: bash.exe
147+
# no-workspace: true
148+
# start: npm run start:windows --prefix examples/old-cypress-config/all-files
149+
# wait-on: 'http://localhost:1234'
150+
# command: ../node_modules/.bin/cypress run
151+
# # store screenshots and videos
152+
# store_artifacts: true
153+
# post-steps:
154+
# - run: cat examples/old-cypress-config/all-files/.nyc_output/out.json
155+
# - run: cat examples/old-cypress-config/all-files/coverage/coverage-final.json
156+
# # store the created coverage report folder
157+
# # you can click on it in the CircleCI UI
158+
# # to see live static HTML site
159+
# - store_artifacts:
160+
# path: examples/old-cypress-config/all-files/coverage
161+
# # make sure the examples captures 100% of code
162+
# - run:
163+
# command: npx nyc report --check-coverage true --lines 100
164+
# working_directory: examples/old-cypress-config/all-files
165+
# - run:
166+
# name: Check code coverage 📈
167+
# # we will check the final coverage report
168+
# # to make sure it only has files we are interested in
169+
# # because there are files covered at 0 in the report
170+
# command: |
171+
# ../../node_modules/.bin/check-coverage main.js
172+
# ../../node_modules/.bin/check-coverage second.js
173+
# ../../node_modules/.bin/check-coverage not-covered.js
174+
# ../../node_modules/.bin/only-covered --from coverage/coverage-final.json main.js second.js not-covered.js
175+
# working_directory: examples/old-cypress-config/all-files
176+
177+
# - publish:
178+
# filters:
179+
# branches:
180+
# only:
181+
# - master
182+
# - beta
183+
# requires:
184+
# - unit
185+
# - backend coverage
186+
# - fullstack coverage
187+
# - example-before-each-visit
188+
# - example-before-all-visit
189+
# - example-ts-example
190+
# - example-same-folder
191+
# - example-support-files
192+
# - example-use-plugins-and-support
193+
# - example-exclude-files
194+
# - example-docker-paths
195+
# - example-use-webpack
196+
# - example-all-files
197+
# - example-unit-tests-js
198+
# - Windows test

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,5 @@ dist/
77
.cache/
88
.vscode/
99
cypress-coverage/
10-
examples/*/old-cypress-config/cypress/videos
11-
examples/*/old-cypress-config/cypress/screenshots
12-
examples/*/new-cypress-config/cypress/videos
13-
examples/*/new-cypress-config/cypress/screenshots
1410
yarn.lock
1511
.parcel-cache

examples/all-files/cypress/plugins/index.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

examples/all-files/cypress/support/commands.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

examples/all-files/package.json

Lines changed: 0 additions & 21 deletions
This file was deleted.

examples/backend/cypress/plugins/index.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/backend/cypress/support/index.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/backend/package.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

examples/before-all-visit/README.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

examples/before-all-visit/cypress.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/before-all-visit/cypress/support/index.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/before-all-visit/index.html

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/before-all-visit/main-instrumented.js

Lines changed: 0 additions & 146 deletions
This file was deleted.

examples/before-all-visit/package.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)