magnificent-rose-67179
10/20/2021, 7:27 AMmagnificent-rose-67179
10/20/2021, 7:28 AMmagnificent-rose-67179
10/20/2021, 7:28 AMmagnificent-rose-67179
10/20/2021, 7:28 AMmagnificent-rose-67179
10/20/2021, 7:28 AMfancy-airplane-60156
10/20/2021, 11:21 AMfancy-airplane-60156
10/20/2021, 11:22 AMfancy-airplane-60156
10/20/2021, 11:22 AMfancy-airplane-60156
10/20/2021, 11:22 AMbillions-helmet-46095
10/20/2021, 10:04 PMcy.intercept
, but it won't work. Any thoughts on what I'm doing wrong?billions-helmet-46095
10/20/2021, 10:06 PMbeforeEach(() => {
cy.intercept(`https://example-downloads.com*`, {
statusCode: 200,
body: {
message: "success"
}
});
});
describe("Download button functionality - Windows", () => {
it("Visit example.com", () => {
cy.visit("/", {
onBeforeLoad: win => {
Object.defineProperty(win.navigator, 'userAgent', {
value: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36",
});
}
});
cy.get("#download-button-hero")
.should("be.visible")
.click()
.url()
.should("eq", `https://example-downloads.com/latest/winx64`)
})
});
billions-helmet-46095
10/20/2021, 10:08 PMdescribe("Download button functionality - Windows", () => {
it("Visit example.com", () => {
cy.request(`https://example-downloads.com/latest/winx64`)
})
});
billions-helmet-46095
10/20/2021, 10:39 PMuser
10/26/2021, 12:30 AMtall-area-9998
10/26/2021, 8:46 PMi am trying to call the test function firm another typescript code
user
10/26/2021, 8:47 PMuser
10/26/2021, 8:49 PMuser
10/26/2021, 8:49 PMuser
10/26/2021, 8:50 PMuser
10/26/2021, 8:51 PMtall-area-9998
10/26/2021, 8:53 PMuser
10/26/2021, 8:58 PMtall-area-9998
10/26/2021, 9:31 PMuser
10/26/2021, 10:11 PMglamorous-monkey-67605
10/27/2021, 2:47 AMglamorous-monkey-67605
10/27/2021, 2:48 AMmagnificent-rose-67179
10/27/2021, 1:45 PMmagnificent-rose-67179
10/27/2021, 1:46 PMmagnificent-rose-67179
10/27/2021, 1:46 PMts
// submit project
cy.findByRole("button", { name: /create new project/i }).click();
cy.wait("@createProject");
// toast feedback
cy.waitUntil(() =>
cy
.findByRole("status", {
name: /your project has been created/i,
})
.should("exist")
);
magnificent-rose-67179
10/27/2021, 1:46 PM