refactoring some of the tests

pull/4099/head
tidusjar 3 years ago
parent 43e22acaca
commit e4ab1447aa

@ -1,13 +1,13 @@
<div class="right">
<mat-button-toggle-group name="discoverMode" (change)="toggleChanged($event)" value="{{discoverOptions}}" class="discover-filter-buttons-group">
<mat-button-toggle [ngClass]="{'button-active': discoverOptions === DiscoverOption.Combined}" value="{{DiscoverOption.Combined}}" class="discover-filter-button">{{'Discovery.Combined' | translate}}</mat-button-toggle>
<mat-button-toggle [ngClass]="{'button-active': discoverOptions === DiscoverOption.Movie}" value="{{DiscoverOption.Movie}}" class="discover-filter-button">{{'Discovery.Movies' | translate}}</mat-button-toggle>
<mat-button-toggle [ngClass]="{'button-active': discoverOptions === DiscoverOption.Tv}" value="{{DiscoverOption.Tv}}" class="discover-filter-button">{{'Discovery.Tv' | translate}}</mat-button-toggle>
<mat-button-toggle id="{{id}}Combined" [ngClass]="{'button-active': discoverOptions === DiscoverOption.Combined}" value="{{DiscoverOption.Combined}}" class="discover-filter-button">{{'Discovery.Combined' | translate}}</mat-button-toggle>
<mat-button-toggle id="{{id}}Movie" [ngClass]="{'button-active': discoverOptions === DiscoverOption.Movie}" value="{{DiscoverOption.Movie}}" class="discover-filter-button">{{'Discovery.Movies' | translate}}</mat-button-toggle>
<mat-button-toggle id="{{id}}Tv" [ngClass]="{'button-active': discoverOptions === DiscoverOption.Tv}" value="{{DiscoverOption.Tv}}" class="discover-filter-button">{{'Discovery.Tv' | translate}}</mat-button-toggle>
</mat-button-toggle-group>
</div>
<p-carousel #carousel [numVisible]="10" [numScroll]="10" [page]="0" [value]="discoverResults" [responsiveOptions]="responsiveOptions" (onPage)="newPage()">
<ng-template let-result pTemplate="item">
<discover-card [result]="result"></discover-card>
<discover-card id="result{{result.id}}" [result]="result"></discover-card>
</ng-template>
</p-carousel>

@ -20,6 +20,7 @@ export enum DiscoverType {
export class CarouselListComponent implements OnInit {
@Input() public discoverType: DiscoverType;
@Input() public id: string;
@ViewChild('carousel', {static: false}) carousel: Carousel;
public DiscoverOption = DiscoverOption;

@ -4,7 +4,7 @@
<div class="section">
<h2>Popular</h2>
<div>
<carousel-list [discoverType]="DiscoverType.Popular"></carousel-list>
<carousel-list [id]="'popular'" [discoverType]="DiscoverType.Popular"></carousel-list>
</div>
</div>
@ -12,7 +12,7 @@
<div class="section">
<h2>Trending</h2>
<div >
<carousel-list [discoverType]="DiscoverType.Trending"></carousel-list>
<carousel-list [id]="'trending'" [discoverType]="DiscoverType.Trending"></carousel-list>
</div>
</div>
@ -20,7 +20,7 @@
<div class="section">
<h2>Upcoming</h2>
<div>
<carousel-list [discoverType]="DiscoverType.Upcoming"></carousel-list>
<carousel-list [id]="'upcoming'" [discoverType]="DiscoverType.Upcoming"></carousel-list>
</div>
</div>

@ -0,0 +1,665 @@
[
{
"adult": false,
"backdropPath": "/fev8UFNFFYsD5q7AcYS8LyTzqwl.jpg",
"genreIds": [],
"originalLanguage": "en",
"originalTitle": "Tom & Jerry",
"overview": "Tom the cat and Jerry the mouse get kicked out of their home and relocate to a fancy New York hotel, where a scrappy employee named Kayla will lose her job if she cant evict Jerry before a high-class wedding at the hotel. Her solution? Hiring Tom to get rid of the pesky mouse.",
"popularity": 3387.964111328125,
"posterPath": "/6KErczPBROQty7QoIsaa6wJYXZi.jpg",
"releaseDate": "2021-02-11T00:00:00",
"title": "Tom & Jerry",
"video": false,
"voteAverage": 7.800000190734863,
"voteCount": 717,
"alreadyInCp": false,
"trailer": null,
"homepage": null,
"rootPathOverride": 0,
"qualityOverride": 0,
"type": 1,
"releaseDates": null,
"digitalReleaseDate": null,
"id": 587807,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt1361336",
"theTvDbId": null,
"theMovieDbId": "587807",
"subscribed": false,
"showSubscribe": true
},
{
"adult": false,
"backdropPath": "/7prYzufdIOy1KCTZKVWpjBFqqNr.jpg",
"genreIds": [],
"originalLanguage": "en",
"originalTitle": "Raya and the Last Dragon",
"overview": "Long ago, in the fantasy world of Kumandra, humans and dragons lived together in harmony. But when an evil force threatened the land, the dragons sacrificed themselves to save humanity. Now, 500 years later, that same evil has returned and its up to a lone warrior, Raya, to track down the legendary last dragon to restore the fractured land and its divided people.",
"popularity": 3416.81298828125,
"posterPath": "/lPsD10PP4rgUGiGR4CCXA6iY0QQ.jpg",
"releaseDate": "2021-03-03T00:00:00",
"title": "Raya and the Last Dragon",
"video": false,
"voteAverage": 8.699999809265137,
"voteCount": 734,
"alreadyInCp": false,
"trailer": null,
"homepage": null,
"rootPathOverride": 0,
"qualityOverride": 0,
"type": 1,
"releaseDates": null,
"digitalReleaseDate": null,
"id": 527774,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt5109280",
"theTvDbId": null,
"theMovieDbId": "527774",
"subscribed": false,
"showSubscribe": true
},
{
"adult": false,
"backdropPath": "/8tNX8s3j1O0eqilOQkuroRLyOZA.jpg",
"genreIds": [],
"originalLanguage": "en",
"originalTitle": "Monster Hunter",
"overview": "A portal transports Cpt. Artemis and an elite unit of soldiers to a strange world where powerful monsters rule with deadly ferocity. Faced with relentless danger, the team encounters a mysterious hunter who may be their only hope to find a way home.",
"popularity": 2294.44091796875,
"posterPath": "/1UCOF11QCw8kcqvce8LKOO6pimh.jpg",
"releaseDate": "2020-12-03T00:00:00",
"title": "Monster Hunter",
"video": false,
"voteAverage": 7.300000190734863,
"voteCount": 1036,
"alreadyInCp": false,
"trailer": null,
"homepage": null,
"rootPathOverride": 0,
"qualityOverride": 0,
"type": 1,
"releaseDates": null,
"digitalReleaseDate": null,
"id": 458576,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt6475714",
"theTvDbId": null,
"theMovieDbId": "458576",
"subscribed": false,
"showSubscribe": true
},
{
"adult": false,
"backdropPath": "/srYya1ZlI97Au4jUYAktDe3avyA.jpg",
"genreIds": [],
"originalLanguage": "en",
"originalTitle": "Wonder Woman 1984",
"overview": "A botched store robbery places Wonder Woman in a global battle against a powerful and mysterious ancient force that puts her powers in jeopardy.",
"popularity": 1718.625,
"posterPath": "/8UlWHLMpgZm9bx6QYh0NFoq67TZ.jpg",
"releaseDate": "2020-12-16T00:00:00",
"title": "Wonder Woman 1984",
"video": false,
"voteAverage": 6.900000095367432,
"voteCount": 4139,
"alreadyInCp": false,
"trailer": null,
"homepage": null,
"rootPathOverride": 0,
"qualityOverride": 0,
"type": 1,
"releaseDates": null,
"digitalReleaseDate": null,
"id": 464052,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt7126948",
"theTvDbId": null,
"theMovieDbId": "464052",
"subscribed": false,
"showSubscribe": true
},
{
"adult": false,
"backdropPath": "/drulhSX7P5TQlEMQZ3JoXKSDEfz.jpg",
"genreIds": [],
"originalLanguage": "ko",
"originalTitle": "승리호",
"overview": "When the crew of a space junk collector ship called The Victory discovers a humanoid robot named Dorothy that's known to be a weapon of mass destruction, they get involved in a risky business deal which puts their lives at stake.",
"popularity": 1481.4510498046875,
"posterPath": "/y2Yp7KC2FJSsdlRM5qkkIwQGCqU.jpg",
"releaseDate": "2021-02-05T00:00:00",
"title": "Space Sweepers",
"video": false,
"voteAverage": 7.400000095367432,
"voteCount": 353,
"alreadyInCp": false,
"trailer": null,
"homepage": null,
"rootPathOverride": 0,
"qualityOverride": 0,
"type": 1,
"releaseDates": null,
"digitalReleaseDate": null,
"id": 581389,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt12838766",
"theTvDbId": null,
"theMovieDbId": "581389",
"subscribed": false,
"showSubscribe": true
},
{
"adult": false,
"backdropPath": "/7KL4yJ4JsbtS1BNRilUApLvMnc5.jpg",
"genreIds": [],
"originalLanguage": "sv",
"originalTitle": "Red Dot",
"overview": "On a hiking trip to rekindle their marriage, a couple find themselves fleeing for their lives in the unforgiving wilderness from an unknown shooter.",
"popularity": 1416.6009521484375,
"posterPath": "/xZ2KER2gOHbuHP2GJoODuXDSZCb.jpg",
"releaseDate": "2021-02-11T00:00:00",
"title": "Red Dot",
"video": false,
"voteAverage": 6.5,
"voteCount": 307,
"alreadyInCp": false,
"trailer": null,
"homepage": null,
"rootPathOverride": 0,
"qualityOverride": 0,
"type": 1,
"releaseDates": null,
"digitalReleaseDate": null,
"id": 649087,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt11307814",
"theTvDbId": null,
"theMovieDbId": "649087",
"subscribed": false,
"showSubscribe": true
},
{
"adult": false,
"backdropPath": "/vKzbIoHhk1z9DWYi8kyFe9Gg0HF.jpg",
"genreIds": [],
"originalLanguage": "en",
"originalTitle": "Coming 2 America",
"overview": "Prince Akeem Joffer is set to become King of Zamunda when he discovers he has a son he never knew about in America a street savvy Queens native named Lavelle. Honoring his royal father's dying wish to groom this son as the crown prince, Akeem and Semmi set off to America once again.",
"popularity": 2243.493896484375,
"posterPath": "/nWBPLkqNApY5pgrJFMiI9joSI30.jpg",
"releaseDate": "2021-03-05T00:00:00",
"title": "Coming 2 America",
"video": false,
"voteAverage": 7.099999904632568,
"voteCount": 552,
"alreadyInCp": false,
"trailer": null,
"homepage": null,
"rootPathOverride": 0,
"qualityOverride": 0,
"type": 1,
"releaseDates": null,
"digitalReleaseDate": null,
"id": 484718,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt6802400",
"theTvDbId": null,
"theMovieDbId": "484718",
"subscribed": false,
"showSubscribe": true
},
{
"adult": false,
"backdropPath": "/lOSdUkGQmbAl5JQ3QoHqBZUbZhC.jpg",
"genreIds": [],
"originalLanguage": "en",
"originalTitle": "Outside the Wire",
"overview": "In the near future, a drone pilot is sent into a deadly militarized zone and must work with an android officer to locate a doomsday device.",
"popularity": 1121.386962890625,
"posterPath": "/6XYLiMxHAaCsoyrVo38LBWMw2p8.jpg",
"releaseDate": "2021-01-15T00:00:00",
"title": "Outside the Wire",
"video": false,
"voteAverage": 6.5,
"voteCount": 812,
"alreadyInCp": false,
"trailer": null,
"homepage": null,
"rootPathOverride": 0,
"qualityOverride": 0,
"type": 1,
"releaseDates": null,
"digitalReleaseDate": null,
"id": 775996,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt10451914",
"theTvDbId": null,
"theMovieDbId": "775996",
"subscribed": false,
"showSubscribe": true
},
{
"adult": false,
"backdropPath": "/vfuzELmhBjBTswXj2Vqxnu5ge4g.jpg",
"genreIds": [],
"originalLanguage": "en",
"originalTitle": "The Little Things",
"overview": "Deputy Sheriff Joe \"Deke\" Deacon joins forces with Sgt. Jim Baxter to search for a serial killer who's terrorizing Los Angeles. As they track the culprit, Baxter is unaware that the investigation is dredging up echoes of Deke's past, uncovering disturbing secrets that could threaten more than his case.",
"popularity": 977.3709716796875,
"posterPath": "/c7VlGCCgM9GZivKSzBgzuOVxQn7.jpg",
"releaseDate": "2021-01-28T00:00:00",
"title": "The Little Things",
"video": false,
"voteAverage": 6.5,
"voteCount": 509,
"alreadyInCp": false,
"trailer": null,
"homepage": null,
"rootPathOverride": 0,
"qualityOverride": 0,
"type": 1,
"releaseDates": null,
"digitalReleaseDate": null,
"id": 602269,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt10016180",
"theTvDbId": null,
"theMovieDbId": "602269",
"subscribed": false,
"showSubscribe": true
},
{
"adult": false,
"backdropPath": "/6TPZSJ06OEXeelx1U1VIAt0j9Ry.jpg",
"genreIds": [],
"originalLanguage": "es",
"originalTitle": "Bajocero",
"overview": "When a prisoner transfer van is attacked, the cop in charge must fight those inside and outside while dealing with a silent foe: the icy temperatures.",
"popularity": 877.6370239257812,
"posterPath": "/dWSnsAGTfc8U27bWsy2RfwZs0Bs.jpg",
"releaseDate": "2021-01-29T00:00:00",
"title": "Below Zero",
"video": false,
"voteAverage": 6.5,
"voteCount": 414,
"alreadyInCp": false,
"trailer": null,
"homepage": null,
"rootPathOverride": 0,
"qualityOverride": 0,
"type": 1,
"releaseDates": null,
"digitalReleaseDate": null,
"id": 587996,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt9845564",
"theTvDbId": null,
"theMovieDbId": "587996",
"subscribed": false,
"showSubscribe": true
},
{
"adult": false,
"backdropPath": "/fRrpOILyXuWaWLmqF7kXeMVwITQ.jpg",
"genreIds": [],
"originalLanguage": "en",
"originalTitle": "Black Water: Abyss",
"overview": "An adventure-loving couple convince their friends to explore a remote, uncharted cave system in the forests of Northern Australia. With a tropical storm approaching, they abseil into the mouth of the cave, but when the caves start to flood, tensions rise as oxygen levels fall and the friends find themselves trapped. Unknown to them, the storm has also brought in a pack of dangerous and hungry crocodiles.",
"popularity": 872.2529907226562,
"posterPath": "/95S6PinQIvVe4uJAd82a2iGZ0rA.jpg",
"releaseDate": "2020-07-09T00:00:00",
"title": "Black Water: Abyss",
"video": false,
"voteAverage": 5.099999904632568,
"voteCount": 155,
"alreadyInCp": false,
"trailer": null,
"homepage": null,
"rootPathOverride": 0,
"qualityOverride": 0,
"type": 1,
"releaseDates": null,
"digitalReleaseDate": null,
"id": 522444,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt7978672",
"theTvDbId": null,
"theMovieDbId": "522444",
"subscribed": false,
"showSubscribe": true
},
{
"adult": false,
"backdropPath": "/nz8xWrTKZzA5A7FgxaM4kfAoO1W.jpg",
"genreIds": [],
"originalLanguage": "en",
"originalTitle": "Breach",
"overview": "A hardened mechanic must stay awake and maintain an interstellar ark fleeing the dying planet Earth with a few thousand lucky souls on board... the last of humanity. Unfortunately, humans are not the only passengers. A shapeshifting alien creature has taken residence, its only goal is to kill as many people as possible. The crew must think quickly to stop this menace before it destroys mankind.",
"popularity": 794.0670166015625,
"posterPath": "/13B6onhL6FzSN2KaNeQeMML05pS.jpg",
"releaseDate": "2020-12-17T00:00:00",
"title": "Breach",
"video": false,
"voteAverage": 4.5,
"voteCount": 292,
"alreadyInCp": false,
"trailer": null,
"homepage": null,
"rootPathOverride": 0,
"qualityOverride": 0,
"type": 1,
"releaseDates": null,
"digitalReleaseDate": null,
"id": 651571,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt9820556",
"theTvDbId": null,
"theMovieDbId": "651571",
"subscribed": false,
"showSubscribe": true
},
{
"adult": false,
"backdropPath": "/3ombg55JQiIpoPnXYb2oYdr6DtP.jpg",
"genreIds": [],
"originalLanguage": "en",
"originalTitle": "Skylines",
"overview": "When a virus threatens to turn the now earth-dwelling friendly alien hybrids against humans, Captain Rose Corley must lead a team of elite mercenaries on a mission to the alien world in order to save what's left of humanity.",
"popularity": 745.0089721679688,
"posterPath": "/2W4ZvACURDyhiNnSIaFPHfNbny3.jpg",
"releaseDate": "2020-10-25T00:00:00",
"title": "Skylines",
"video": false,
"voteAverage": 6.099999904632568,
"voteCount": 210,
"alreadyInCp": false,
"trailer": null,
"homepage": null,
"rootPathOverride": 0,
"qualityOverride": 0,
"type": 1,
"releaseDates": null,
"digitalReleaseDate": null,
"id": 560144,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt9387250",
"theTvDbId": null,
"theMovieDbId": "560144",
"subscribed": false,
"showSubscribe": true
},
{
"adult": false,
"backdropPath": "/jeAQdDX9nguP6YOX6QSWKDPkbBo.jpg",
"genreIds": [],
"originalLanguage": "en",
"originalTitle": "Jiu Jitsu",
"overview": "Every six years, an ancient order of jiu-jitsu fighters joins forces to battle a vicious race of alien invaders. But when a celebrated war hero goes down in defeat, the fate of the planet and mankind hangs in the balance.",
"popularity": 753.3040161132812,
"posterPath": "/eLT8Cu357VOwBVTitkmlDEg32Fs.jpg",
"releaseDate": "2020-11-20T00:00:00",
"title": "Jiu Jitsu",
"video": false,
"voteAverage": 5.300000190734863,
"voteCount": 308,
"alreadyInCp": false,
"trailer": null,
"homepage": null,
"rootPathOverride": 0,
"qualityOverride": 0,
"type": 1,
"releaseDates": null,
"digitalReleaseDate": null,
"id": 590706,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt9624766",
"theTvDbId": null,
"theMovieDbId": "590706",
"subscribed": false,
"showSubscribe": true
},
{
"adult": false,
"backdropPath": "/kf456ZqeC45XTvo6W9pW5clYKfQ.jpg",
"genreIds": [],
"originalLanguage": "en",
"originalTitle": "Soul",
"overview": "Joe Gardner is a middle school teacher with a love for jazz music. After a successful gig at the Half Note Club, he suddenly gets into an accident that separates his soul from his body and is transported to the You Seminar, a center in which souls develop and gain passions before being transported to a newborn child. Joe must enlist help from the other souls-in-training, like 22, a soul who has spent eons in the You Seminar, in order to get back to Earth.",
"popularity": 722.4119873046875,
"posterPath": "/hm58Jw4Lw8OIeECIq5qyPYhAeRJ.jpg",
"releaseDate": "2020-12-25T00:00:00",
"title": "Soul",
"video": false,
"voteAverage": 8.300000190734863,
"voteCount": 5164,
"alreadyInCp": false,
"trailer": null,
"homepage": null,
"rootPathOverride": 0,
"qualityOverride": 0,
"type": 1,
"releaseDates": null,
"digitalReleaseDate": null,
"id": 508442,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt2948372",
"theTvDbId": null,
"theMovieDbId": "508442",
"subscribed": false,
"showSubscribe": true
},
{
"adult": false,
"backdropPath": "/psTz3J2QXVKTQCGrPDFuC4kAOLb.jpg",
"genreIds": [],
"originalLanguage": "en",
"originalTitle": "Scooby-Doo! The Sword and the Scoob",
"overview": "An evil sorceress transports the gang back to the age of chivalrous knights, spell-casting wizards, and fire-breathing dragons.",
"popularity": 678.906982421875,
"posterPath": "/sCoG0ibohbPrnyomtzegSuBL40L.jpg",
"releaseDate": "2021-02-22T00:00:00",
"title": "Scooby-Doo! The Sword and the Scoob",
"video": false,
"voteAverage": 7.599999904632568,
"voteCount": 21,
"alreadyInCp": false,
"trailer": null,
"homepage": null,
"rootPathOverride": 0,
"qualityOverride": 0,
"type": 1,
"releaseDates": null,
"digitalReleaseDate": null,
"id": 682254,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt13676256",
"theTvDbId": null,
"theMovieDbId": "682254",
"subscribed": false,
"showSubscribe": true
},
{
"adult": false,
"backdropPath": "/fX8e94MEWSuTJExndVYxKsmA4Hw.jpg",
"genreIds": [],
"originalLanguage": "zh",
"originalTitle": "急先锋",
"overview": "Covert security company Vanguard is the last hope of survival for an accountant after he is targeted by the world's deadliest mercenary organization.",
"popularity": 714.8920288085938,
"posterPath": "/vYvppZMvXYheYTWVd8Rnn9nsmNp.jpg",
"releaseDate": "2020-09-30T00:00:00",
"title": "Vanguard",
"video": false,
"voteAverage": 6.400000095367432,
"voteCount": 225,
"alreadyInCp": false,
"trailer": null,
"homepage": null,
"rootPathOverride": 0,
"qualityOverride": 0,
"type": 1,
"releaseDates": null,
"digitalReleaseDate": null,
"id": 604822,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt9695722",
"theTvDbId": null,
"theMovieDbId": "604822",
"subscribed": false,
"showSubscribe": true
}
]

@ -0,0 +1,750 @@
[
{
"title": "Game of Thrones",
"aliases": null,
"banner": null,
"seriesId": 0,
"status": "ended",
"firstAired": "2011-04-18T01:00:00",
"network": "HBO",
"networkId": null,
"runtime": "60",
"genre": null,
"overview": "Seven noble families fight for control of the mythical land of Westeros. Friction between the houses leads to full-scale war. All while a very ancient evil awakens in the farthest north. Amidst the war, a neglected military order of misfits, the Night's Watch, is all that stands between the realms of men and icy horrors beyond.",
"lastUpdated": 0,
"airsDayOfWeek": null,
"airsTime": "21:00",
"rating": "9.10556",
"siteRating": 0,
"trailer": "https://youtube.com/watch?v=bjqEWgDVPe0",
"homepage": "https://www.hbo.com/game-of-thrones",
"seasonRequests": [],
"requestAll": false,
"firstSeason": false,
"latestSeason": false,
"fullyAvailable": false,
"partlyAvailable": false,
"type": 0,
"backdropPath": null,
"id": 121361,
"approved": true,
"denied": false,
"deniedReason": null,
"requested": true,
"requestId": 1,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt0944947",
"theTvDbId": "121361",
"theMovieDbId": null,
"subscribed": false,
"showSubscribe": false
},
{
"title": "Breaking Bad",
"aliases": null,
"banner": null,
"seriesId": 0,
"status": "ended",
"firstAired": "2008-01-21T02:00:00",
"network": "AMC",
"networkId": null,
"runtime": "45",
"genre": null,
"overview": "When Walter White, a New Mexico chemistry teacher, is diagnosed with Stage III cancer and given a prognosis of only two years left to live. He becomes filled with a sense of fearlessness and an unrelenting desire to secure his family's financial future at any cost as he enters the dangerous world of drugs and crime.",
"lastUpdated": 0,
"airsDayOfWeek": null,
"airsTime": "21:00",
"rating": "9.28991",
"siteRating": 0,
"trailer": "https://youtube.com/watch?v=XZ8daibM3AE",
"homepage": "https://www.amc.com/shows/breaking-bad",
"seasonRequests": [],
"requestAll": false,
"firstSeason": false,
"latestSeason": false,
"fullyAvailable": false,
"partlyAvailable": false,
"type": 0,
"backdropPath": null,
"id": 81189,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt0903747",
"theTvDbId": "81189",
"theMovieDbId": null,
"subscribed": false,
"showSubscribe": false
},
{
"title": "The Walking Dead",
"aliases": null,
"banner": null,
"seriesId": 0,
"status": "returning series",
"firstAired": "2010-11-01T01:00:00",
"network": "AMC",
"networkId": null,
"runtime": "42",
"genre": null,
"overview": "Sheriff's deputy Rick Grimes awakens from a coma to find a post-apocalyptic world dominated by flesh-eating zombies. He sets out to find his family and encounters many other survivors along the way.",
"lastUpdated": 0,
"airsDayOfWeek": null,
"airsTime": "21:00",
"rating": "8.18472269269855",
"siteRating": 0,
"trailer": "https://youtube.com/watch?v=R1v0uFms68U",
"homepage": "https://www.amc.com/shows/the-walking-dead",
"seasonRequests": [],
"requestAll": false,
"firstSeason": false,
"latestSeason": false,
"fullyAvailable": false,
"partlyAvailable": false,
"type": 0,
"backdropPath": null,
"id": 153021,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt1520211",
"theTvDbId": "153021",
"theMovieDbId": null,
"subscribed": false,
"showSubscribe": false
},
{
"title": "The Big Bang Theory",
"aliases": null,
"banner": null,
"seriesId": 0,
"status": "ended",
"firstAired": "2007-09-25T00:00:00",
"network": "CBS",
"networkId": null,
"runtime": "25",
"genre": null,
"overview": "A woman who moves into an apartment across the hall from two brilliant but socially awkward physicists shows them how little they know about life outside of the laboratory.",
"lastUpdated": 0,
"airsDayOfWeek": null,
"airsTime": "20:00",
"rating": "8.14052",
"siteRating": 0,
"trailer": "https://youtube.com/watch?v=3g2yTcg1QFI",
"homepage": "https://www.cbs.com/shows/big_bang_theory/",
"seasonRequests": [],
"requestAll": false,
"firstSeason": false,
"latestSeason": false,
"fullyAvailable": false,
"partlyAvailable": false,
"type": 0,
"backdropPath": null,
"id": 80379,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt0898266",
"theTvDbId": "80379",
"theMovieDbId": null,
"subscribed": false,
"showSubscribe": false
},
{
"title": "Sherlock",
"aliases": null,
"banner": null,
"seriesId": 0,
"status": "ended",
"firstAired": "2010-07-25T20:00:00",
"network": "BBC One",
"networkId": null,
"runtime": "90",
"genre": null,
"overview": "A modern update finds the famous sleuth and his doctor partner solving crime in 21st century London.",
"lastUpdated": 0,
"airsDayOfWeek": null,
"airsTime": "21:00",
"rating": "9.043281293560078",
"siteRating": 0,
"trailer": "https://youtube.com/watch?v=xK7S9mrFWL4",
"homepage": "https://www.bbc.co.uk/programmes/b018ttws",
"seasonRequests": [],
"requestAll": false,
"firstSeason": false,
"latestSeason": false,
"fullyAvailable": false,
"partlyAvailable": false,
"type": 0,
"backdropPath": null,
"id": 176941,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt1475582",
"theTvDbId": "176941",
"theMovieDbId": null,
"subscribed": false,
"showSubscribe": false
},
{
"title": "How I Met Your Mother",
"aliases": null,
"banner": null,
"seriesId": 0,
"status": "ended",
"firstAired": "2005-09-20T00:00:00",
"network": "CBS",
"networkId": null,
"runtime": "22",
"genre": null,
"overview": "A father recounts to his children - through a series of flashbacks - the journey he and his four best friends took leading up to him meeting their mother.",
"lastUpdated": 0,
"airsDayOfWeek": null,
"airsTime": "20:00",
"rating": "8.24396",
"siteRating": 0,
"trailer": "https://youtube.com/watch?v=XgUmyAGwxgw",
"homepage": "https://www.cbs.com/shows/how_i_met_your_mother/",
"seasonRequests": [],
"requestAll": false,
"firstSeason": false,
"latestSeason": false,
"fullyAvailable": false,
"partlyAvailable": false,
"type": 0,
"backdropPath": null,
"id": 75760,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt0460649",
"theTvDbId": "75760",
"theMovieDbId": null,
"subscribed": false,
"showSubscribe": false
},
{
"title": "Dexter",
"aliases": null,
"banner": null,
"seriesId": 0,
"status": "ended",
"firstAired": "2006-10-02T01:00:00",
"network": "Showtime",
"networkId": null,
"runtime": "50",
"genre": null,
"overview": "Dexter Morgan, a blood spatter pattern analyst for the Miami Metro Police also leads a secret life as a serial killer, hunting down criminals who have slipped through the cracks of justice.",
"lastUpdated": 0,
"airsDayOfWeek": null,
"airsTime": "21:00",
"rating": "8.56617",
"siteRating": 0,
"trailer": "https://youtube.com/watch?v=YQeUmSD1c3g",
"homepage": "https://www.sho.com/dexter",
"seasonRequests": [],
"requestAll": false,
"firstSeason": false,
"latestSeason": false,
"fullyAvailable": false,
"partlyAvailable": false,
"type": 0,
"backdropPath": null,
"id": 79349,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt0773262",
"theTvDbId": "79349",
"theMovieDbId": null,
"subscribed": false,
"showSubscribe": false
},
{
"title": "Friends",
"aliases": null,
"banner": null,
"seriesId": 0,
"status": "ended",
"firstAired": "1994-09-23T00:00:00",
"network": "NBC",
"networkId": null,
"runtime": "25",
"genre": null,
"overview": "The misadventures of a group of friends as they navigate the pitfalls of work, life and love in Manhattan.",
"lastUpdated": 0,
"airsDayOfWeek": null,
"airsTime": "20:00",
"rating": "8.72021",
"siteRating": 0,
"trailer": "https://youtube.com/watch?v=hDNNmeeJs1Q",
"homepage": "",
"seasonRequests": [],
"requestAll": false,
"firstSeason": false,
"latestSeason": false,
"fullyAvailable": false,
"partlyAvailable": false,
"type": 0,
"backdropPath": null,
"id": 79168,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt0108778",
"theTvDbId": "79168",
"theMovieDbId": null,
"subscribed": false,
"showSubscribe": false
},
{
"title": "Stranger Things",
"aliases": null,
"banner": null,
"seriesId": 0,
"status": "returning series",
"firstAired": "2016-07-15T07:00:00",
"network": "Netflix",
"networkId": null,
"runtime": "50",
"genre": null,
"overview": "When a young boy vanishes, a small town uncovers a mystery involving secret experiments, terrifying supernatural forces, and one strange little girl.",
"lastUpdated": 0,
"airsDayOfWeek": null,
"airsTime": "03:00",
"rating": "8.705786185554972",
"siteRating": 0,
"trailer": "https://youtube.com/watch?v=b9EkMc79ZSU",
"homepage": "https://www.netflix.com/title/80057281",
"seasonRequests": [],
"requestAll": false,
"firstSeason": false,
"latestSeason": false,
"fullyAvailable": false,
"partlyAvailable": false,
"type": 0,
"backdropPath": null,
"id": 305288,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt4574334",
"theTvDbId": "305288",
"theMovieDbId": null,
"subscribed": false,
"showSubscribe": false
},
{
"title": "Arrow",
"aliases": null,
"banner": null,
"seriesId": 0,
"status": "ended",
"firstAired": "2012-10-11T01:00:00",
"network": "The CW",
"networkId": null,
"runtime": "42",
"genre": null,
"overview": "Spoiled billionaire playboy Oliver Queen is missing and presumed dead when his yacht is lost at sea. He returns five years later a changed man, determined to clean up the city as a hooded vigilante armed with a bow.",
"lastUpdated": 0,
"airsDayOfWeek": null,
"airsTime": "21:00",
"rating": "7.70376",
"siteRating": 0,
"trailer": "https://youtube.com/watch?v=hTv13EjlLNg",
"homepage": "https://www.cwtv.com/shows/arrow",
"seasonRequests": [],
"requestAll": false,
"firstSeason": false,
"latestSeason": false,
"fullyAvailable": false,
"partlyAvailable": false,
"type": 0,
"backdropPath": null,
"id": 257655,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt2193021",
"theTvDbId": "257655",
"theMovieDbId": null,
"subscribed": false,
"showSubscribe": false
},
{
"title": "Lost",
"aliases": null,
"banner": null,
"seriesId": 0,
"status": "ended",
"firstAired": "2004-09-23T01:00:00",
"network": "ABC",
"networkId": null,
"runtime": "42",
"genre": null,
"overview": "Stripped of everything, the survivors of a horrific plane crash must work together to stay alive. But the island holds many secrets.",
"lastUpdated": 0,
"airsDayOfWeek": null,
"airsTime": "21:00",
"rating": "8.23659",
"siteRating": 0,
"trailer": "https://youtube.com/watch?v=72kQIIDBIUU",
"homepage": "https://abc.go.com/shows/lost",
"seasonRequests": [],
"requestAll": false,
"firstSeason": false,
"latestSeason": false,
"fullyAvailable": false,
"partlyAvailable": false,
"type": 0,
"backdropPath": null,
"id": 73739,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt0411008",
"theTvDbId": "73739",
"theMovieDbId": null,
"subscribed": false,
"showSubscribe": false
},
{
"title": "House",
"aliases": null,
"banner": null,
"seriesId": 0,
"status": "ended",
"firstAired": "2004-11-17T02:00:00",
"network": "FOX",
"networkId": null,
"runtime": "45",
"genre": null,
"overview": "Dr. Gregory House is a maverick physician who is devoid of bedside manner. While his behavior can border on antisocial, Dr. House thrives on the challenge of solving the medical puzzles that other doctors give up on. Together with his hand-picked team of young medical experts, he'll do whatever it takes in the race against the clock to solve the case.",
"lastUpdated": 0,
"airsDayOfWeek": null,
"airsTime": "21:00",
"rating": "8.66596",
"siteRating": 0,
"trailer": "https://youtube.com/watch?v=MczMB8nU1sY",
"homepage": "https://www.fox.com/house/index.htm",
"seasonRequests": [],
"requestAll": false,
"firstSeason": false,
"latestSeason": false,
"fullyAvailable": false,
"partlyAvailable": false,
"type": 0,
"backdropPath": null,
"id": 73255,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt0412142",
"theTvDbId": "73255",
"theMovieDbId": null,
"subscribed": false,
"showSubscribe": false
},
{
"title": "Homeland",
"aliases": null,
"banner": null,
"seriesId": 0,
"status": "ended",
"firstAired": "2011-10-03T01:00:00",
"network": "Showtime",
"networkId": null,
"runtime": "45",
"genre": null,
"overview": "CIA officer Carrie Mathison is tops in her field despite being bipolar, which makes her volatile and unpredictable. With the help of her long-time mentor Saul Berenson, Carrie fearlessly risks everything, including her personal well-being and even sanity, at every turn.",
"lastUpdated": 0,
"airsDayOfWeek": null,
"airsTime": "21:00",
"rating": "8.343610105492623",
"siteRating": 0,
"trailer": "https://youtube.com/watch?v=KyFmS3wRPCQ",
"homepage": "https://www.sho.com/sho/homeland/home",
"seasonRequests": [],
"requestAll": false,
"firstSeason": false,
"latestSeason": false,
"fullyAvailable": false,
"partlyAvailable": false,
"type": 0,
"backdropPath": null,
"id": 247897,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt1796960",
"theTvDbId": "247897",
"theMovieDbId": null,
"subscribed": false,
"showSubscribe": false
},
{
"title": "House of Cards",
"aliases": null,
"banner": null,
"seriesId": 0,
"status": "ended",
"firstAired": "2013-02-01T08:00:00",
"network": "Netflix",
"networkId": null,
"runtime": "50",
"genre": null,
"overview": "Set in present day Washington, D.C., House of Cards is the story of Frank Underwood, a ruthless and cunning politician, and his wife Claire who will stop at nothing to conquer everything. This wicked political drama penetrates the shadowy world of greed, sex and corruption in modern D.C.",
"lastUpdated": 0,
"airsDayOfWeek": null,
"airsTime": "03:00",
"rating": "8.667647295881357",
"siteRating": 0,
"trailer": "https://youtube.com/watch?v=x1E8PSGcyqI",
"homepage": "https://www.netflix.com/title/70178217",
"seasonRequests": [],
"requestAll": false,
"firstSeason": false,
"latestSeason": false,
"fullyAvailable": false,
"partlyAvailable": false,
"type": 0,
"backdropPath": null,
"id": 262980,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt1856010",
"theTvDbId": "262980",
"theMovieDbId": null,
"subscribed": false,
"showSubscribe": false
},
{
"title": "Supernatural",
"aliases": null,
"banner": null,
"seriesId": 0,
"status": "ended",
"firstAired": "2005-09-14T00:00:00",
"network": "The CW",
"networkId": null,
"runtime": "45",
"genre": null,
"overview": "When they were boys, Sam and Dean Winchester lost their mother to a mysterious and demonic supernatural force. Subsequently, their father raised them to be soldiers. He taught them about the paranormal evil that lives in the dark corners and on the back roads of America ... and he taught them how to kill it. Now, the Winchester brothers crisscross the country in their '67 Chevy Impala, battling every kind of supernatural threat they encounter along the way.",
"lastUpdated": 0,
"airsDayOfWeek": null,
"airsTime": "20:00",
"rating": "8.448307891123497",
"siteRating": 0,
"trailer": "",
"homepage": "https://www.cwtv.com/shows/supernatural",
"seasonRequests": [],
"requestAll": false,
"firstSeason": false,
"latestSeason": false,
"fullyAvailable": false,
"partlyAvailable": false,
"type": 0,
"backdropPath": null,
"id": 78901,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt0460681",
"theTvDbId": "78901",
"theMovieDbId": null,
"subscribed": false,
"showSubscribe": false
},
{
"title": "Fringe",
"aliases": null,
"banner": null,
"seriesId": 0,
"status": "ended",
"firstAired": "2008-09-10T01:00:00",
"network": "FOX",
"networkId": null,
"runtime": "46",
"genre": null,
"overview": "FBI Special Agent Olivia Dunham, brilliant but formerly institutionalized scientist Walter Bishop and his scheming, reluctant son Peter uncover a deadly mystery involving a series of unbelievable events and realize they may be a part of a larger, more disturbing pattern that blurs the line between science fiction and technology.",
"lastUpdated": 0,
"airsDayOfWeek": null,
"airsTime": "21:00",
"rating": "8.697706364733797",
"siteRating": 0,
"trailer": "https://youtube.com/watch?v=29bSzbqZ3xE",
"homepage": "https://www.fox.com/fringe",
"seasonRequests": [],
"requestAll": false,
"firstSeason": false,
"latestSeason": false,
"fullyAvailable": false,
"partlyAvailable": false,
"type": 0,
"backdropPath": null,
"id": 82066,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt1119644",
"theTvDbId": "82066",
"theMovieDbId": null,
"subscribed": false,
"showSubscribe": false
},
{
"title": "Suits",
"aliases": null,
"banner": null,
"seriesId": 0,
"status": "ended",
"firstAired": "2011-06-24T01:00:00",
"network": "USA Network",
"networkId": null,
"runtime": "43",
"genre": null,
"overview": "College drop-out Mike Ross accidentally lands a job with one of New York's best legal closers, Harvey Specter. They soon become a winning team with Mike's raw talent and photographic memory, and Mike soon reminds Harvey of why he went into the field of law in the first place.",
"lastUpdated": 0,
"airsDayOfWeek": null,
"airsTime": "21:00",
"rating": "8.55011",
"siteRating": 0,
"trailer": "https://youtube.com/watch?v=2Q18TnxZxLI",
"homepage": "https://www.usanetwork.com/suits",
"seasonRequests": [],
"requestAll": false,
"firstSeason": false,
"latestSeason": false,
"fullyAvailable": false,
"partlyAvailable": false,
"type": 0,
"backdropPath": null,
"id": 247808,
"approved": false,
"denied": null,
"deniedReason": null,
"requested": false,
"requestId": 0,
"available": false,
"plexUrl": null,
"embyUrl": null,
"jellyfinUrl": null,
"quality": null,
"imdbId": "tt1632701",
"theTvDbId": "247808",
"theMovieDbId": null,
"subscribed": false,
"showSubscribe": false
}
]

@ -0,0 +1,3 @@
export abstract class BasePage {
abstract visit(options: Cypress.VisitOptions): Cypress.Chainable<Cypress.AUTWindow>;
}

@ -0,0 +1,37 @@
import { BasePage } from "../base.page";
class CarouselComponent {
private id: string;
get combinedButton(): Cypress.Chainable<any> {
return cy.get(`#${this.id}Combined-button`);
}
get movieButton(): Cypress.Chainable<any> {
return cy.get(`#${this.id}Movie-button`);
}
get tvButton(): Cypress.Chainable<any> {
return cy.get(`#${this.id}Tv-button`);
}
constructor(id: string) {
this.id = id;
}
}
class DiscoverPage extends BasePage {
popularCarousel = new CarouselComponent('popular');
constructor() {
super();
}
visit(options?: Cypress.VisitOptions): Cypress.Chainable<Cypress.AUTWindow> {
return cy.visit(`/discover`, options);
}
}
export const discoverPage = new DiscoverPage();

@ -0,0 +1,3 @@
export * from './discover/discover.page';
export * from './login/login.page';
export * from './wizard/wizard.page';

@ -0,0 +1,30 @@
import { BasePage } from "../base.page";
class LoginPage extends BasePage {
get username(): Cypress.Chainable<any> {
return cy.get('#username-field');
}
get password(): Cypress.Chainable<any> {
return cy.get('#password-field');
}
get ombiSignInButton(): Cypress.Chainable<any> {
return cy.get('[data-cy=OmbiButton]');
}
get plexSignInButton(): Cypress.Chainable<any> {
return cy.get('[data-cy=oAuthPlexButton]');
}
constructor() {
super();
}
visit(options?: Cypress.VisitOptions): Cypress.Chainable<Cypress.AUTWindow> {
return cy.visit(`/login`, options);
}
}
export const loginPage = new LoginPage();

@ -0,0 +1,64 @@
import { BasePage } from "../base.page";
class LocalUserTab {
get username(): Cypress.Chainable<any> {
return cy.get('#adminUsername');
}
get password(): Cypress.Chainable<any> {
return cy.get('#adminPassword');
}
get next(): Cypress.Chainable<any> {
return cy.getByData('nextLocalUser');
}
}
class WelcomeTab {
get next(): Cypress.Chainable<any> {
return cy.getByData('nextWelcome');
}
}
class MediaServerTab {
get next(): Cypress.Chainable<any> {
return cy.getByData('nextMediaServer');
}
}
class OmbiConfigTab {
get next(): Cypress.Chainable<any> {
return cy.getByData('nextOmbiConfig');
}
}
class WizardPage extends BasePage {
localUserTab: LocalUserTab;
welcomeTab: WelcomeTab;
mediaServerTab: MediaServerTab;
ombiConfigTab: OmbiConfigTab;
get finishButton(): Cypress.Chainable<any> {
return cy.get('#finishWizard');
}
get matStepsHeader(): Cypress.Chainable<any> {
return cy.get('mat-step-header');
}
constructor() {
super();
this.localUserTab = new LocalUserTab();
this.welcomeTab = new WelcomeTab();
this.mediaServerTab = new MediaServerTab();
this.ombiConfigTab = new OmbiConfigTab();
}
visit(options?: Cypress.VisitOptions): Cypress.Chainable<Cypress.AUTWindow> {
return cy.visit(`/`, options);
}
}
export const wizardPage = new WizardPage();

@ -1,23 +1,26 @@
import { wizardPage as Page } from "@/integration/page-objects";
describe("Wizard Setup", () => {
it("Wizard should be first page", () => {
cy.visit("");
Page.visit();
cy.location("pathname").should("contains", "/Wizard");
});
it("Finsh with no local user", () => {
cy.visit("");
cy.get("[data-test=nextWelcome]").click();
cy.get("[data-test=nextMediaServer]").click();
cy.get("[data-test=nextLocalUser]").click();
cy.get("[data-test=nextOmbiConfig]").click();
cy.get("#finishWizard").click();
Page.visit();
Page.welcomeTab.next.click();
Page.mediaServerTab.next.click();
Page.localUserTab.next.click();
Page.ombiConfigTab.next.click();
Page.finishButton.click();
cy.verifyNotification("Username '' is invalid, can only contain letters or digits.")
// Verify we end back up on the user page
cy.get('mat-step-header').then((items) => {
Page.matStepsHeader.then((items) => {
const results = items.filter((index, html) => {
var attributes = Cypress.$(html).attr('ng-reflect-index');
@ -33,16 +36,18 @@ describe("Wizard Setup", () => {
});
it("Compete Wizard", () => {
cy.visit("");
cy.get("[data-test=nextWelcome]").click();
cy.get("[data-test=nextMediaServer]").click();
Page.visit();
Page.welcomeTab.next.click();
Page.mediaServerTab.next.click();
Page.localUserTab.username.type(Cypress.env("username"));
Page.localUserTab.password.type(Cypress.env("password"));
cy.get('#adminUsername').type(Cypress.env("username"));
cy.get('#adminPassword').type(Cypress.env("password"));
Page.localUserTab.next.click();
Page.ombiConfigTab.next.click();
cy.get("[data-test=nextLocalUser]").click();
cy.get("[data-test=nextOmbiConfig]").click();
cy.get("#finishWizard").click();
Page.finishButton.click();
cy.location("pathname").should("contains", "/login");
});

@ -1,4 +1,4 @@
describe("TV Details Buttons", function () {
describe("TV Details Buttons", () => {
beforeEach(() => {
cy.login();
});

@ -0,0 +1,74 @@
import { discoverPage as Page } from '@/integration/page-objects';
describe("Discover Cards Tests", () => {
beforeEach(() => {
cy.login();
});
it("Popular combined should load movies and TV", () => {
cy.intercept("GET","**/search/Movie/Popular/**").as('moviePopular');
cy.intercept("GET","**/search/Tv/popular/**").as('tvPopular');
Page.visit();
cy.wait('@moviePopular');
cy.wait('@tvPopular');
});
it("Popular Movie should load movies", () => {
cy.intercept("GET","**/search/Movie/Popular/**").as('moviePopular');
Page.visit();
Page.popularCarousel.movieButton.click();
cy.wait('@moviePopular');
});
it.only("Popular TV should load TV", () => {
cy.intercept("GET","**/search/Tv/popular/**").as('tvPopular');
Page.visit();
Page.popularCarousel.tvButton.click();
cy.wait('@tvPopular');
});
it("Popular Moives selected when set in localstorage", () => {
window.localStorage.setItem("DiscoverOptions2","2");
cy.intercept("GET","**/search/Movie/Popular/**").as('moviePopular');
Page.visit();
Page.popularCarousel.movieButton.parent().should('have.class','button-active');
cy.wait('@moviePopular');
});
it("Popular Tv selected when set in localstorage", () => {
window.localStorage.setItem("DiscoverOptions2","3");
cy.intercept("GET","**/search/Tv/popular/**").as('tvPopular');
Page.visit();
Page.popularCarousel.tvButton.parent().should('have.class','button-active');
cy.wait('@tvPopular');
});
it("Popular Combined selected when set in localstorage", () => {
window.localStorage.setItem("DiscoverOptions2","1");
cy.intercept("GET","**/search/Movie/Popular/**").as('moviePopular');
cy.intercept("GET","**/search/Tv/popular/**").as('tvPopular');
Page.visit();
Page.popularCarousel.combinedButton.parent().should('have.class','button-active');
cy.wait('@moviePopular');
cy.wait('@tvPopular');
});
});

@ -1,83 +1,88 @@
describe("Login Tests", () => {
import { loginPage as Page } from "@/integration/page-objects";
describe("Login Tests", () => {
it("Landing Page is enabled, should redirect", () => {
cy.landingSettings(true);
cy.visit("");
Page.visit();
cy.location("pathname").should("eq", "/landingpage");
cy.get("[data-cy=continue]").click();
cy.location("pathname").should("contains", "/login");
});
it("Landing Page is disabled, should not redirect", () => {
cy.landingSettings(false);
cy.visit("");
Page.visit();
cy.location("pathname").should("eq", "/login");
});
it("Plex OAuth Enabled, should be button", () => {
cy.landingSettings(false);
cy.fixture('login/authenticationSettngs').then((settings) => {
settings.enableOAuth = true;
cy.intercept('GET', '/Settings/Authentication', settings).as('authSettings')
})
cy.fixture("login/authenticationSettngs").then((settings) => {
settings.enableOAuth = true;
cy.intercept("GET", "/Settings/Authentication", settings).as(
"authSettings"
);
});
cy.visit("");
Page.visit();
cy.get("[data-cy=oAuthPlexButton]").should('be.visible');
cy.get("[data-cy=OmbiButton]").should('be.visible');
Page.plexSignInButton.should("be.visible");
Page.ombiSignInButton.should("be.visible");
});
it("Plex OAuth Diabled, Should show local form", () => {
cy.landingSettings(false);
cy.fixture('login/authenticationSettngs').then((settings) => {
settings.enableOAuth = false;
cy.intercept('GET', '/Settings/Authentication', settings).as('authSettings')
})
cy.fixture("login/authenticationSettngs").then((settings) => {
settings.enableOAuth = false;
cy.intercept("GET", "/Settings/Authentication", settings).as(
"authSettings"
);
});
cy.visit("");
Page.visit();
cy.get("[data-cy=OmbiButton]").should('be.visible');
Page.ombiSignInButton.should("be.visible");
cy.get('#username-field').should('be.visible');
cy.get('#password-field').should('be.visible');
Page.username.should("be.visible");
Page.password.should("be.visible");
});
it('Invalid Password',() => {
it("Invalid Password", () => {
cy.landingSettings(false);
cy.visit('/');
cy.contains('Sign in');
cy.get('#username-field').type('automation');
cy.get('#password-field').type('incorrectpw');
Page.visit();
cy.contains("Sign in");
Page.username.type("automation");
Page.password.type("incorrectpw");
cy.get('[data-cy=OmbiButton]').click();
cy.verifyNotification('Incorrect username');
Page.ombiSignInButton.click();
cy.verifyNotification("Incorrect username");
});
it('Invalid Username',() => {
it("Invalid Username", () => {
cy.landingSettings(false);
cy.visit('/');
cy.contains('Sign in');
cy.get('#username-field').type('bad username');
cy.get('#password-field').type('incorrectpw');
Page.visit();
cy.contains("Sign in");
Page.username.type("bad username");
Page.password.type("incorrectpw");
cy.get('[data-cy=OmbiButton]').click();
cy.verifyNotification('Incorrect username');
Page.ombiSignInButton.click();
cy.verifyNotification("Incorrect username");
});
it('Correct Login',() => {
it("Correct Login", () => {
cy.landingSettings(false);
cy.visit('/');
cy.contains('Sign in');
Page.visit();
cy.contains("Sign in");
cy.get('#username-field').type(Cypress.env('username'));
cy.get('#password-field').type(Cypress.env('password'));
Page.username.type(Cypress.env("username"));
Page.password.type(Cypress.env("password"));
cy.get('[data-cy=OmbiButton]').click();
cy.url().should('include', '/discover')
Page.ombiSignInButton.click();
cy.url().should("include", "/discover");
});
});

Loading…
Cancel
Save