mockaton 8.2.0 → 8.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.idea/dictionaries/efortis.xml +3 -0
- package/.idea/encodings.xml +6 -0
- package/.idea/inspectionProfiles/Project_Default.xml +105 -0
- package/.idea/jsLibraryMappings.xml +6 -0
- package/.idea/jsLinters/eslint.xml +6 -0
- package/.idea/misc.xml +115 -0
- package/.idea/mockaton.iml +8 -0
- package/.idea/modules.xml +8 -0
- package/.idea/shelf/custom_methods,_but_nodejs_does_not_support_them_https___github_com_nodejs_llhttp_pull_54/shelved.patch +260 -0
- package/.idea/shelf/custom_methods__but_nodejs_does_not_support_them_https___github_com_nodejs_llhttp_pull_54.xml +4 -0
- package/.idea/shelf/preflight/shelved.patch +122 -0
- package/.idea/shelf/preflight.xml +4 -0
- package/.idea/shelf/preflight1/shelved.patch +289 -0
- package/.idea/shelf/preflight1.xml +4 -0
- package/.idea/shelf/ts/shelved.patch +229 -0
- package/.idea/shelf/ts.xml +4 -0
- package/.idea/vcs.xml +6 -0
- package/.idea/webResources.xml +14 -0
- package/.idea/workspace.xml +248 -0
- package/README.md +17 -7
- package/index.d.ts +5 -0
- package/index.js +3 -1
- package/package.json +5 -4
- package/src/Dashboard.css +10 -9
- package/src/Dashboard.js +1 -3
- package/src/mockaton-logo.svg +1 -1
- package/src/utils/http-response.js +4 -4
- package/.editorconfig +0 -11
- package/README-dashboard-dark.png +0 -0
- package/README-dashboard-light.png +0 -0
- package/sample-mocks/api/user/avatar.GET.200.png +0 -0
- package/sample-mocks/api/user/edit-name.PATCH.200.json +0 -3
- package/sample-mocks/api/user/edit-name.PATCH.422.json +0 -3
- package/sample-mocks/api/user/friends.GET.200.json +0 -3
- package/sample-mocks/api/user/friends.GET.204.json +0 -4
- package/sample-mocks/api/user/friends.GET.500.txt +0 -7
- package/sample-mocks/api/user/likes.GET.200.js +0 -9
- package/sample-mocks/api/user/links.GET.200.js +0 -9
- package/sample-mocks/api/user/logout.POST.200.json +0 -1
- package/sample-mocks/api/user/typescript-scores-full.GET.200.ts +0 -9
- package/sample-mocks/api/user/typescript-scores.GET.200.ts +0 -6
- package/sample-mocks/api/user/videos(all variants).GET.200.json +0 -13
- package/sample-mocks/api/user/videos(default).GET.200.json +0 -13
- package/sample-mocks/api/user/videos(verified)(another comment).GET.200.json +0 -13
- package/sample-mocks/api/user/yaml-fruits.GET.200.yml +0 -5
- package/sample-mocks/api/user.GET.200.json +0 -4
- package/sample-mocks/api/video/[id].GET.200.json +0 -4
- package/sample-mocks/api/video/stat/[stat-id]/[video-id].GET.200.json +0 -3
- package/sample-mocks/api/video/stat/[stat-id]/all-videos?limit=[limit].GET.200.json +0 -4
- package/sample-static/another-entry/index.html +0 -35
- package/sample-static/assets/video.mp4 +0 -0
- package/sample-static/index.html +0 -37
- package/ui-tests/_setup.js +0 -32
- package/ui-tests/bulk-select.test.js +0 -10
- package/ui-tests/bulk-select.vp1024x800.dark.gold.png +0 -0
- package/ui-tests/bulk-select.vp1024x800.light.gold.png +0 -0
- package/ui-tests/initial-dashboard-state.test.js +0 -4
- package/ui-tests/initial-dashboard-state.vp1024x800.dark.gold.png +0 -0
- package/ui-tests/initial-dashboard-state.vp1024x800.light.gold.png +0 -0
- package/ui-tests/payload-viewer-formats-json.test.js +0 -9
- package/ui-tests/payload-viewer-formats-json.vp1024x800.dark.gold.png +0 -0
- package/ui-tests/payload-viewer-formats-json.vp1024x800.light.gold.png +0 -0
- package/ui-tests/payload-viewer-renders-images.test.js +0 -9
- package/ui-tests/payload-viewer-renders-images.vp1024x800.dark.gold.png +0 -0
- package/ui-tests/payload-viewer-renders-images.vp1024x800.light.gold.png +0 -0
- package/ui-tests/select-mock-variant.test.js +0 -10
- package/ui-tests/select-mock-variant.vp1024x800.dark.gold.png +0 -0
- package/ui-tests/select-mock-variant.vp1024x800.light.gold.png +0 -0
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta content="width=device-width" name="viewport">
|
|
6
|
-
<link rel="icon" href="data:">
|
|
7
|
-
<title>Another Entry Point</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<h1>Another Entry Point</h1>
|
|
11
|
-
|
|
12
|
-
<h2>/api/user</h2>
|
|
13
|
-
<pre></pre>
|
|
14
|
-
<script>
|
|
15
|
-
(async () => {
|
|
16
|
-
let output = ''
|
|
17
|
-
try {
|
|
18
|
-
const response = await fetch('/api/user')
|
|
19
|
-
if (response.ok) {
|
|
20
|
-
const json = await response.json()
|
|
21
|
-
output = JSON.stringify(json, null, 2)
|
|
22
|
-
}
|
|
23
|
-
else
|
|
24
|
-
throw response.status
|
|
25
|
-
}
|
|
26
|
-
catch (error) {
|
|
27
|
-
output = 'Error: ' + error
|
|
28
|
-
}
|
|
29
|
-
finally {
|
|
30
|
-
document.querySelector('pre').innerText = output
|
|
31
|
-
}
|
|
32
|
-
})()
|
|
33
|
-
</script>
|
|
34
|
-
</body>
|
|
35
|
-
</html>
|
|
Binary file
|
package/sample-static/index.html
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta content="width=device-width" name="viewport">
|
|
6
|
-
<link rel="icon" href="data:">
|
|
7
|
-
<title>Title</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<h1>Welcome!</h1>
|
|
11
|
-
<video src="assets/video.mp4" width="720" controls></video>
|
|
12
|
-
|
|
13
|
-
<h2>/api/user</h2>
|
|
14
|
-
<pre></pre>
|
|
15
|
-
|
|
16
|
-
<script>
|
|
17
|
-
(async () => {
|
|
18
|
-
let output = ''
|
|
19
|
-
try {
|
|
20
|
-
const response = await fetch('/api/user')
|
|
21
|
-
if (response.ok) {
|
|
22
|
-
const json = await response.json()
|
|
23
|
-
output = JSON.stringify(json, null, 2)
|
|
24
|
-
}
|
|
25
|
-
else
|
|
26
|
-
throw response.status
|
|
27
|
-
}
|
|
28
|
-
catch (error) {
|
|
29
|
-
output = 'Error: ' + error
|
|
30
|
-
}
|
|
31
|
-
finally {
|
|
32
|
-
document.querySelector('pre').innerText = output
|
|
33
|
-
}
|
|
34
|
-
})()
|
|
35
|
-
</script>
|
|
36
|
-
</body>
|
|
37
|
-
</html>
|
package/ui-tests/_setup.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { after } from 'node:test'
|
|
2
|
-
import { launch } from 'puppeteer'
|
|
3
|
-
import {
|
|
4
|
-
removeDiffsAndCandidates,
|
|
5
|
-
testPixels as _testPixels,
|
|
6
|
-
diffServer
|
|
7
|
-
} from 'pixaton'
|
|
8
|
-
import { Commander } from '../index.js'
|
|
9
|
-
|
|
10
|
-
// Before running these tests you need to spin up the demo:
|
|
11
|
-
// npm run demo
|
|
12
|
-
|
|
13
|
-
const MOCKATON_ADDR = 'http://localhost:2345'
|
|
14
|
-
const mockaton = new Commander(MOCKATON_ADDR)
|
|
15
|
-
|
|
16
|
-
const testsDir = import.meta.dirname
|
|
17
|
-
|
|
18
|
-
removeDiffsAndCandidates(testsDir)
|
|
19
|
-
const browser = await launch({ headless: true })
|
|
20
|
-
const page = await browser.newPage()
|
|
21
|
-
|
|
22
|
-
after(() => {
|
|
23
|
-
browser?.close()
|
|
24
|
-
diffServer(testsDir)
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
export function testPixels(testFileName, options = {}) {
|
|
28
|
-
options.beforeSuite = async () => await mockaton.reset()
|
|
29
|
-
options.viewports ??= [{ width: 1024, height: 800 }]
|
|
30
|
-
options.colorSchemes ??= ['light', 'dark']
|
|
31
|
-
_testPixels(page, testFileName, MOCKATON_ADDR + '/mockaton', 'body', options)
|
|
32
|
-
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|