mirror of https://github.com/Ombi-app/Ombi
Merge branch 'develop' of https://github.com/ombi-app/Ombi into develop
commit
8a9230730c
@ -0,0 +1,85 @@
|
|||||||
|
describe("TV Request V1 API tests", () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.login();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("Request All of TV Show (Fear the Walking Dead)", () => {
|
||||||
|
const request = {
|
||||||
|
TvDbId: 290853,
|
||||||
|
RequestAll: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
cy.api({
|
||||||
|
url: "/api/v1/request/tv",
|
||||||
|
body: JSON.stringify(request),
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
Authorization: "Bearer " + window.localStorage.getItem("id_token"),
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
}).then((res) => {
|
||||||
|
expect(res.status).equal(200);
|
||||||
|
const body = res.body;
|
||||||
|
expect(body.result).to.be.true;
|
||||||
|
expect(body.requestId).not.to.be.null;
|
||||||
|
expect(body.isError).to.be.false;
|
||||||
|
expect(body.errorMessage).to.be.null;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it("Request First Season of TV Show (American Horror Story)", () => {
|
||||||
|
const request = {
|
||||||
|
TvDbId: 250487,
|
||||||
|
FirstSeason: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
cy.api({
|
||||||
|
url: "/api/v1/request/tv",
|
||||||
|
body: JSON.stringify(request),
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
Authorization: "Bearer " + window.localStorage.getItem("id_token"),
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
}).then((res) => {
|
||||||
|
expect(res.status).equal(200);
|
||||||
|
const body = res.body;
|
||||||
|
expect(body.result).to.be.true;
|
||||||
|
expect(body.requestId).not.to.be.null;
|
||||||
|
expect(body.isError).to.be.false;
|
||||||
|
expect(body.errorMessage).to.be.null;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it("Request Two Episode of First Season TV Show (The Sopranos)", () => {
|
||||||
|
const request = {
|
||||||
|
TvDbId: 75299,
|
||||||
|
Seasons: [
|
||||||
|
{
|
||||||
|
SeasonNumber: 1,
|
||||||
|
Episodes: [
|
||||||
|
{ EpisodeNumber: 1 },
|
||||||
|
{ EpisodeNumber: 2 },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
cy.api({
|
||||||
|
url: "/api/v1/request/tv",
|
||||||
|
body: JSON.stringify(request),
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
Authorization: "Bearer " + window.localStorage.getItem("id_token"),
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
}).then((res) => {
|
||||||
|
expect(res.status).equal(200);
|
||||||
|
const body = res.body;
|
||||||
|
expect(body.result).to.be.true;
|
||||||
|
expect(body.requestId).not.to.be.null;
|
||||||
|
expect(body.isError).to.be.false;
|
||||||
|
expect(body.errorMessage).to.be.null;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
@ -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…
Reference in new issue