-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
47940f2
commit 25ed7c8
Showing
9 changed files
with
32 additions
and
1,586 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
describe('Should throw an error', () => { | ||
it('Should throw an error', () => { | ||
throw new Error("test error") | ||
}); | ||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
1,523 changes: 1 addition & 1,522 deletions
1,523
e2e/cypress-13-demo/data-references/ccy-1.9.4-cy-12-cycl.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,12 @@ | ||
import { run } from "cypress-cloud"; | ||
import fs from "fs"; | ||
import { getApiData, runTests } from "../../utils/utils"; | ||
|
||
(async function runTests() { | ||
const projectId = process.env.CURRENTS_PROJECT_ID || "projectId"; | ||
const recordKey = process.env.CURRENTS_RECORD_KEY || "recordKey"; | ||
const apiKey = process.env.CURRENTS_API_KEY || "apiKey"; | ||
const apiUrl = | ||
process.env.CURRENTS_RUN_BASE_URL || | ||
"https://api.currents.dev/v1/runs/"; | ||
|
||
const ciBuildId = `run-api-smoke-${new Date().toISOString()}`; | ||
const result: any = await run({ | ||
ciBuildId, | ||
projectId, | ||
recordKey, | ||
batchSize: 4, | ||
}); | ||
|
||
const headers = new Headers({ | ||
Authorization: `Bearer ${apiKey}`, | ||
}); | ||
|
||
fs.writeFile( | ||
"data-references/ccy-1.9.4-cypress-12/cypress-cloud-output-reference.json", | ||
JSON.stringify(result), | ||
(err) => { | ||
if (err) throw err; | ||
console.log("file saved"); | ||
} | ||
(async function runFiles() { | ||
const cypressCloudData = await runTests( | ||
"data-references/ccy-1.9.4-cy-12-cycl.json" | ||
); | ||
|
||
const runUrl = result.runUrl; | ||
|
||
fetch(`${apiUrl}${runUrl.split("run/")[1]}`, { | ||
method: "GET", | ||
headers, | ||
}) | ||
.then((response) => { | ||
if (!response.ok) { | ||
throw new Error(`HTTP error! Status: ${response.status}`); | ||
} | ||
return response.json(); | ||
}) | ||
.then((data) => { | ||
console.log(data); | ||
fs.writeFile( | ||
"data-references/ccy-1.9.4-cypress-12/currents-api-output-reference.json", | ||
JSON.stringify(data), | ||
(err) => { | ||
if (err) throw err; | ||
console.log("file saved"); | ||
} | ||
); | ||
}) | ||
.catch((error) => { | ||
console.error( | ||
"There was an error in fetch request:", | ||
error.message | ||
); | ||
}); | ||
await getApiData( | ||
cypressCloudData.runUrl, | ||
"data-references/ccy-1.9.4-cy-12-crapi.json" | ||
); | ||
})(); |
2 changes: 1 addition & 1 deletion
2
e2e/cypress-13-demo/validation-results/currents-api-validation.json
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
e2e/cypress-13-demo/validation-results/cypress-cloud-validation.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters