improve integration test reliability
This commit is contained in:
parent
22c1d6b0b9
commit
43f20ef463
|
@ -12,6 +12,9 @@ context("Skynet", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should be able to upload a file", () => {
|
it("should be able to upload a file", () => {
|
||||||
|
cy.server();
|
||||||
|
cy.route("POST", "/skynet/skyfile").as("upload");
|
||||||
|
|
||||||
const fileName = "check.json";
|
const fileName = "check.json";
|
||||||
|
|
||||||
cy.fixture(fileName).then((fileContent) => {
|
cy.fixture(fileName).then((fileContent) => {
|
||||||
|
@ -21,6 +24,9 @@ context("Skynet", () => {
|
||||||
cy.get(".home-uploaded-files")
|
cy.get(".home-uploaded-files")
|
||||||
.children()
|
.children()
|
||||||
.should("have.length", 1);
|
.should("have.length", 1);
|
||||||
|
|
||||||
|
cy.wait("@upload");
|
||||||
|
|
||||||
cy.contains(".upload-file", fileName).within(() => {
|
cy.contains(".upload-file", fileName).within(() => {
|
||||||
cy.get(".url")
|
cy.get(".url")
|
||||||
.invoke("text")
|
.invoke("text")
|
||||||
|
|
Reference in New Issue