mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 21:33:15 -07:00
Added mobile tests
This commit is contained in:
parent
f2ea1d0e13
commit
b61d53029c
1 changed files with 29 additions and 0 deletions
29
tests/cypress/tests/discover/discover-responsive.spec.ts
Normal file
29
tests/cypress/tests/discover/discover-responsive.spec.ts
Normal file
|
@ -0,0 +1,29 @@
|
|||
import { discoverPage as Page } from "@/integration/page-objects";
|
||||
import { DiscoverType } from "@/integration/page-objects/shared/DiscoverCard";
|
||||
|
||||
const mobiles = ['samsung-s10', 'iphone-x', 'iphone-xr', 'iphone-8']
|
||||
|
||||
describe("Discover Responsive Tests", () => {
|
||||
beforeEach(() => {
|
||||
cy.login();
|
||||
});
|
||||
mobiles.forEach((size: any) => {
|
||||
// make assertions on the logo using
|
||||
// an array of different viewports
|
||||
it(`Should display card on ${size} screen`, () => {
|
||||
window.localStorage.setItem("DiscoverOptions2", "2");
|
||||
cy.intercept("GET", "**/search/Movie/Popular/**").as("moviePopular");
|
||||
cy.viewport(size);
|
||||
Page.visit();
|
||||
|
||||
cy.wait("@moviePopular").then((intecept) => {
|
||||
const id = intecept.response.body[0].id;
|
||||
const card = Page.popularCarousel.getCard(id, true, DiscoverType.Popular);
|
||||
card.title.realHover();
|
||||
card.verifyTitle(intecept.response.body[0].title);
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue