mirror of
https://github.com/jaypyles/Scraperr.git
synced 2025-11-26 19:13:42 +00:00
fix: add cypress tests to CI [skip ci]
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
describe.only("Job", () => {
|
describe.only("Job", () => {
|
||||||
it("should create a job", () => {
|
it("should create a job", () => {
|
||||||
|
cy.intercept("POST", "/api/submit-scrape-job").as("submitScrapeJob");
|
||||||
|
|
||||||
cy.visit("/");
|
cy.visit("/");
|
||||||
|
|
||||||
cy.get('[data-cy="url-input"]').type("https://example.com");
|
cy.get('[data-cy="url-input"]').type("https://example.com");
|
||||||
@@ -9,12 +11,13 @@ describe.only("Job", () => {
|
|||||||
|
|
||||||
cy.contains("Submit").click();
|
cy.contains("Submit").click();
|
||||||
|
|
||||||
|
cy.wait("@submitScrapeJob").its("response.statusCode").should("eq", 200);
|
||||||
|
|
||||||
cy.get("li").contains("Previous Jobs").click();
|
cy.get("li").contains("Previous Jobs").click();
|
||||||
|
|
||||||
cy.contains("div", "https://example.com", { timeout: 10000 }).should(
|
cy.contains("div", "https://example.com", { timeout: 10000 }).should(
|
||||||
"exist"
|
"exist"
|
||||||
);
|
);
|
||||||
|
|
||||||
cy.contains("div", "Completed", { timeout: 20000 }).should("exist");
|
cy.contains("div", "Completed", { timeout: 20000 }).should("exist");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -34,4 +34,4 @@
|
|||||||
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
|
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|||||||
24920
package-lock.json
generated
24920
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -31,7 +31,7 @@
|
|||||||
"react-modal-image": "^2.6.0",
|
"react-modal-image": "^2.6.0",
|
||||||
"react-router": "^6.14.1",
|
"react-router": "^6.14.1",
|
||||||
"react-router-dom": "^6.14.1",
|
"react-router-dom": "^6.14.1",
|
||||||
"react-scripts": "^5.0.1",
|
"react-scripts": "^3.0.1",
|
||||||
"react-spinners": "^0.14.1",
|
"react-spinners": "^0.14.1",
|
||||||
"typescript": "^4.9.5",
|
"typescript": "^4.9.5",
|
||||||
"web-vitals": "^2.1.4"
|
"web-vitals": "^2.1.4"
|
||||||
@@ -63,9 +63,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/cypress": "^0.1.6",
|
"@types/cypress": "^1.1.6",
|
||||||
"@types/js-cookie": "^3.0.6",
|
"@types/js-cookie": "^3.0.6",
|
||||||
"cypress": "^13.15.0",
|
"cypress": "^13.17.0",
|
||||||
"tailwindcss": "^3.3.5"
|
"tailwindcss": "^3.3.5"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
|||||||
Reference in New Issue
Block a user