mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-06 04:21:09 +00:00
fix: smoke tests and update redoc to v2.1 (#1242)
This commit is contained in:
5
.changeset/twenty-grapes-type.md
Normal file
5
.changeset/twenty-grapes-type.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@redocly/cli': patch
|
||||
---
|
||||
|
||||
Updated redoc to v2.1.0.
|
||||
10
.github/workflows/smoke.yaml
vendored
10
.github/workflows/smoke.yaml
vendored
@@ -50,7 +50,7 @@ jobs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20
|
||||
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redoc redocly-cli.tgz" "npm run"
|
||||
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redoc redocly-cli.tgz --legacy-peer-deps" "npm run"
|
||||
|
||||
run-smoke--npm--node-18:
|
||||
needs: prepare-smoke
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redoc redocly-cli.tgz" "npm run"
|
||||
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redoc redocly-cli.tgz --legacy-peer-deps" "npm run"
|
||||
|
||||
run-smoke--npm--node-16:
|
||||
needs: prepare-smoke
|
||||
@@ -102,7 +102,7 @@ jobs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redoc redocly-cli.tgz" "npm run"
|
||||
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redoc redocly-cli.tgz --legacy-peer-deps" "npm run"
|
||||
|
||||
run-smoke--npm--node-14:
|
||||
needs: prepare-smoke
|
||||
@@ -241,9 +241,9 @@ jobs:
|
||||
docker run --rm -v $PWD:/spec redocly/cli:latest bundle openapi.yaml --ext json
|
||||
docker run --rm -v $PWD:/spec redocly/cli:latest build-docs openapi.yaml
|
||||
# Check for broken styles (related issue: https://github.com/Redocly/redocly-cli/issues/1073)
|
||||
if [[ "$(wc -l redoc-static.html)" == "317 redoc-static.html" ]]; then
|
||||
if [[ "$(wc -l redoc-static.html)" == "319 redoc-static.html" ]]; then
|
||||
echo "Docs built correctly."
|
||||
else
|
||||
echo "Docs built incorrectly. Received lines: $(wc -l redoc-static.html) (expected 317 lines in redoc-static.html)."
|
||||
echo "Docs built incorrectly. Received lines: $(wc -l redoc-static.html) (expected 319 lines in redoc-static.html)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
exports[`E2E build-docs build docs with config option 1`] = `
|
||||
|
||||
🎉 bundled successfully in: nested/redoc-static.html (38 KiB) [⏱ <test>ms].
|
||||
🎉 bundled successfully in: nested/redoc-static.html (39 KiB) [⏱ <test>ms].
|
||||
|
||||
Found nested/redocly.yaml and using theme.openapi options
|
||||
Prerendering docs
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
exports[`E2E build-docs simple build-docs 1`] = `
|
||||
|
||||
🎉 bundled successfully in: redoc-static.html (318 KiB) [⏱ <test>ms].
|
||||
🎉 bundled successfully in: redoc-static.html (321 KiB) [⏱ <test>ms].
|
||||
|
||||
Found undefined and using theme.openapi options
|
||||
Prerendering docs
|
||||
|
||||
@@ -397,7 +397,7 @@ describe('E2E', () => {
|
||||
(<any>expect(result)).toMatchSpecificSnapshot(join(testPath, 'snapshot.js'));
|
||||
|
||||
expect(fs.existsSync(join(testPath, 'nested/redoc-static.html'))).toEqual(true);
|
||||
expect(fs.statSync(join(testPath, 'nested/redoc-static.html')).size).toEqual(38839);
|
||||
expect(fs.statSync(join(testPath, 'nested/redoc-static.html')).size).toEqual(38998);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -17,9 +17,9 @@ $2 redocly-lint
|
||||
$2 redocly-bundle
|
||||
$2 redocly-build-docs
|
||||
# Check for broken styles (related issue: https://github.com/Redocly/redocly-cli/issues/1073)
|
||||
if [[ "$(wc -l redoc-static.html)" == "317 redoc-static.html" ]]; then
|
||||
if [[ "$(wc -l redoc-static.html)" == "319 redoc-static.html" ]]; then
|
||||
echo "Docs built correctly."
|
||||
else
|
||||
echo "Docs built incorrectly. Received lines: $(wc -l redoc-static.html) (expected 317 lines in redoc-static.html)."
|
||||
echo "Docs built incorrectly. Received lines: $(wc -l redoc-static.html) (expected 319 lines in redoc-static.html)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
299
package-lock.json
generated
299
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -44,7 +44,7 @@
|
||||
"mobx": "^6.0.4",
|
||||
"react": "^17.0.0",
|
||||
"react-dom": "^17.0.0",
|
||||
"redoc": "~2.0.0",
|
||||
"redoc": "~2.1.0",
|
||||
"semver": "^7.5.2",
|
||||
"simple-websocket": "^9.0.0",
|
||||
"styled-components": "^5.1.1",
|
||||
|
||||
Reference in New Issue
Block a user