Last active
March 1, 2021 11:17
-
-
Save rmdias/743308d521de40f3878c8290db53a663 to your computer and use it in GitHub Desktop.
It goest to Media Market and Saturn, and verify if the PS5 is still out of stock
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
const timeout = 2000; | |
/// <reference types="cypress" /> | |
describe("Hunt for PS5 in Saturn", () => { | |
it("should visit Saturn and check if PS5 is still out of stock", () => { | |
cy.visit("https://www.saturn.de/de/shop/playstation5.html").then(() => { | |
if (cy.get(".gdpr-cookie-layer__container", { timeout })) { | |
cy.get(".gdpr-cookie-layer__btn--submit--all").click({ timeout }); | |
} | |
cy.scrollTo(0, 653); | |
cy.get(".grid-item-7065965.loaded", { timeout }).find(".offline", { | |
timeout, | |
}); | |
}); | |
}); | |
}); | |
describe("Hunt for PS5 in Media Market", () => { | |
it("should visit Media Market and check if PS5 is still out of stock", () => { | |
cy.visit("https://www.mediamarkt.de/de/shop/playstation5.html").then(() => { | |
if (cy.get(".gdpr-cookie-layer__container", { timeout })) { | |
cy.get(".gdpr-cookie-layer__btn--submit--all").click({ timeout }); | |
} | |
cy.scrollTo(0, 653); | |
cy.get(".grid-item-7065963.loaded", { timeout }).find(".offline", { | |
timeout, | |
}); | |
}); | |
}); | |
}); | |
describe("Hunt for PS5 in Grover", () => { | |
it("should visit Grover and check if PS5 is still out of stock", () => { | |
cy.visit("https://www.grover.com/de-de/products/sony-playstation-5").then( | |
() => { | |
cy.get( | |
'article:contains("Dieses Produkt ist momentan nicht verfügbar. Sollen wir dir Bescheid sagen, sobald du es mieten kannst?")', | |
{ timeout } | |
); | |
} | |
); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment