Skip to content

Commit 98f6ac4

Browse files
committed
chore: confirm working with e2e
1 parent 12cc73f commit 98f6ac4

File tree

3 files changed

+1757
-1526
lines changed

3 files changed

+1757
-1526
lines changed

e2e/README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Once it is complete, we would check for build (production) files.
3535

3636
```bash
3737
yarn build
38+
yarn archive
3839
yarn test
3940
```
4041

@@ -55,15 +56,15 @@ We use travis CI and the following sequence of commands take care of e2e testing
5556

5657
```yml
5758
script:
58-
- yarn
59-
- yarn serve &>/dev/null &
60-
- yarn wait-for-test-server
61-
- yarn start &>/dev/null &
62-
- yarn wait-for-wpackio-server
63-
- yarn cypress:runapp
64-
- yarn build
65-
- yarn cypress:runprod
66-
- yarn test
59+
- yarn
60+
- yarn serve &>/dev/null &
61+
- yarn wait-for-test-server
62+
- yarn start &>/dev/null &
63+
- yarn wait-for-wpackio-server
64+
- yarn cypress:runapp
65+
- yarn build
66+
- yarn cypress:runprod
67+
- yarn test
6768
```
6869
6970
We use the public version of cypress dashboard, which can be found [here](https://dashboard.cypress.io/#/projects/r3p1vm/runs).

e2e/__tests__/fileExists.intg.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable import/extensions */
12
/* eslint-disable spaced-comment, jest/valid-expect */
23
/// <reference types="jest" />
34

@@ -17,8 +18,8 @@ function fileExists(filepath) {
1718
describe('after build', () => {
1819
test('all javascript app got compiled', () => {
1920
const jsApps = [
20-
...jsManifest.wpackioEp.main.js,
21-
...jsManifest.wpackioEp.main.css,
21+
...jsManifest.wpackioEp.main.assets.js,
22+
...jsManifest.wpackioEp.main.assets.css,
2223
];
2324
jsApps.forEach(file => {
2425
expect(
@@ -28,8 +29,8 @@ describe('after build', () => {
2829
});
2930
test('all typescript app got compiled', () => {
3031
const tsApps = [
31-
...tsManifest.wpackioEp.main.js,
32-
...tsManifest.wpackioEp.main.css,
32+
...tsManifest.wpackioEp.main.assets.js,
33+
...tsManifest.wpackioEp.main.assets.css,
3334
];
3435
tsApps.forEach(file => {
3536
expect(
@@ -44,16 +45,14 @@ describe('after pack', () => {
4445
const zipFiles = [
4546
'index.html',
4647
'README.md',
47-
...jsManifest.wpackioEp.main.js.map(item => `dist/${item}`),
48-
...tsManifest.wpackioEp.main.js.map(item => `dist/${item}`),
48+
...jsManifest.wpackioEp.main.assets.js.map(item => `dist/${item}`),
49+
...tsManifest.wpackioEp.main.assets.js.map(item => `dist/${item}`),
4950
'dist/app/manifest.json',
5051
'dist/tsapp/manifest.json',
5152
];
5253
zipFiles.forEach(file => {
5354
expect(
54-
fileExists(
55-
path.resolve(__dirname, '../package/e2e-plug/', file)
56-
)
55+
fileExists(path.resolve(__dirname, '../package/e2e-plug/', file))
5756
).toBeTruthy();
5857
});
5958
});

0 commit comments

Comments
 (0)