Skip to content

Commit 8ec3cc8

Browse files
authored
test: add e2e tests for historyApiFallback option (#3793)
1 parent 24647d3 commit 8ec3cc8

File tree

5 files changed

+935
-340
lines changed

5 files changed

+935
-340
lines changed
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`historyApiFallback option as boolean should handle GET request to directory: console messages 1`] = `Array []`;
4+
5+
exports[`historyApiFallback option as boolean should handle GET request to directory: page errors 1`] = `Array []`;
6+
7+
exports[`historyApiFallback option as boolean should handle GET request to directory: response headers content-type 1`] = `"text/html; charset=utf-8"`;
8+
9+
exports[`historyApiFallback option as boolean should handle GET request to directory: response status 1`] = `200`;
10+
11+
exports[`historyApiFallback option as boolean should handle GET request to directory: response text 1`] = `
12+
"Heyyy
13+
"
14+
`;
15+
16+
exports[`historyApiFallback option as object should handle GET request to directory: console messages 1`] = `Array []`;
17+
18+
exports[`historyApiFallback option as object should handle GET request to directory: page errors 1`] = `Array []`;
19+
20+
exports[`historyApiFallback option as object should handle GET request to directory: response headers content-type 1`] = `"text/html; charset=utf-8"`;
21+
22+
exports[`historyApiFallback option as object should handle GET request to directory: response status 1`] = `200`;
23+
24+
exports[`historyApiFallback option as object should handle GET request to directory: response text 1`] = `
25+
"Foobar
26+
"
27+
`;
28+
29+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect any other specified rewrites: console messages 1`] = `Array []`;
30+
31+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect any other specified rewrites: page errors 1`] = `Array []`;
32+
33+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect any other specified rewrites: response headers content-type 1`] = `"text/html; charset=UTF-8"`;
34+
35+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect any other specified rewrites: response status 1`] = `200`;
36+
37+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect any other specified rewrites: response text 1`] = `
38+
"Other file
39+
"
40+
`;
41+
42+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites and shows index for unknown urls: console messages 1`] = `Array []`;
43+
44+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites and shows index for unknown urls: page errors 1`] = `Array []`;
45+
46+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites and shows index for unknown urls: response headers content-type 1`] = `"text/html; charset=UTF-8"`;
47+
48+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites and shows index for unknown urls: response status 1`] = `200`;
49+
50+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites and shows index for unknown urls: response text 1`] = `
51+
"Foobar
52+
"
53+
`;
54+
55+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites for index: console messages 1`] = `Array []`;
56+
57+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites for index: page errors 1`] = `Array []`;
58+
59+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites for index: response headers content-type 1`] = `"text/html; charset=UTF-8"`;
60+
61+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites for index: response status 1`] = `200`;
62+
63+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites for index: response text 1`] = `
64+
"Foobar
65+
"
66+
`;
67+
68+
exports[`historyApiFallback option as object with static set to false historyApiFallback should work and ignore static content: console messages 1`] = `Array []`;
69+
70+
exports[`historyApiFallback option as object with static set to false historyApiFallback should work and ignore static content: page errors 1`] = `Array []`;
71+
72+
exports[`historyApiFallback option as object with static set to false historyApiFallback should work and ignore static content: response headers content-type 1`] = `"text/html; charset=utf-8"`;
73+
74+
exports[`historyApiFallback option as object with static set to false historyApiFallback should work and ignore static content: response status 1`] = `200`;
75+
76+
exports[`historyApiFallback option as object with static set to false historyApiFallback should work and ignore static content: response text 1`] = `
77+
"In-memory file
78+
"
79+
`;
80+
81+
exports[`historyApiFallback option as object with static should handle GET request to directory: console messages 1`] = `Array []`;
82+
83+
exports[`historyApiFallback option as object with static should handle GET request to directory: page errors 1`] = `Array []`;
84+
85+
exports[`historyApiFallback option as object with static should handle GET request to directory: response headers content-type 1`] = `"text/html; charset=UTF-8"`;
86+
87+
exports[`historyApiFallback option as object with static should handle GET request to directory: response status 1`] = `200`;
88+
89+
exports[`historyApiFallback option as object with static should handle GET request to directory: response text 1`] = `
90+
"Foobar
91+
"
92+
`;
93+
94+
exports[`historyApiFallback option as object with static should prefer static file over historyApiFallback: console messages 1`] = `Array []`;
95+
96+
exports[`historyApiFallback option as object with static should prefer static file over historyApiFallback: page errors 1`] = `Array []`;
97+
98+
exports[`historyApiFallback option as object with static should prefer static file over historyApiFallback: response headers content-type 1`] = `"text/plain; charset=UTF-8"`;
99+
100+
exports[`historyApiFallback option as object with static should prefer static file over historyApiFallback: response status 1`] = `200`;
101+
102+
exports[`historyApiFallback option as object with static should prefer static file over historyApiFallback: response text 1`] = `
103+
"Random file
104+
"
105+
`;
106+
107+
exports[`historyApiFallback option as object with the "logger" option request to directory and log: console messages 1`] = `Array []`;
108+
109+
exports[`historyApiFallback option as object with the "logger" option request to directory and log: page errors 1`] = `Array []`;
110+
111+
exports[`historyApiFallback option as object with the "logger" option request to directory and log: response headers content-type 1`] = `"text/html; charset=utf-8"`;
112+
113+
exports[`historyApiFallback option as object with the "logger" option request to directory and log: response status 1`] = `200`;
114+
115+
exports[`historyApiFallback option as object with the "logger" option request to directory and log: response text 1`] = `
116+
"Foobar
117+
"
118+
`;
119+
120+
exports[`historyApiFallback option as object with the "verbose" option request to directory and log: console messages 1`] = `Array []`;
121+
122+
exports[`historyApiFallback option as object with the "verbose" option request to directory and log: page errors 1`] = `Array []`;
123+
124+
exports[`historyApiFallback option as object with the "verbose" option request to directory and log: response headers content-type 1`] = `"text/html; charset=utf-8"`;
125+
126+
exports[`historyApiFallback option as object with the "verbose" option request to directory and log: response status 1`] = `200`;
127+
128+
exports[`historyApiFallback option as object with the "verbose" option request to directory and log: response text 1`] = `
129+
"Foobar
130+
"
131+
`;
132+
133+
exports[`historyApiFallback option in-memory files should take precedence over static files: console messages 1`] = `Array []`;
134+
135+
exports[`historyApiFallback option in-memory files should take precedence over static files: page errors 1`] = `Array []`;
136+
137+
exports[`historyApiFallback option in-memory files should take precedence over static files: response headers content-type 1`] = `"text/html; charset=utf-8"`;
138+
139+
exports[`historyApiFallback option in-memory files should take precedence over static files: response status 1`] = `200`;
140+
141+
exports[`historyApiFallback option in-memory files should take precedence over static files: response text 1`] = `
142+
"In-memory file
143+
"
144+
`;
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`historyApiFallback option as boolean should handle GET request to directory: console messages 1`] = `Array []`;
4+
5+
exports[`historyApiFallback option as boolean should handle GET request to directory: page errors 1`] = `Array []`;
6+
7+
exports[`historyApiFallback option as boolean should handle GET request to directory: response headers content-type 1`] = `"text/html; charset=utf-8"`;
8+
9+
exports[`historyApiFallback option as boolean should handle GET request to directory: response status 1`] = `200`;
10+
11+
exports[`historyApiFallback option as boolean should handle GET request to directory: response text 1`] = `
12+
"Heyyy
13+
"
14+
`;
15+
16+
exports[`historyApiFallback option as object should handle GET request to directory: console messages 1`] = `Array []`;
17+
18+
exports[`historyApiFallback option as object should handle GET request to directory: page errors 1`] = `Array []`;
19+
20+
exports[`historyApiFallback option as object should handle GET request to directory: response headers content-type 1`] = `"text/html; charset=utf-8"`;
21+
22+
exports[`historyApiFallback option as object should handle GET request to directory: response status 1`] = `200`;
23+
24+
exports[`historyApiFallback option as object should handle GET request to directory: response text 1`] = `
25+
"Foobar
26+
"
27+
`;
28+
29+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect any other specified rewrites: console messages 1`] = `Array []`;
30+
31+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect any other specified rewrites: page errors 1`] = `Array []`;
32+
33+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect any other specified rewrites: response headers content-type 1`] = `"text/html; charset=UTF-8"`;
34+
35+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect any other specified rewrites: response status 1`] = `200`;
36+
37+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect any other specified rewrites: response text 1`] = `
38+
"Other file
39+
"
40+
`;
41+
42+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites and shows index for unknown urls: console messages 1`] = `Array []`;
43+
44+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites and shows index for unknown urls: page errors 1`] = `Array []`;
45+
46+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites and shows index for unknown urls: response headers content-type 1`] = `"text/html; charset=UTF-8"`;
47+
48+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites and shows index for unknown urls: response status 1`] = `200`;
49+
50+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites and shows index for unknown urls: response text 1`] = `
51+
"Foobar
52+
"
53+
`;
54+
55+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites for index: console messages 1`] = `Array []`;
56+
57+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites for index: page errors 1`] = `Array []`;
58+
59+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites for index: response headers content-type 1`] = `"text/html; charset=UTF-8"`;
60+
61+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites for index: response status 1`] = `200`;
62+
63+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites for index: response text 1`] = `
64+
"Foobar
65+
"
66+
`;
67+
68+
exports[`historyApiFallback option as object with static set to false historyApiFallback should work and ignore static content: console messages 1`] = `Array []`;
69+
70+
exports[`historyApiFallback option as object with static set to false historyApiFallback should work and ignore static content: page errors 1`] = `Array []`;
71+
72+
exports[`historyApiFallback option as object with static set to false historyApiFallback should work and ignore static content: response headers content-type 1`] = `"text/html; charset=utf-8"`;
73+
74+
exports[`historyApiFallback option as object with static set to false historyApiFallback should work and ignore static content: response status 1`] = `200`;
75+
76+
exports[`historyApiFallback option as object with static set to false historyApiFallback should work and ignore static content: response text 1`] = `
77+
"In-memory file
78+
"
79+
`;
80+
81+
exports[`historyApiFallback option as object with static should handle GET request to directory: console messages 1`] = `Array []`;
82+
83+
exports[`historyApiFallback option as object with static should handle GET request to directory: page errors 1`] = `Array []`;
84+
85+
exports[`historyApiFallback option as object with static should handle GET request to directory: response headers content-type 1`] = `"text/html; charset=UTF-8"`;
86+
87+
exports[`historyApiFallback option as object with static should handle GET request to directory: response status 1`] = `200`;
88+
89+
exports[`historyApiFallback option as object with static should handle GET request to directory: response text 1`] = `
90+
"Foobar
91+
"
92+
`;
93+
94+
exports[`historyApiFallback option as object with static should prefer static file over historyApiFallback: console messages 1`] = `Array []`;
95+
96+
exports[`historyApiFallback option as object with static should prefer static file over historyApiFallback: page errors 1`] = `Array []`;
97+
98+
exports[`historyApiFallback option as object with static should prefer static file over historyApiFallback: response headers content-type 1`] = `"text/plain; charset=UTF-8"`;
99+
100+
exports[`historyApiFallback option as object with static should prefer static file over historyApiFallback: response status 1`] = `200`;
101+
102+
exports[`historyApiFallback option as object with static should prefer static file over historyApiFallback: response text 1`] = `
103+
"Random file
104+
"
105+
`;
106+
107+
exports[`historyApiFallback option as object with the "logger" option request to directory and log: console messages 1`] = `Array []`;
108+
109+
exports[`historyApiFallback option as object with the "logger" option request to directory and log: page errors 1`] = `Array []`;
110+
111+
exports[`historyApiFallback option as object with the "logger" option request to directory and log: response headers content-type 1`] = `"text/html; charset=utf-8"`;
112+
113+
exports[`historyApiFallback option as object with the "logger" option request to directory and log: response status 1`] = `200`;
114+
115+
exports[`historyApiFallback option as object with the "logger" option request to directory and log: response text 1`] = `
116+
"Foobar
117+
"
118+
`;
119+
120+
exports[`historyApiFallback option as object with the "verbose" option request to directory and log: console messages 1`] = `Array []`;
121+
122+
exports[`historyApiFallback option as object with the "verbose" option request to directory and log: page errors 1`] = `Array []`;
123+
124+
exports[`historyApiFallback option as object with the "verbose" option request to directory and log: response headers content-type 1`] = `"text/html; charset=utf-8"`;
125+
126+
exports[`historyApiFallback option as object with the "verbose" option request to directory and log: response status 1`] = `200`;
127+
128+
exports[`historyApiFallback option as object with the "verbose" option request to directory and log: response text 1`] = `
129+
"Foobar
130+
"
131+
`;
132+
133+
exports[`historyApiFallback option in-memory files should take precedence over static files: console messages 1`] = `Array []`;
134+
135+
exports[`historyApiFallback option in-memory files should take precedence over static files: page errors 1`] = `Array []`;
136+
137+
exports[`historyApiFallback option in-memory files should take precedence over static files: response headers content-type 1`] = `"text/html; charset=utf-8"`;
138+
139+
exports[`historyApiFallback option in-memory files should take precedence over static files: response status 1`] = `200`;
140+
141+
exports[`historyApiFallback option in-memory files should take precedence over static files: response text 1`] = `
142+
"In-memory file
143+
"
144+
`;

0 commit comments

Comments
 (0)