Skip to content

Commit aa1c258

Browse files
test: finalize e2e tests
1 parent d2a5318 commit aa1c258

21 files changed

+803
-91
lines changed

jest-puppeteer.config.js

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

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
testURL: 'http://localhost/',
3-
"preset": "jest-puppeteer",
3+
preset: 'jest-puppeteer',
44
transformIgnorePatterns: ['/node_modules/', '<rootDir>/dist/'],
55
watchPathIgnorePatterns: ['<rootDir>/test/js'],
66
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@
8383
"babel-jest": "^24.8.0",
8484
"commitizen": "^4.0.3",
8585
"commitlint-azure-pipelines-cli": "^1.0.2",
86-
"copy-webpack-plugin": "^5.1.1",
8786
"cross-env": "^5.2.0",
8887
"css-loader": "^3.3.2",
8988
"cz-conventional-changelog": "^3.0.2",
@@ -94,9 +93,11 @@
9493
"eslint-config-prettier": "^6.0.0",
9594
"eslint-plugin-import": "^2.19.1",
9695
"eslint-plugin-prettier": "^3.1.2",
96+
"execa": "^4.0.0",
9797
"file-loader": "^4.0.0",
9898
"husky": "^3.0.0",
9999
"jest": "^24.8.0",
100+
"jest-dev-server": "^4.4.0",
100101
"jest-junit": "^10.0.0",
101102
"jest-puppeteer": "^4.4.0",
102103
"lint-staged": "^9.5.0",

test/HMR.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* @jest-environment jsdom
3+
*/
4+
15
/* eslint-env browser */
26
/* eslint-disable no-console */
37

File renamed without changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[1],[
2+
/* 0 */,
3+
/* 1 */
4+
/***/ (function(module, exports, __webpack_require__) {
5+
6+
// extracted by extract-css-chunks-webpack-plugin
7+
8+
/***/ })
9+
]]);
Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
/******/ (function(modules) { // webpackBootstrap
2+
/******/ // install a JSONP callback for chunk loading
3+
/******/ function webpackJsonpCallback(data) {
4+
/******/ var chunkIds = data[0];
5+
/******/ var moreModules = data[1];
6+
/******/
7+
/******/
8+
/******/ // add "moreModules" to the modules object,
9+
/******/ // then flag all "chunkIds" as loaded and fire callback
10+
/******/ var moduleId, chunkId, i = 0, resolves = [];
11+
/******/ for(;i < chunkIds.length; i++) {
12+
/******/ chunkId = chunkIds[i];
13+
/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
14+
/******/ resolves.push(installedChunks[chunkId][0]);
15+
/******/ }
16+
/******/ installedChunks[chunkId] = 0;
17+
/******/ }
18+
/******/ for(moduleId in moreModules) {
19+
/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
20+
/******/ modules[moduleId] = moreModules[moduleId];
21+
/******/ }
22+
/******/ }
23+
/******/ if(parentJsonpFunction) parentJsonpFunction(data);
24+
/******/
25+
/******/ while(resolves.length) {
26+
/******/ resolves.shift()();
27+
/******/ }
28+
/******/
29+
/******/ };
30+
/******/
31+
/******/
32+
/******/ // The module cache
33+
/******/ var installedModules = {};
34+
/******/
35+
/******/ // object to store loaded CSS chunks
36+
/******/ var installedCssChunks = {
37+
/******/ 0: 0
38+
/******/ }
39+
/******/
40+
/******/ // object to store loaded and loading chunks
41+
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
42+
/******/ // Promise = chunk loading, 0 = chunk loaded
43+
/******/ var installedChunks = {
44+
/******/ 0: 0
45+
/******/ };
46+
/******/
47+
/******/
48+
/******/
49+
/******/ // script path function
50+
/******/ function jsonpScriptSrc(chunkId) {
51+
/******/ return __webpack_require__.p + "" + {"1":"26572b08b02e3c023d0d"}[chunkId] + ".js"
52+
/******/ }
53+
/******/
54+
/******/ // The require function
55+
/******/ function __webpack_require__(moduleId) {
56+
/******/
57+
/******/ // Check if module is in cache
58+
/******/ if(installedModules[moduleId]) {
59+
/******/ return installedModules[moduleId].exports;
60+
/******/ }
61+
/******/ // Create a new module (and put it into the cache)
62+
/******/ var module = installedModules[moduleId] = {
63+
/******/ i: moduleId,
64+
/******/ l: false,
65+
/******/ exports: {}
66+
/******/ };
67+
/******/
68+
/******/ // Execute the module function
69+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
70+
/******/
71+
/******/ // Flag the module as loaded
72+
/******/ module.l = true;
73+
/******/
74+
/******/ // Return the exports of the module
75+
/******/ return module.exports;
76+
/******/ }
77+
/******/
78+
/******/ // This file contains only the entry chunk.
79+
/******/ // The chunk loading function for additional chunks
80+
/******/ __webpack_require__.e = function requireEnsure(chunkId) {
81+
/******/ var promises = [];
82+
/******/
83+
/******/
84+
/******/ // extract-css-chunks-webpack-plugin CSS loading
85+
/******/ var cssChunks = {"1":1};
86+
/******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);
87+
/******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {
88+
/******/ promises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {
89+
/******/ var href = "" + {"1":"c4d90d38e7a606ae4d4c"}[chunkId] + ".css";
90+
/******/ var fullhref = __webpack_require__.p + href;
91+
/******/ var existingLinkTags = document.getElementsByTagName("link");
92+
/******/ for(var i = 0; i < existingLinkTags.length; i++) {
93+
/******/ var tag = existingLinkTags[i];
94+
/******/ var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href");
95+
/******/ if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return resolve();
96+
/******/ }
97+
/******/ var existingStyleTags = document.getElementsByTagName("style");
98+
/******/ for(var i = 0; i < existingStyleTags.length; i++) {
99+
/******/ var tag = existingStyleTags[i];
100+
/******/ var dataHref = tag.getAttribute("data-href");
101+
/******/ if(dataHref === href || dataHref === fullhref) return resolve();
102+
/******/ }
103+
/******/ var linkTag = document.createElement("link");
104+
/******/ linkTag.rel = "stylesheet";
105+
/******/ linkTag.type = "text/css";
106+
/******/ linkTag.onload = resolve;
107+
/******/ linkTag.onerror = function(event) {
108+
/******/ var request = event && event.target && event.target.src || fullhref;
109+
/******/ var err = new Error("Loading CSS chunk " + chunkId + " failed.\n(" + request + ")");
110+
/******/ err.code = "CSS_CHUNK_LOAD_FAILED";
111+
/******/ err.request = request;
112+
/******/ delete installedCssChunks[chunkId]
113+
/******/ linkTag.parentNode.removeChild(linkTag)
114+
/******/ reject(err);
115+
/******/ };
116+
/******/ linkTag.href = fullhref;
117+
/******/ if (linkTag.href.indexOf(window.location.origin + '/') !== 0) {
118+
/******/ linkTag.crossOrigin = "anonymous";
119+
/******/ }
120+
/******/ var insert = function insert(linkTag) {
121+
/******/ const reference = document.querySelector('.hot-reload');
122+
/******/
123+
/******/ if (reference) {
124+
/******/ reference.parentNode.insertBefore(linkTag, reference);
125+
/******/ }
126+
/******/ }; console.log('insert',insert)
127+
/******/ if (typeof insert === 'function') { insert(linkTag); }
128+
/******/ else { var target = document.querySelector(function insert(linkTag) {
129+
/******/ const reference = document.querySelector('.hot-reload');
130+
/******/
131+
/******/ if (reference) {
132+
/******/ reference.parentNode.insertBefore(linkTag, reference);
133+
/******/ }
134+
/******/ }); target && insert === 'body' ? target && target.insertBefore(linkTag,target.firstChild) : target.appendChild(linkTag); }
135+
/******/ }).then(function() {
136+
/******/ installedCssChunks[chunkId] = 0;
137+
/******/ }));
138+
/******/ }
139+
/******/
140+
/******/ // JSONP chunk loading for javascript
141+
/******/
142+
/******/ var installedChunkData = installedChunks[chunkId];
143+
/******/ if(installedChunkData !== 0) { // 0 means "already installed".
144+
/******/
145+
/******/ // a Promise means "currently loading".
146+
/******/ if(installedChunkData) {
147+
/******/ promises.push(installedChunkData[2]);
148+
/******/ } else {
149+
/******/ // setup Promise in chunk cache
150+
/******/ var promise = new Promise(function(resolve, reject) {
151+
/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
152+
/******/ });
153+
/******/ promises.push(installedChunkData[2] = promise);
154+
/******/
155+
/******/ // start chunk loading
156+
/******/ var script = document.createElement('script');
157+
/******/ var onScriptComplete;
158+
/******/
159+
/******/ script.charset = 'utf-8';
160+
/******/ script.timeout = 120;
161+
/******/ if (__webpack_require__.nc) {
162+
/******/ script.setAttribute("nonce", __webpack_require__.nc);
163+
/******/ }
164+
/******/ script.src = jsonpScriptSrc(chunkId);
165+
/******/ if (script.src.indexOf(window.location.origin + '/') !== 0) {
166+
/******/ script.crossOrigin = "anonymous";
167+
/******/ }
168+
/******/ // create error before stack unwound to get useful stacktrace later
169+
/******/ var error = new Error();
170+
/******/ onScriptComplete = function (event) {
171+
/******/ // avoid mem leaks in IE.
172+
/******/ script.onerror = script.onload = null;
173+
/******/ clearTimeout(timeout);
174+
/******/ var chunk = installedChunks[chunkId];
175+
/******/ if(chunk !== 0) {
176+
/******/ if(chunk) {
177+
/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
178+
/******/ var realSrc = event && event.target && event.target.src;
179+
/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
180+
/******/ error.name = 'ChunkLoadError';
181+
/******/ error.type = errorType;
182+
/******/ error.request = realSrc;
183+
/******/ chunk[1](error);
184+
/******/ }
185+
/******/ installedChunks[chunkId] = undefined;
186+
/******/ }
187+
/******/ };
188+
/******/ var timeout = setTimeout(function(){
189+
/******/ onScriptComplete({ type: 'timeout', target: script });
190+
/******/ }, 120000);
191+
/******/ script.onerror = script.onload = onScriptComplete;
192+
/******/ document.head.appendChild(script);
193+
/******/ }
194+
/******/ }
195+
/******/ return Promise.all(promises);
196+
/******/ };
197+
/******/
198+
/******/ // expose the modules object (__webpack_modules__)
199+
/******/ __webpack_require__.m = modules;
200+
/******/
201+
/******/ // expose the module cache
202+
/******/ __webpack_require__.c = installedModules;
203+
/******/
204+
/******/ // define getter function for harmony exports
205+
/******/ __webpack_require__.d = function(exports, name, getter) {
206+
/******/ if(!__webpack_require__.o(exports, name)) {
207+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
208+
/******/ }
209+
/******/ };
210+
/******/
211+
/******/ // define __esModule on exports
212+
/******/ __webpack_require__.r = function(exports) {
213+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
214+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
215+
/******/ }
216+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
217+
/******/ };
218+
/******/
219+
/******/ // create a fake namespace object
220+
/******/ // mode & 1: value is a module id, require it
221+
/******/ // mode & 2: merge all properties of value into the ns
222+
/******/ // mode & 4: return value when already ns object
223+
/******/ // mode & 8|1: behave like require
224+
/******/ __webpack_require__.t = function(value, mode) {
225+
/******/ if(mode & 1) value = __webpack_require__(value);
226+
/******/ if(mode & 8) return value;
227+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
228+
/******/ var ns = Object.create(null);
229+
/******/ __webpack_require__.r(ns);
230+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
231+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
232+
/******/ return ns;
233+
/******/ };
234+
/******/
235+
/******/ // getDefaultExport function for compatibility with non-harmony modules
236+
/******/ __webpack_require__.n = function(module) {
237+
/******/ var getter = module && module.__esModule ?
238+
/******/ function getDefault() { return module['default']; } :
239+
/******/ function getModuleExports() { return module; };
240+
/******/ __webpack_require__.d(getter, 'a', getter);
241+
/******/ return getter;
242+
/******/ };
243+
/******/
244+
/******/ // Object.prototype.hasOwnProperty.call
245+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
246+
/******/
247+
/******/ // __webpack_public_path__
248+
/******/ __webpack_require__.p = "/";
249+
/******/
250+
/******/ // on error function for async loading
251+
/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
252+
/******/
253+
/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
254+
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
255+
/******/ jsonpArray.push = webpackJsonpCallback;
256+
/******/ jsonpArray = jsonpArray.slice();
257+
/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
258+
/******/ var parentJsonpFunction = oldJsonpFunction;
259+
/******/
260+
/******/
261+
/******/ // Load entry module and return exports
262+
/******/ return __webpack_require__(__webpack_require__.s = 0);
263+
/******/ })
264+
/************************************************************************/
265+
/******/ ([
266+
/* 0 */
267+
/***/ (function(module, exports, __webpack_require__) {
268+
269+
/* eslint-env browser */
270+
271+
// eslint-disable-next-line
272+
__webpack_require__.e(/* import() */ 1).then(__webpack_require__.t.bind(null, 1, 7));
273+
274+
275+
/***/ })
276+
/******/ ]);

0 commit comments

Comments
 (0)