Skip to content

Commit 46e36b4

Browse files
feat: added cypress example (still with error)
1 parent c147458 commit 46e36b4

File tree

10 files changed

+1395
-33
lines changed

10 files changed

+1395
-33
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ node_modules
33
*/fullTestSuite.json
44
upload.marker.json
55
.currents
6-
.env
6+
.env
7+
cypress/

cy-example/combined-results.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<testsuites>
3+
<testsuite name="First Test Suite" timestamp="2024-11-20T05:26:28" tests="2" failures="1" time="3.238" file="cy-example/e2e/first.cy.js">
4+
<testcase name="First Test Suite visits google" time="0" classname="visits google" failure="true" error="true" success="false">
5+
<failure message="Timed out retrying after 4000ms: expected 'Google' to include 'Amazon'" type="AssertionError">AssertionError: Timed out retrying after 4000ms: expected 'Google' to include 'Amazon'
6+
at Context.eval (webpack:///./e2e/first.cy.js:4:15)</failure>
7+
</testcase>
8+
<testcase name="First Test Suite can search" time="3.238" classname="can search" failure="false" error="false" success="true"/>
9+
</testsuite>
10+
<testsuite name="Second Test Suite" timestamp="2024-11-20T05:26:40" tests="2" failures="0" time="4.33" file="cy-example/e2e/second.cy.js">
11+
<testcase name="Second Test Suite visits google" time="1.174" classname="visits google" failure="false" error="false" success="true"/>
12+
<testcase name="Second Test Suite can search" time="3.156" classname="can search" failure="false" error="false" success="true"/>
13+
</testsuite>
14+
</testsuites>

cy-example/config.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"framework": "junit",
3+
"frameworkVersion": "13.16.0",
4+
"cliArgs": {
5+
"options": { "jUnitFile": "cy-example/combined-results.xml" },
6+
"args": []
7+
},
8+
"frameworkConfig": {
9+
"originFramework": "cypress",
10+
"originFrameworkVersion": "13.16.0"
11+
}
12+
}

cy-example/cypress.config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const { defineConfig } = require("cypress");
2+
3+
module.exports = defineConfig({
4+
e2e: {
5+
supportFile: false,
6+
specPattern: "cy-example/e2e/*.cy.js",
7+
reporter: "cypress-junit-reporter",
8+
reporterOptions: {
9+
mochaFile: "cy-example/results-[hash].xml",
10+
toConsole: true,
11+
},
12+
setupNodeEvents(on, config) {
13+
// implement node event listeners here
14+
},
15+
},
16+
});

cy-example/e2e/first.cy.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
describe("First Test Suite", () => {
2+
it("visits google", () => {
3+
cy.visit("https://www.google.com");
4+
cy.title().should("include", "Amazon");
5+
});
6+
7+
it("can search", () => {
8+
cy.visit("https://www.google.com");
9+
cy.get('[name="q"]').type("Cypress testing{enter}");
10+
});
11+
});

cy-example/e2e/second.cy.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
describe("Second Test Suite", () => {
2+
it("visits google", () => {
3+
cy.visit("https://www.google.com");
4+
cy.title().should("include", "Google");
5+
});
6+
7+
it("can search", () => {
8+
cy.visit("https://www.google.com");
9+
cy.get('[name="q"]').type("Cypress testing{enter}");
10+
});
11+
});

0 commit comments

Comments
 (0)