mirror of https://github.com/Ombi-app/Ombi
commit
8368877c74
@ -0,0 +1,57 @@
|
||||
name: Automation Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ develop, feature/** ]
|
||||
pull_request:
|
||||
branches: [ develop ]
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
automation-tests:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 5.0.x
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
'**/node_modules'
|
||||
'/home/runner/.cache/Cypress'
|
||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||
|
||||
- name: Install Frontend Deps
|
||||
run: yarn --cwd ./src/Ombi/ClientApp install
|
||||
|
||||
- name: Install Automation Deps
|
||||
run: yarn --cwd ./tests install
|
||||
|
||||
- name: Start Backend
|
||||
run: |
|
||||
nohup dotnet run -p ./src/Ombi -- --host http://*:3577 &
|
||||
- name: Start Frontend
|
||||
run: |
|
||||
nohup yarn --cwd ./src/Ombi/ClientApp start &
|
||||
- name: Cypress Tests
|
||||
uses: cypress-io/github-action@v2.8.2
|
||||
with:
|
||||
record: true
|
||||
browser: chrome
|
||||
headless: true
|
||||
working-directory: tests
|
||||
wait-on: http://localhost:3577/
|
||||
# 7 minutes
|
||||
wait-on-timeout: 420
|
||||
env:
|
||||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@ -0,0 +1,27 @@
|
||||
<mat-card class="issue-card" *ngIf="!deleted">
|
||||
<mat-card-header>
|
||||
<mat-card-title>{{issue.subject}}</mat-card-title>
|
||||
<mat-card-subtitle>{{issue.userReported?.userName}} on {{issue.createdDate | date:short}}</mat-card-subtitle>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<p>
|
||||
{{issue.description}}
|
||||
</p>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button (click)="openChat(issue)" color="accent"><i class="far fa-comments"></i> {{'Issues.Chat' | translate }}</button>
|
||||
<div *ngIf="isAdmin && settings;then content else empty">here is ignored</div>
|
||||
<ng-template #content>
|
||||
<button mat-raised-button color="accent"
|
||||
*ngIf="issue.status === IssueStatus.Pending && settings.enableInProgress"
|
||||
(click)="inProgress(issue)">{{'Issues.MarkInProgress' | translate }}</button>
|
||||
|
||||
<button mat-raised-button color="accent"
|
||||
*ngIf="issue.status === IssueStatus.Pending && !settings.enableInProgress || issue.status == IssueStatus.InProgress"
|
||||
(click)="resolve(issue)">{{'Issues.MarkResolved' | translate}}</button>
|
||||
|
||||
<button mat-raised-button color="warn" (click)="delete(issue)"><i class="far fa-times-circle"></i> {{'Issues.Delete' | translate}}</button></ng-template>
|
||||
<ng-template #empty></ng-template>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
|
@ -0,0 +1,9 @@
|
||||
@import "~styles/variables.scss";
|
||||
|
||||
::ng-deep .issue-card {
|
||||
border: 3px solid $ombi-background-primary-accent;
|
||||
}
|
||||
|
||||
.top-spacing {
|
||||
margin-top:2%;
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
import { Component, Input } from "@angular/core";
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { TranslateService } from "@ngx-translate/core";
|
||||
import { IIssues, IIssueSettings, IssueStatus } from "../../../interfaces";
|
||||
import { IssuesService, NotificationService } from "../../../services";
|
||||
import { IssueChatComponent } from "../issue-chat/issue-chat.component";
|
||||
|
||||
@Component({
|
||||
selector: "issues-details-group",
|
||||
templateUrl: "details-group.component.html",
|
||||
styleUrls: ["details-group.component.scss"],
|
||||
})
|
||||
export class DetailsGroupComponent {
|
||||
|
||||
@Input() public issue: IIssues;
|
||||
@Input() public isAdmin: boolean;
|
||||
@Input() public settings: IIssueSettings;
|
||||
|
||||
public deleted: boolean;
|
||||
public IssueStatus = IssueStatus;
|
||||
public get hasRequest(): boolean {
|
||||
if (this.issue.requestId) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
constructor(
|
||||
private translateService: TranslateService, private issuesService: IssuesService,
|
||||
private notificationService: NotificationService, private dialog: MatDialog) { }
|
||||
|
||||
public async delete(issue: IIssues) {
|
||||
await this.issuesService.deleteIssue(issue.id);
|
||||
this.notificationService.success(this.translateService.instant("Issues.DeletedIssue"));
|
||||
this.deleted = true;
|
||||
}
|
||||
|
||||
public openChat(issue: IIssues) {
|
||||
this.dialog.open(IssueChatComponent, { width: "100vh", data: { issueId: issue.id }, panelClass: 'modal-panel' })
|
||||
}
|
||||
|
||||
public resolve(issue: IIssues) {
|
||||
this.issuesService.updateStatus({issueId: issue.id, status: IssueStatus.Resolved}).subscribe(() => {
|
||||
this.notificationService.success(this.translateService.instant("Issues.MarkedAsResolved"));
|
||||
issue.status = IssueStatus.Resolved;
|
||||
});
|
||||
}
|
||||
|
||||
public inProgress(issue: IIssues) {
|
||||
this.issuesService.updateStatus({issueId: issue.id, status: IssueStatus.InProgress}).subscribe(() => {
|
||||
this.notificationService.success(this.translateService.instant("Issues.MarkedAsInProgress"));
|
||||
issue.status = IssueStatus.InProgress;
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<div class="container top-spacing" *ngIf="details">
|
||||
|
||||
<h1>Issues for {{details.title}}</h1>
|
||||
<div>
|
||||
<span>{{'Issues.Requested' | translate}}
|
||||
<i *ngIf="!hasRequest" class="far fa-times-circle"></i>
|
||||
<i *ngIf="hasRequest" class="far fa-check-circle"></i>
|
||||
</span>
|
||||
<div>
|
||||
<button mat-raised-button color="accent" (click)="navToMedia()"><i class="far fa-eye"></i> {{'Common.ViewDetails' | translate }}</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6 top-spacing" *ngFor="let issue of details.issues">
|
||||
<issues-details-group [issue]="issue" [settings]="settings" [isAdmin]="isAdmin"></issues-details-group>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,9 @@
|
||||
@import "~styles/variables.scss";
|
||||
|
||||
::ng-deep .mat-card {
|
||||
background: $ombi-background-primary-accent;
|
||||
}
|
||||
|
||||
.top-spacing {
|
||||
margin-top:2%;
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
import { Component, Inject, OnInit, ViewEncapsulation } from "@angular/core";
|
||||
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { ActivatedRoute, ActivatedRouteSnapshot, Router } from "@angular/router";
|
||||
import { TranslateService } from "@ngx-translate/core";
|
||||
import { AuthService } from "../../../auth/auth.service";
|
||||
import { IIssues, IIssueSettings, IIssuesSummary, IssueStatus, RequestType } from "../../../interfaces";
|
||||
import { IssuesService, NotificationService, SettingsService } from "../../../services";
|
||||
import { IssuesV2Service } from "../../../services/issuesv2.service";
|
||||
import { IssueChatComponent } from "../issue-chat/issue-chat.component";
|
||||
|
||||
|
||||
export interface IssuesDetailsGroupData {
|
||||
issues: IIssues[];
|
||||
title: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: "issues-details",
|
||||
templateUrl: "details.component.html",
|
||||
styleUrls: ["details.component.scss"],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class IssuesDetailsComponent implements OnInit {
|
||||
|
||||
public details: IIssuesSummary;
|
||||
public isAdmin: boolean;
|
||||
public IssueStatus = IssueStatus;
|
||||
public settings: IIssueSettings;
|
||||
public get hasRequest(): boolean {
|
||||
return this.details.issues.some(x => x.requestId);
|
||||
}
|
||||
|
||||
private providerId: string;
|
||||
|
||||
constructor(private authService: AuthService, private settingsService: SettingsService,
|
||||
private issueServiceV2: IssuesV2Service, private route: ActivatedRoute, private router: Router,
|
||||
private issuesService: IssuesService, private translateService: TranslateService, private notificationService: NotificationService,
|
||||
private dialog: MatDialog) {
|
||||
this.route.params.subscribe(async (params: any) => {
|
||||
if (typeof params.providerId === 'string' || params.providerId instanceof String) {
|
||||
this.providerId = params.providerId;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public ngOnInit() {
|
||||
this.isAdmin = this.authService.hasRole("Admin") || this.authService.hasRole("PowerUser");
|
||||
this.settingsService.getIssueSettings().subscribe(x => this.settings = x);
|
||||
this.issueServiceV2.getIssuesByProviderId(this.providerId).subscribe(x => this.details = x);
|
||||
}
|
||||
|
||||
public resolve(issue: IIssues) {
|
||||
this.issuesService.updateStatus({issueId: issue.id, status: IssueStatus.Resolved}).subscribe(x => {
|
||||
this.notificationService.success(this.translateService.instant("Issues.MarkedAsResolved"));
|
||||
issue.status = IssueStatus.Resolved;
|
||||
});
|
||||
}
|
||||
|
||||
public inProgress(issue: IIssues) {
|
||||
this.issuesService.updateStatus({issueId: issue.id, status: IssueStatus.InProgress}).subscribe(x => {
|
||||
this.notificationService.success(this.translateService.instant("Issues.MarkedAsInProgress"));
|
||||
issue.status = IssueStatus.InProgress;
|
||||
});
|
||||
}
|
||||
|
||||
public async delete(issue: IIssues) {
|
||||
await this.issuesService.deleteIssue(issue.id);
|
||||
this.notificationService.success(this.translateService.instant("Issues.DeletedIssue"));
|
||||
this.details.issues = this.details.issues.filter((el) => { return el.id !== issue.id; });
|
||||
}
|
||||
|
||||
public openChat(issue: IIssues) {
|
||||
this.dialog.open(IssueChatComponent, { width: "100vh", data: { issueId: issue.id }, panelClass: 'modal-panel' })
|
||||
}
|
||||
|
||||
public navToMedia() {
|
||||
const firstIssue = this.details.issues[0];
|
||||
switch(firstIssue.requestType) {
|
||||
case RequestType.movie:
|
||||
this.router.navigate(['/details/movie/', firstIssue.providerId]);
|
||||
return;
|
||||
|
||||
case RequestType.album:
|
||||
this.router.navigate(['/details/artist/', firstIssue.providerId]);
|
||||
return;
|
||||
|
||||
case RequestType.tvShow:
|
||||
this.router.navigate(['/details/tv/', firstIssue.providerId]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,20 +1,19 @@
|
||||
import { AuthGuard } from "../../auth/auth.guard";
|
||||
import { IssuesListComponent } from "./issues-list/issues-list.component";
|
||||
import { Routes } from "@angular/router";
|
||||
import { IssuesV2Service } from "../../services/issuesv2.service";
|
||||
import { IdentityService, SearchService } from "../../services";
|
||||
import { IssuesDetailsComponent } from "./details/details.component";
|
||||
import { IssueChatComponent } from "./issue-chat/issue-chat.component";
|
||||
import { ChatBoxComponent } from "../../shared/chat-box/chat-box.component";
|
||||
|
||||
|
||||
|
||||
export const components: any[] = [
|
||||
IssuesListComponent,
|
||||
];
|
||||
|
||||
|
||||
export const entryComponents: any[] = [
|
||||
IssuesDetailsComponent,
|
||||
IssueChatComponent,
|
||||
ChatBoxComponent,
|
||||
];
|
||||
|
||||
export const providers: any[] = [
|
||||
];
|
||||
|
||||
export const routes: Routes = [
|
||||
{ path: "", component: IssuesListComponent, canActivate: [AuthGuard] },
|
||||
IssuesV2Service,
|
||||
IdentityService,
|
||||
SearchService,
|
||||
];
|
@ -0,0 +1,6 @@
|
||||
<ombi-chat-box *ngIf="loaded"
|
||||
[messages]="messages"
|
||||
(onAddMessage)="addComment($event)"
|
||||
>
|
||||
|
||||
</ombi-chat-box>
|
@ -0,0 +1,9 @@
|
||||
@import "~styles/variables.scss";
|
||||
|
||||
::ng-deep .mat-card {
|
||||
background: $ombi-background-primary-accent;
|
||||
}
|
||||
|
||||
.top-spacing {
|
||||
margin-top:2%;
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
import { Component, Inject, OnInit } from "@angular/core";
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { AuthService } from "../../../auth/auth.service";
|
||||
import { ILocalUser } from "../../../auth/IUserLogin";
|
||||
import { IIssuesChat, IIssueSettings, IssueStatus } from "../../../interfaces";
|
||||
import { IssuesService, SettingsService } from "../../../services";
|
||||
import { ChatMessages, ChatType } from "../../../shared/chat-box/chat-box.component";
|
||||
|
||||
|
||||
export interface ChatData {
|
||||
issueId: number;
|
||||
title: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: "issue-chat",
|
||||
templateUrl: "issue-chat.component.html",
|
||||
styleUrls: ["issue-chat.component.scss"],
|
||||
})
|
||||
export class IssueChatComponent implements OnInit {
|
||||
|
||||
public isAdmin: boolean;
|
||||
public comments: IIssuesChat[] = [];
|
||||
public IssueStatus = IssueStatus;
|
||||
public settings: IIssueSettings;
|
||||
public messages: ChatMessages[] = [];
|
||||
|
||||
public loaded: boolean;
|
||||
|
||||
private user: ILocalUser;
|
||||
|
||||
|
||||
constructor(public dialogRef: MatDialogRef<IssueChatComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: ChatData,
|
||||
private authService: AuthService, private settingsService: SettingsService,
|
||||
private issueService: IssuesService) { }
|
||||
|
||||
public ngOnInit() {
|
||||
this.isAdmin = this.authService.isAdmin();
|
||||
this.user = this.authService.claims();
|
||||
this.settingsService.getIssueSettings().subscribe(x => this.settings = x);
|
||||
this.issueService.getComments(this.data.issueId).subscribe(x => {
|
||||
this.comments = x;
|
||||
this.mapMessages();
|
||||
this.loaded = true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public deleteComment(commentId: number) {
|
||||
|
||||
}
|
||||
|
||||
public addComment(comment: string) {
|
||||
this.issueService.addComment({
|
||||
comment: comment,
|
||||
issueId: this.data.issueId
|
||||
}).subscribe(comment => {
|
||||
this.messages.push({
|
||||
chatType: ChatType.Sender,
|
||||
date: comment.date,
|
||||
id: -1,
|
||||
message: comment.comment,
|
||||
username: comment.user.userName
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public close() {
|
||||
this.dialogRef.close();
|
||||
}
|
||||
|
||||
private mapMessages() {
|
||||
this.comments.forEach((m: IIssuesChat) => {
|
||||
this.messages.push({
|
||||
chatType: m.username === this.user.name ? ChatType.Sender : ChatType.Reciever,
|
||||
date: m.date,
|
||||
id: m.id,
|
||||
message: m.comment,
|
||||
username: m.username
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
<!-- <table mat-table [dataSource]="pendingIssues" multiTemplateDataRows class="mat-elevation-z8">
|
||||
<ng-container matColumnDef="{{column}}" *ngFor="let column of columnsToDisplay">
|
||||
<th mat-header-cell *matHeaderCellDef> {{column}} </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element[column]}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="expandedDetail">
|
||||
<td mat-cell *matCellDef="let element" [attr.colspan]="columnsToDisplay.length">
|
||||
<div class="example-element-detail" [@detailExpand]="element == expandedElement ? 'expanded' : 'collapsed'">
|
||||
<div class="example-element-diagram">
|
||||
<div class="example-element-position"> {{element.requestId}} </div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="columnsToDisplay"></tr>
|
||||
<tr mat-row *matRowDef="let element; columns: columnsToDisplay;" class="example-element-row" [class.example-expanded-row]="expandedElement === element" (click)="expandedElement = expandedElement === element ? null : element">
|
||||
</tr>
|
||||
<tr mat-row *matRowDef="let row; columns: ['expandedDetail']" class="example-detail-row"></tr>
|
||||
</table> -->
|
@ -1,68 +0,0 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
|
||||
import { IssuesService } from "../../../services";
|
||||
|
||||
import { IIssueCount, IIssues, IPagenator, IssueStatus } from "../../../interfaces";
|
||||
import { COLUMNS } from "./issues-list.constants";
|
||||
|
||||
@Component({
|
||||
selector: "issues-list",
|
||||
templateUrl: "issues-list.component.html",
|
||||
})
|
||||
export class IssuesListComponent implements OnInit {
|
||||
|
||||
public columnsToDisplay = COLUMNS
|
||||
|
||||
public pendingIssues: IIssues[];
|
||||
public inProgressIssues: IIssues[];
|
||||
public resolvedIssues: IIssues[];
|
||||
|
||||
public count: IIssueCount;
|
||||
|
||||
private takeAmount = 10;
|
||||
private pendingSkip = 0;
|
||||
private inProgressSkip = 0;
|
||||
private resolvedSkip = 0;
|
||||
|
||||
constructor(private issueService: IssuesService) { }
|
||||
|
||||
public ngOnInit() {
|
||||
this.getPending();
|
||||
this.getInProg();
|
||||
this.getResolved();
|
||||
this.issueService.getIssuesCount().subscribe(x => this.count = x);
|
||||
}
|
||||
|
||||
public changePagePending(event: IPagenator) {
|
||||
this.pendingSkip = event.first;
|
||||
this.getPending();
|
||||
}
|
||||
|
||||
public changePageInProg(event: IPagenator) {
|
||||
this.inProgressSkip = event.first;
|
||||
this.getInProg();
|
||||
}
|
||||
|
||||
public changePageResolved(event: IPagenator) {
|
||||
this.resolvedSkip = event.first;
|
||||
this.getResolved();
|
||||
}
|
||||
|
||||
private getPending() {
|
||||
this.issueService.getIssuesPage(this.takeAmount, this.pendingSkip, IssueStatus.Pending).subscribe(x => {
|
||||
this.pendingIssues = x;
|
||||
});
|
||||
}
|
||||
|
||||
private getInProg() {
|
||||
this.issueService.getIssuesPage(this.takeAmount, this.inProgressSkip, IssueStatus.InProgress).subscribe(x => {
|
||||
this.inProgressIssues = x;
|
||||
});
|
||||
}
|
||||
|
||||
private getResolved() {
|
||||
this.issueService.getIssuesPage(this.takeAmount, this.resolvedSkip, IssueStatus.Resolved).subscribe(x => {
|
||||
this.resolvedIssues = x;
|
||||
});
|
||||
}
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
export const COLUMNS = [
|
||||
"title"
|
||||
]
|
@ -1,25 +1,28 @@
|
||||
<div class="small-middle-container">
|
||||
<mat-tab-group>
|
||||
<mat-tab label="{{'Issues.PendingTitle' | translate}}">
|
||||
<ng-template matTabContent>
|
||||
<div *ngIf="pendingIssues">
|
||||
<issues-table [issues]="pendingIssues" (changePage)="changePagePending($event)" [totalRecords]="count.pending"></issues-table>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<mat-tab *ngIf="inProgressIssues.length > 0" label="{{'Issues.InProgressTitle' | translate}}">
|
||||
<ng-template matTabContent>
|
||||
<div *ngIf="inProgressIssues">
|
||||
<issues-table [issues]="inProgressIssues" (changePage)="changePageInProg($event)" [totalRecords]="count.inProgress"></issues-table>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<mat-tab label="{{'Issues.ResolvedTitle' | translate}}">
|
||||
<ng-template matTabContent>
|
||||
<div *ngIf="resolvedIssues">
|
||||
<issues-table [issues]="resolvedIssues" (changePage)="changePageResolved($event)" [totalRecords]="count.resolved"></issues-table>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
<div *ngIf="count">
|
||||
|
||||
<mat-tab-group>
|
||||
<mat-tab label="{{'Issues.PendingTitle' | translate}}">
|
||||
<ng-template matTabContent>
|
||||
<div *ngIf="pendingIssues.length > 0">
|
||||
<issues-table [issues]="pendingIssues" (changePage)="changePagePending($event)" [totalRecords]="count.pending"></issues-table>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<mat-tab *ngIf="inProgressIssues.length > 0" label="{{'Issues.InProgressTitle' | translate}}">
|
||||
<ng-template matTabContent>
|
||||
<div *ngIf="inProgressIssues">
|
||||
<issues-table [issues]="inProgressIssues" (changePage)="changePageInProg($event)" [totalRecords]="count.inProgress"></issues-table>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<mat-tab label="{{'Issues.ResolvedTitle' | translate}}">
|
||||
<ng-template matTabContent>
|
||||
<div *ngIf="resolvedIssues.length > 0">
|
||||
<issues-table [issues]="resolvedIssues" (changePage)="changePageResolved($event)" [totalRecords]="count.resolved"></issues-table>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,23 @@
|
||||
import { PlatformLocation, APP_BASE_HREF } from "@angular/common";
|
||||
import { Injectable, Inject } from "@angular/core";
|
||||
|
||||
import { HttpClient } from "@angular/common/http";
|
||||
import { Observable } from "rxjs";
|
||||
|
||||
import { IIssueCategory, IIssueComments, IIssueCount, IIssues, IIssuesChat, IIssuesSummary, INewIssueComments, IssueStatus, IUpdateStatus } from "../interfaces";
|
||||
import { ServiceHelpers } from "./service.helpers";
|
||||
|
||||
@Injectable()
|
||||
export class IssuesV2Service extends ServiceHelpers {
|
||||
constructor(http: HttpClient, @Inject(APP_BASE_HREF) href:string) {
|
||||
super(http, "/api/v2/Issues/", href);
|
||||
}
|
||||
|
||||
public getIssues(position: number, take: number, status: IssueStatus): Observable<IIssuesSummary[]> {
|
||||
return this.http.get<IIssuesSummary[]>(`${this.url}${position}/${take}/${status}`, {headers: this.headers});
|
||||
}
|
||||
|
||||
public getIssuesByProviderId(providerId: string): Observable<IIssuesSummary> {
|
||||
return this.http.get<IIssuesSummary>(`${this.url}details/${providerId}`, {headers: this.headers});
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
<div class='container'>
|
||||
<div class='chatbox'>
|
||||
<div class='chatbox__user-list'>
|
||||
<h1>Users</h1>
|
||||
<div class='chatbox__user--active' *ngFor="let user of userList">
|
||||
<p>{{user}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chatbox-message-box">
|
||||
<div class="chatbox__messages" *ngFor="let m of messages">
|
||||
<div class="chatbox__messages__user-message">
|
||||
<div class="chatbox__messages__user-message--ind-message" [ngClass]="{'sender': m.chatType === ChatType.Sender, 'reciever':m.chatType === ChatType.Reciever }">
|
||||
<p class="name" *ngIf="m?.username">{{m.username}}</p>
|
||||
<br/>
|
||||
<p class="message">{{m.message}}</p>
|
||||
<p class="timestamp">{{m.date | amLocal | amDateFormat: 'l LT'}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form">
|
||||
<input type="text" [(ngModel)]="currentMessage" placeholder="Enter your message">
|
||||
<button mat-raised-button class="add-message" (click)="addMessage()">Send</button>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,342 @@
|
||||
// Variables
|
||||
$primary: rgba(23, 190, 187, 1);
|
||||
$secondary: rgba(240, 166, 202, 1);
|
||||
|
||||
$active: rgba(23, 190, 187, 0.8);
|
||||
$busy: rgba(252, 100, 113, 0.8);
|
||||
$away: rgba(255, 253, 130, 0.8);
|
||||
|
||||
// Triangle Mixin
|
||||
@mixin triangle($color, $size, $direction) {
|
||||
width: 0;
|
||||
height: 0;
|
||||
@if $direction == "up" {
|
||||
border-right: ($size + px) solid transparent;
|
||||
border-left: ($size + px) solid transparent;
|
||||
border-bottom: ($size + px) solid $color;
|
||||
}
|
||||
@if $direction == "down" {
|
||||
border-right: ($size + px) solid transparent;
|
||||
border-left: ($size + px) solid transparent;
|
||||
border-top: ($size + px) solid $color;
|
||||
}
|
||||
@if $direction == "right" {
|
||||
border-top: ($size + px) solid transparent;
|
||||
border-bottom: ($size + px) solid transparent;
|
||||
border-left: ($size + px) solid $color;
|
||||
}
|
||||
@if $direction == "left" {
|
||||
border-top: ($size + px) solid transparent;
|
||||
border-bottom: ($size + px) solid transparent;
|
||||
border-right: ($size + px) solid $color;
|
||||
}
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0; padding: 0;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Nunito', sans-serif;
|
||||
}
|
||||
|
||||
html,body {
|
||||
background: linear-gradient(120deg, $primary, $secondary);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
height: 70vh;
|
||||
width: 100%;
|
||||
h1 {
|
||||
margin: 0.5em auto;
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.chatbox {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
width: 85%;
|
||||
height: 100%;
|
||||
border-radius: 0.2em;
|
||||
position: relative;
|
||||
box-shadow: 1px 1px 12px rgba(0, 0, 0, 0.1);
|
||||
|
||||
.sender {
|
||||
float: right;
|
||||
&:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
margin: -1.5em -18.98em;
|
||||
@include triangle(rgba(255, 255, 255, 0.2), 10, left);
|
||||
}
|
||||
}
|
||||
.reciever {
|
||||
float: left;
|
||||
&:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
margin: -1.5em 2.65em;
|
||||
@include triangle(rgba(255, 255, 255, 0.2), 10, right);
|
||||
}
|
||||
}
|
||||
&__messages__user-message {
|
||||
width: 450px;
|
||||
}
|
||||
&__messages__user-message--ind-message {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
padding: 1em 0;
|
||||
height: auto;
|
||||
width: 65%;
|
||||
border-radius: 5px;
|
||||
margin: 2em 1em;
|
||||
overflow: auto;
|
||||
& > p.name {
|
||||
color: #FFF;
|
||||
font-size: 1em;
|
||||
}
|
||||
& > p.message {
|
||||
color: #FFF;
|
||||
font-size: 0.7em;
|
||||
margin: 0 2.8em;
|
||||
}& > p.timestamp {
|
||||
color: #FFF;
|
||||
font-size: 0.7em;
|
||||
margin: 0 2.8em;
|
||||
}
|
||||
}
|
||||
&__user-list {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
width: 25%;
|
||||
height: 100%;
|
||||
float: right;
|
||||
border-top-right-radius: 0.2em;
|
||||
border-bottom-right-radius: 0.2em;
|
||||
h1 {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-size: 0.9em;
|
||||
padding: 1em;
|
||||
margin: 0;
|
||||
font-weight: 300;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
&__user {
|
||||
width: 0.5em;
|
||||
height: 0.5em;
|
||||
border-radius: 100%;
|
||||
margin: 1em 0.7em;
|
||||
&--active {
|
||||
@extend .chatbox__user;
|
||||
background: $active;
|
||||
}
|
||||
&--busy {
|
||||
@extend .chatbox__user;
|
||||
background: $busy;
|
||||
}
|
||||
&--away {
|
||||
@extend .chatbox__user;
|
||||
background: $away;
|
||||
}
|
||||
}
|
||||
p {
|
||||
float: left;
|
||||
text-align: left;
|
||||
margin: -0.25em 2em;
|
||||
font-size: 0.7em;
|
||||
font-weight: 300;
|
||||
color: #FFF;
|
||||
width: 200px;
|
||||
}
|
||||
.form {
|
||||
background: #222;
|
||||
input {
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
border: none;
|
||||
width: 75%;
|
||||
padding: 1.2em;
|
||||
outline: none;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-weight: 300;
|
||||
}
|
||||
.add-message {
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
position: absolute;
|
||||
bottom: 1.5%;
|
||||
right: 26%;
|
||||
border: none;
|
||||
outline: none;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-weight: 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Placeholder Styling
|
||||
::-webkit-input-placeholder {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
|
||||
:-moz-placeholder {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
|
||||
::-moz-placeholder {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
|
||||
:-ms-input-placeholder {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
.chatbox-message-box{
|
||||
height: 90%;
|
||||
width: 75%;
|
||||
position: relative;
|
||||
overflow-y: scroll;
|
||||
display:flex;
|
||||
flex-direction:column-reverse;
|
||||
}
|
||||
|
||||
.chatbox__user-list p{
|
||||
font-size:12px;
|
||||
}
|
||||
|
||||
// ::-webkit-scrollbar {
|
||||
// width: 4px;
|
||||
// }
|
||||
// ::-webkit-scrollbar-thumb {
|
||||
// background-color: #4c4c6a;
|
||||
// border-radius: 2px;
|
||||
// }
|
||||
// .chatbox {
|
||||
// width: 300px;
|
||||
// height: 400px;
|
||||
// max-height: 400px;
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
// overflow: hidden;
|
||||
// box-shadow: 0 0 4px rgba(0,0,0,.14),0 4px 8px rgba(0,0,0,.28);
|
||||
// }
|
||||
// .chat-window {
|
||||
// flex: auto;
|
||||
// max-height: calc(100% - 60px);
|
||||
// background: #2f323b;
|
||||
// overflow: auto;
|
||||
// }
|
||||
// .chat-input {
|
||||
// flex: 0 0 auto;
|
||||
// height: 60px;
|
||||
// background: #40434e;
|
||||
// border-top: 1px solid #2671ff;
|
||||
// box-shadow: 0 0 4px rgba(0,0,0,.14),0 4px 8px rgba(0,0,0,.28);
|
||||
// }
|
||||
// .chat-input input {
|
||||
// height: 59px;
|
||||
// line-height: 60px;
|
||||
// outline: 0 none;
|
||||
// border: none;
|
||||
// width: calc(100% - 60px);
|
||||
// color: white;
|
||||
// text-indent: 10px;
|
||||
// font-size: 12pt;
|
||||
// padding: 0;
|
||||
// background: #40434e;
|
||||
// }
|
||||
// .chat-input button {
|
||||
// float: right;
|
||||
// outline: 0 none;
|
||||
// border: none;
|
||||
// background: rgba(255,255,255,.25);
|
||||
// height: 40px;
|
||||
// width: 40px;
|
||||
// border-radius: 50%;
|
||||
// padding: 2px 0 0 0;
|
||||
// margin: 10px;
|
||||
// transition: all 0.15s ease-in-out;
|
||||
// }
|
||||
// .chat-input input[good] + button {
|
||||
// box-shadow: 0 0 2px rgba(0,0,0,.12),0 2px 4px rgba(0,0,0,.24);
|
||||
// background: #2671ff;
|
||||
// }
|
||||
// .chat-input input[good] + button:hover {
|
||||
// box-shadow: 0 8px 17px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
|
||||
// }
|
||||
// .chat-input input[good] + button path {
|
||||
// fill: white;
|
||||
// }
|
||||
// .msg-container {
|
||||
// position: relative;
|
||||
// display: inline-block;
|
||||
// width: 100%;
|
||||
// margin: 0 0 10px 0;
|
||||
// padding: 0;
|
||||
// }
|
||||
// .msg-box {
|
||||
// display: flex;
|
||||
// background: #5b5e6c;
|
||||
// padding: 10px 10px 0 10px;
|
||||
// border-radius: 0 6px 6px 0;
|
||||
// max-width: 80%;
|
||||
// width: auto;
|
||||
// float: left;
|
||||
// box-shadow: 0 0 2px rgba(0,0,0,.12),0 2px 4px rgba(0,0,0,.24);
|
||||
// }
|
||||
// .user-img {
|
||||
// display: inline-block;
|
||||
// border-radius: 50%;
|
||||
// height: 40px;
|
||||
// width: 40px;
|
||||
// background: #2671ff;
|
||||
// margin: 0 10px 10px 0;
|
||||
// }
|
||||
// .flr {
|
||||
// flex: 1 0 auto;
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
// width: calc(100% - 50px);
|
||||
// }
|
||||
// .messages {
|
||||
// flex: 1 0 auto;
|
||||
// }
|
||||
// .msg {
|
||||
// display: inline-block;
|
||||
// font-size: 11pt;
|
||||
// line-height: 13pt;
|
||||
// color: rgba(255,255,255,.7);
|
||||
// margin: 0 0 4px 0;
|
||||
// }
|
||||
// .msg:first-of-type {
|
||||
// margin-top: 8px;
|
||||
// }
|
||||
// .timestamp {
|
||||
// color: rgba(0,0,0,.38);
|
||||
// font-size: 8pt;
|
||||
// margin-bottom: 10px;
|
||||
// }
|
||||
// .username {
|
||||
// margin-right: 3px;
|
||||
// }
|
||||
// .posttime {
|
||||
// margin-left: 3px;
|
||||
// }
|
||||
// .msg-self .msg-box {
|
||||
// border-radius: 6px 0 0 6px;
|
||||
// background: #2671ff;
|
||||
// float: right;
|
||||
// }
|
||||
// .msg-self .user-img {
|
||||
// margin: 0 0 10px 10px;
|
||||
// }
|
||||
// .msg-self .msg {
|
||||
// text-align: right;
|
||||
// }
|
||||
// .msg-self .timestamp {
|
||||
// text-align: right;
|
||||
// }
|
@ -0,0 +1,46 @@
|
||||
import { AfterContentChecked, AfterViewInit, Component, EventEmitter, Inject, Input, OnInit, Output } from "@angular/core";
|
||||
|
||||
|
||||
export interface ChatMessages {
|
||||
id: number;
|
||||
message: string;
|
||||
date: Date;
|
||||
username: string;
|
||||
chatType: ChatType;
|
||||
}
|
||||
|
||||
export enum ChatType {
|
||||
Sender,
|
||||
Reciever
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: "ombi-chat-box",
|
||||
templateUrl: "chat-box.component.html",
|
||||
styleUrls: ["chat-box.component.scss"],
|
||||
})
|
||||
export class ChatBoxComponent implements OnInit {
|
||||
@Input() messages: ChatMessages[];
|
||||
@Output() onAddMessage: EventEmitter<string> = new EventEmitter<string>();
|
||||
@Output() onDeleteMessage: EventEmitter<number> = new EventEmitter<number>();
|
||||
|
||||
public currentMessage: string;
|
||||
public userList: string[];
|
||||
public ChatType = ChatType;
|
||||
|
||||
public ngOnInit(): void {
|
||||
const allUsernames = this.messages.map(x => x.username);
|
||||
this.userList = allUsernames.filter((v, i, a) => a.indexOf(v) === i);
|
||||
}
|
||||
|
||||
public deleteMessage(id: number) {
|
||||
this.onDeleteMessage.emit(id);
|
||||
}
|
||||
|
||||
public addMessage() {
|
||||
if (this.currentMessage) {
|
||||
this.onAddMessage.emit(this.currentMessage);
|
||||
this.currentMessage = '';
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
{
|
||||
"OmbiDatabase": {
|
||||
"Type": "MySQL",
|
||||
"ConnectionString": "Server=192.168.68.118;Port=3306;Database=app.ombi.io;User=ombi"
|
||||
},
|
||||
"SettingsDatabase": {
|
||||
"Type": "MySQL",
|
||||
"ConnectionString": "Server=192.168.68.118;Port=3306;Database=app.ombi.io;User=ombi"
|
||||
},
|
||||
"ExternalDatabase": {
|
||||
"Type": "MySQL",
|
||||
"ConnectionString": "Server=192.168.68.118;Port=3306;Database=app.ombi.io;User=ombi"
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
@ -0,0 +1,15 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
.idea
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
cypress/videos
|
||||
cypress/screenshots
|
@ -0,0 +1,23 @@
|
||||
{
|
||||
"$schema": "https://on.cypress.io/cypress.schema.json",
|
||||
"supportFile": "cypress/support/index.ts",
|
||||
"baseUrl": "http://localhost:3577",
|
||||
"integrationFolder": "cypress/tests",
|
||||
"testFiles": "**/*.spec.ts*",
|
||||
"watchForFileChanges": true,
|
||||
"chromeWebSecurity": false,
|
||||
"viewportWidth": 2560,
|
||||
"viewportHeight": 1440,
|
||||
"retries": {
|
||||
"runMode": 2,
|
||||
"openMode": 0
|
||||
},
|
||||
"ignoreTestFiles": [
|
||||
"**/snapshots/*"
|
||||
],
|
||||
"env": {
|
||||
"username": "a",
|
||||
"password": "a"
|
||||
},
|
||||
"projectId": "o5451s"
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
{
|
||||
"$schema": "https://on.cypress.io/cypress.schema.json",
|
||||
"supportFile": "cypress/support/index.ts",
|
||||
"baseUrl": "https://app.ombi.io/",
|
||||
"integrationFolder": "cypress/tests",
|
||||
"testFiles": "**/*.spec.ts*",
|
||||
"retries": {
|
||||
"runMode": 2,
|
||||
"openMode": 1
|
||||
},
|
||||
"watchForFileChanges": true,
|
||||
"chromeWebSecurity": false,
|
||||
"viewportWidth": 2880,
|
||||
"viewportHeight": 2160,
|
||||
"ignoreTestFiles": ["**/snapshots/*"],
|
||||
"env": {
|
||||
"username": "beta",
|
||||
"password": "beta"
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
{
|
||||
"$schema": "https://on.cypress.io/cypress.schema.json",
|
||||
"supportFile": "cypress/support/index.ts",
|
||||
"baseUrl": "http://localhost:3577",
|
||||
"integrationFolder": "cypress/tests",
|
||||
"testFiles": "**/*.spec.ts*",
|
||||
"retries": {
|
||||
"runMode": 2,
|
||||
"openMode": 1
|
||||
},
|
||||
"watchForFileChanges": true,
|
||||
"projectId": "o5451s",
|
||||
"viewportWidth": 2560,
|
||||
"viewportHeight": 1440,
|
||||
"chromeWebSecurity": false,
|
||||
"ignoreTestFiles": ["**/snapshots/*"],
|
||||
"reporter": "junit",
|
||||
"reporterOptions": {
|
||||
"mochaFile": "results/junit/regression-[hash].xml"
|
||||
},
|
||||
"env": {
|
||||
"username": "a",
|
||||
"password": "a"
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,12 @@
|
||||
[
|
||||
{
|
||||
"order": 6,
|
||||
"streamingProvider": "JamiesNetwork",
|
||||
"logo": "/hYrcCS72d2alfXdGS1QXNEvwYDY.jpg"
|
||||
},
|
||||
{
|
||||
"order": 3,
|
||||
"streamingProvider": "Super1",
|
||||
"logo": "/zLX0ExkHc8xJ9W4u9JgnldDQLKv.jpg"
|
||||
}
|
||||
]
|
@ -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,5 @@
|
||||
{
|
||||
"name": "Using fixtures to represent data",
|
||||
"email": "hello@cypress.io",
|
||||
"body": "Fixtures are a great way to mock data for responses to routes"
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"allowNoPassword": false,
|
||||
"requireDigit": false,
|
||||
"requiredLength": 0,
|
||||
"requireLowercase": false,
|
||||
"requireNonAlphanumeric": false,
|
||||
"requireUppercase": false,
|
||||
"enableOAuth": true,
|
||||
"id": 14
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"enabled": false,
|
||||
"noticeEnabled": false,
|
||||
"noticeText": "Hey what's up!\n<br>\n<br>\nThe username and password is beta\n<br>\n<br>\nEnjoy!",
|
||||
"timeLimit": false,
|
||||
"startDateTime": "0001-01-01T00:00:00",
|
||||
"endDateTime": "0001-01-01T00:00:00",
|
||||
"expired": false,
|
||||
"id": 0
|
||||
}
|
@ -0,0 +1,299 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
context('Actions', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('https://example.cypress.io/commands/actions')
|
||||
})
|
||||
|
||||
// https://on.cypress.io/interacting-with-elements
|
||||
|
||||
it('.type() - type into a DOM element', () => {
|
||||
// https://on.cypress.io/type
|
||||
cy.get('.action-email')
|
||||
.type('fake@email.com').should('have.value', 'fake@email.com')
|
||||
|
||||
// .type() with special character sequences
|
||||
.type('{leftarrow}{rightarrow}{uparrow}{downarrow}')
|
||||
.type('{del}{selectall}{backspace}')
|
||||
|
||||
// .type() with key modifiers
|
||||
.type('{alt}{option}') //these are equivalent
|
||||
.type('{ctrl}{control}') //these are equivalent
|
||||
.type('{meta}{command}{cmd}') //these are equivalent
|
||||
.type('{shift}')
|
||||
|
||||
// Delay each keypress by 0.1 sec
|
||||
.type('slow.typing@email.com', { delay: 100 })
|
||||
.should('have.value', 'slow.typing@email.com')
|
||||
|
||||
cy.get('.action-disabled')
|
||||
// Ignore error checking prior to type
|
||||
// like whether the input is visible or disabled
|
||||
.type('disabled error checking', { force: true })
|
||||
.should('have.value', 'disabled error checking')
|
||||
})
|
||||
|
||||
it('.focus() - focus on a DOM element', () => {
|
||||
// https://on.cypress.io/focus
|
||||
cy.get('.action-focus').focus()
|
||||
.should('have.class', 'focus')
|
||||
.prev().should('have.attr', 'style', 'color: orange;')
|
||||
})
|
||||
|
||||
it('.blur() - blur off a DOM element', () => {
|
||||
// https://on.cypress.io/blur
|
||||
cy.get('.action-blur').type('About to blur').blur()
|
||||
.should('have.class', 'error')
|
||||
.prev().should('have.attr', 'style', 'color: red;')
|
||||
})
|
||||
|
||||
it('.clear() - clears an input or textarea element', () => {
|
||||
// https://on.cypress.io/clear
|
||||
cy.get('.action-clear').type('Clear this text')
|
||||
.should('have.value', 'Clear this text')
|
||||
.clear()
|
||||
.should('have.value', '')
|
||||
})
|
||||
|
||||
it('.submit() - submit a form', () => {
|
||||
// https://on.cypress.io/submit
|
||||
cy.get('.action-form')
|
||||
.find('[type="text"]').type('HALFOFF')
|
||||
|
||||
cy.get('.action-form').submit()
|
||||
.next().should('contain', 'Your form has been submitted!')
|
||||
})
|
||||
|
||||
it('.click() - click on a DOM element', () => {
|
||||
// https://on.cypress.io/click
|
||||
cy.get('.action-btn').click()
|
||||
|
||||
// You can click on 9 specific positions of an element:
|
||||
// -----------------------------------
|
||||
// | topLeft top topRight |
|
||||
// | |
|
||||
// | |
|
||||
// | |
|
||||
// | left center right |
|
||||
// | |
|
||||
// | |
|
||||
// | |
|
||||
// | bottomLeft bottom bottomRight |
|
||||
// -----------------------------------
|
||||
|
||||
// clicking in the center of the element is the default
|
||||
cy.get('#action-canvas').click()
|
||||
|
||||
cy.get('#action-canvas').click('topLeft')
|
||||
cy.get('#action-canvas').click('top')
|
||||
cy.get('#action-canvas').click('topRight')
|
||||
cy.get('#action-canvas').click('left')
|
||||
cy.get('#action-canvas').click('right')
|
||||
cy.get('#action-canvas').click('bottomLeft')
|
||||
cy.get('#action-canvas').click('bottom')
|
||||
cy.get('#action-canvas').click('bottomRight')
|
||||
|
||||
// .click() accepts an x and y coordinate
|
||||
// that controls where the click occurs :)
|
||||
|
||||
cy.get('#action-canvas')
|
||||
.click(80, 75) // click 80px on x coord and 75px on y coord
|
||||
.click(170, 75)
|
||||
.click(80, 165)
|
||||
.click(100, 185)
|
||||
.click(125, 190)
|
||||
.click(150, 185)
|
||||
.click(170, 165)
|
||||
|
||||
// click multiple elements by passing multiple: true
|
||||
cy.get('.action-labels>.label').click({ multiple: true })
|
||||
|
||||
// Ignore error checking prior to clicking
|
||||
cy.get('.action-opacity>.btn').click({ force: true })
|
||||
})
|
||||
|
||||
it('.dblclick() - double click on a DOM element', () => {
|
||||
// https://on.cypress.io/dblclick
|
||||
|
||||
// Our app has a listener on 'dblclick' event in our 'scripts.js'
|
||||
// that hides the div and shows an input on double click
|
||||
cy.get('.action-div').dblclick().should('not.be.visible')
|
||||
cy.get('.action-input-hidden').should('be.visible')
|
||||
})
|
||||
|
||||
it('.rightclick() - right click on a DOM element', () => {
|
||||
// https://on.cypress.io/rightclick
|
||||
|
||||
// Our app has a listener on 'contextmenu' event in our 'scripts.js'
|
||||
// that hides the div and shows an input on right click
|
||||
cy.get('.rightclick-action-div').rightclick().should('not.be.visible')
|
||||
cy.get('.rightclick-action-input-hidden').should('be.visible')
|
||||
})
|
||||
|
||||
it('.check() - check a checkbox or radio element', () => {
|
||||
// https://on.cypress.io/check
|
||||
|
||||
// By default, .check() will check all
|
||||
// matching checkbox or radio elements in succession, one after another
|
||||
cy.get('.action-checkboxes [type="checkbox"]').not('[disabled]')
|
||||
.check().should('be.checked')
|
||||
|
||||
cy.get('.action-radios [type="radio"]').not('[disabled]')
|
||||
.check().should('be.checked')
|
||||
|
||||
// .check() accepts a value argument
|
||||
cy.get('.action-radios [type="radio"]')
|
||||
.check('radio1').should('be.checked')
|
||||
|
||||
// .check() accepts an array of values
|
||||
cy.get('.action-multiple-checkboxes [type="checkbox"]')
|
||||
.check(['checkbox1', 'checkbox2']).should('be.checked')
|
||||
|
||||
// Ignore error checking prior to checking
|
||||
cy.get('.action-checkboxes [disabled]')
|
||||
.check({ force: true }).should('be.checked')
|
||||
|
||||
cy.get('.action-radios [type="radio"]')
|
||||
.check('radio3', { force: true }).should('be.checked')
|
||||
})
|
||||
|
||||
it('.uncheck() - uncheck a checkbox element', () => {
|
||||
// https://on.cypress.io/uncheck
|
||||
|
||||
// By default, .uncheck() will uncheck all matching
|
||||
// checkbox elements in succession, one after another
|
||||
cy.get('.action-check [type="checkbox"]')
|
||||
.not('[disabled]')
|
||||
.uncheck().should('not.be.checked')
|
||||
|
||||
// .uncheck() accepts a value argument
|
||||
cy.get('.action-check [type="checkbox"]')
|
||||
.check('checkbox1')
|
||||
.uncheck('checkbox1').should('not.be.checked')
|
||||
|
||||
// .uncheck() accepts an array of values
|
||||
cy.get('.action-check [type="checkbox"]')
|
||||
.check(['checkbox1', 'checkbox3'])
|
||||
.uncheck(['checkbox1', 'checkbox3']).should('not.be.checked')
|
||||
|
||||
// Ignore error checking prior to unchecking
|
||||
cy.get('.action-check [disabled]')
|
||||
.uncheck({ force: true }).should('not.be.checked')
|
||||
})
|
||||
|
||||
it('.select() - select an option in a <select> element', () => {
|
||||
// https://on.cypress.io/select
|
||||
|
||||
// at first, no option should be selected
|
||||
cy.get('.action-select')
|
||||
.should('have.value', '--Select a fruit--')
|
||||
|
||||
// Select option(s) with matching text content
|
||||
cy.get('.action-select').select('apples')
|
||||
// confirm the apples were selected
|
||||
// note that each value starts with "fr-" in our HTML
|
||||
cy.get('.action-select').should('have.value', 'fr-apples')
|
||||
|
||||
cy.get('.action-select-multiple')
|
||||
.select(['apples', 'oranges', 'bananas'])
|
||||
// when getting multiple values, invoke "val" method first
|
||||
.invoke('val')
|
||||
.should('deep.equal', ['fr-apples', 'fr-oranges', 'fr-bananas'])
|
||||
|
||||
// Select option(s) with matching value
|
||||
cy.get('.action-select').select('fr-bananas')
|
||||
// can attach an assertion right away to the element
|
||||
.should('have.value', 'fr-bananas')
|
||||
|
||||
cy.get('.action-select-multiple')
|
||||
.select(['fr-apples', 'fr-oranges', 'fr-bananas'])
|
||||
.invoke('val')
|
||||
.should('deep.equal', ['fr-apples', 'fr-oranges', 'fr-bananas'])
|
||||
|
||||
// assert the selected values include oranges
|
||||
cy.get('.action-select-multiple')
|
||||
.invoke('val').should('include', 'fr-oranges')
|
||||
})
|
||||
|
||||
it('.scrollIntoView() - scroll an element into view', () => {
|
||||
// https://on.cypress.io/scrollintoview
|
||||
|
||||
// normally all of these buttons are hidden,
|
||||
// because they're not within
|
||||
// the viewable area of their parent
|
||||
// (we need to scroll to see them)
|
||||
cy.get('#scroll-horizontal button')
|
||||
.should('not.be.visible')
|
||||
|
||||
// scroll the button into view, as if the user had scrolled
|
||||
cy.get('#scroll-horizontal button').scrollIntoView()
|
||||
.should('be.visible')
|
||||
|
||||
cy.get('#scroll-vertical button')
|
||||
.should('not.be.visible')
|
||||
|
||||
// Cypress handles the scroll direction needed
|
||||
cy.get('#scroll-vertical button').scrollIntoView()
|
||||
.should('be.visible')
|
||||
|
||||
cy.get('#scroll-both button')
|
||||
.should('not.be.visible')
|
||||
|
||||
// Cypress knows to scroll to the right and down
|
||||
cy.get('#scroll-both button').scrollIntoView()
|
||||
.should('be.visible')
|
||||
})
|
||||
|
||||
it('.trigger() - trigger an event on a DOM element', () => {
|
||||
// https://on.cypress.io/trigger
|
||||
|
||||
// To interact with a range input (slider)
|
||||
// we need to set its value & trigger the
|
||||
// event to signal it changed
|
||||
|
||||
// Here, we invoke jQuery's val() method to set
|
||||
// the value and trigger the 'change' event
|
||||
cy.get('.trigger-input-range')
|
||||
.invoke('val', 25)
|
||||
.trigger('change')
|
||||
.get('input[type=range]').siblings('p')
|
||||
.should('have.text', '25')
|
||||
})
|
||||
|
||||
it('cy.scrollTo() - scroll the window or element to a position', () => {
|
||||
// https://on.cypress.io/scrollto
|
||||
|
||||
// You can scroll to 9 specific positions of an element:
|
||||
// -----------------------------------
|
||||
// | topLeft top topRight |
|
||||
// | |
|
||||
// | |
|
||||
// | |
|
||||
// | left center right |
|
||||
// | |
|
||||
// | |
|
||||
// | |
|
||||
// | bottomLeft bottom bottomRight |
|
||||
// -----------------------------------
|
||||
|
||||
// if you chain .scrollTo() off of cy, we will
|
||||
// scroll the entire window
|
||||
cy.scrollTo('bottom')
|
||||
|
||||
cy.get('#scrollable-horizontal').scrollTo('right')
|
||||
|
||||
// or you can scroll to a specific coordinate:
|
||||
// (x axis, y axis) in pixels
|
||||
cy.get('#scrollable-vertical').scrollTo(250, 250)
|
||||
|
||||
// or you can scroll to a specific percentage
|
||||
// of the (width, height) of the element
|
||||
cy.get('#scrollable-both').scrollTo('75%', '25%')
|
||||
|
||||
// control the easing of the scroll (default is 'swing')
|
||||
cy.get('#scrollable-vertical').scrollTo('center', { easing: 'linear' })
|
||||
|
||||
// control the duration of the scroll (in ms)
|
||||
cy.get('#scrollable-both').scrollTo('center', { duration: 2000 })
|
||||
})
|
||||
})
|
@ -0,0 +1,39 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
context('Aliasing', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('https://example.cypress.io/commands/aliasing')
|
||||
})
|
||||
|
||||
it('.as() - alias a DOM element for later use', () => {
|
||||
// https://on.cypress.io/as
|
||||
|
||||
// Alias a DOM element for use later
|
||||
// We don't have to traverse to the element
|
||||
// later in our code, we reference it with @
|
||||
|
||||
cy.get('.as-table').find('tbody>tr')
|
||||
.first().find('td').first()
|
||||
.find('button').as('firstBtn')
|
||||
|
||||
// when we reference the alias, we place an
|
||||
// @ in front of its name
|
||||
cy.get('@firstBtn').click()
|
||||
|
||||
cy.get('@firstBtn')
|
||||
.should('have.class', 'btn-success')
|
||||
.and('contain', 'Changed')
|
||||
})
|
||||
|
||||
it('.as() - alias a route for later use', () => {
|
||||
// Alias the route to wait for its response
|
||||
cy.intercept('GET', '**/comments/*').as('getComment')
|
||||
|
||||
// we have code that gets a comment when
|
||||
// the button is clicked in scripts.js
|
||||
cy.get('.network-btn').click()
|
||||
|
||||
// https://on.cypress.io/wait
|
||||
cy.wait('@getComment').its('response.statusCode').should('eq', 200)
|
||||
})
|
||||
})
|
@ -0,0 +1,97 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
context('Connectors', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('https://example.cypress.io/commands/connectors')
|
||||
})
|
||||
|
||||
it('.each() - iterate over an array of elements', () => {
|
||||
// https://on.cypress.io/each
|
||||
cy.get('.connectors-each-ul>li')
|
||||
.each(($el, index, $list) => {
|
||||
console.log($el, index, $list)
|
||||
})
|
||||
})
|
||||
|
||||
it('.its() - get properties on the current subject', () => {
|
||||
// https://on.cypress.io/its
|
||||
cy.get('.connectors-its-ul>li')
|
||||
// calls the 'length' property yielding that value
|
||||
.its('length')
|
||||
.should('be.gt', 2)
|
||||
})
|
||||
|
||||
it('.invoke() - invoke a function on the current subject', () => {
|
||||
// our div is hidden in our script.js
|
||||
// $('.connectors-div').hide()
|
||||
|
||||
// https://on.cypress.io/invoke
|
||||
cy.get('.connectors-div').should('be.hidden')
|
||||
// call the jquery method 'show' on the 'div.container'
|
||||
.invoke('show')
|
||||
.should('be.visible')
|
||||
})
|
||||
|
||||
it('.spread() - spread an array as individual args to callback function', () => {
|
||||
// https://on.cypress.io/spread
|
||||
const arr = ['foo', 'bar', 'baz']
|
||||
|
||||
cy.wrap(arr).spread((foo, bar, baz) => {
|
||||
expect(foo).to.eq('foo')
|
||||
expect(bar).to.eq('bar')
|
||||
expect(baz).to.eq('baz')
|
||||
})
|
||||
})
|
||||
|
||||
describe('.then()', () => {
|
||||
it('invokes a callback function with the current subject', () => {
|
||||
// https://on.cypress.io/then
|
||||
cy.get('.connectors-list > li')
|
||||
.then(($lis) => {
|
||||
expect($lis, '3 items').to.have.length(3)
|
||||
expect($lis.eq(0), 'first item').to.contain('Walk the dog')
|
||||
expect($lis.eq(1), 'second item').to.contain('Feed the cat')
|
||||
expect($lis.eq(2), 'third item').to.contain('Write JavaScript')
|
||||
})
|
||||
})
|
||||
|
||||
it('yields the returned value to the next command', () => {
|
||||
cy.wrap(1)
|
||||
.then((num) => {
|
||||
expect(num).to.equal(1)
|
||||
|
||||
return 2
|
||||
})
|
||||
.then((num) => {
|
||||
expect(num).to.equal(2)
|
||||
})
|
||||
})
|
||||
|
||||
it('yields the original subject without return', () => {
|
||||
cy.wrap(1)
|
||||
.then((num) => {
|
||||
expect(num).to.equal(1)
|
||||
// note that nothing is returned from this callback
|
||||
})
|
||||
.then((num) => {
|
||||
// this callback receives the original unchanged value 1
|
||||
expect(num).to.equal(1)
|
||||
})
|
||||
})
|
||||
|
||||
it('yields the value yielded by the last Cypress command inside', () => {
|
||||
cy.wrap(1)
|
||||
.then((num) => {
|
||||
expect(num).to.equal(1)
|
||||
// note how we run a Cypress command
|
||||
// the result yielded by this Cypress command
|
||||
// will be passed to the second ".then"
|
||||
cy.wrap(2)
|
||||
})
|
||||
.then((num) => {
|
||||
// this callback receives the value yielded by "cy.wrap(2)"
|
||||
expect(num).to.equal(2)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
@ -0,0 +1,77 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
context('Cookies', () => {
|
||||
beforeEach(() => {
|
||||
Cypress.Cookies.debug(true)
|
||||
|
||||
cy.visit('https://example.cypress.io/commands/cookies')
|
||||
|
||||
// clear cookies again after visiting to remove
|
||||
// any 3rd party cookies picked up such as cloudflare
|
||||
cy.clearCookies()
|
||||
})
|
||||
|
||||
it('cy.getCookie() - get a browser cookie', () => {
|
||||
// https://on.cypress.io/getcookie
|
||||
cy.get('#getCookie .set-a-cookie').click()
|
||||
|
||||
// cy.getCookie() yields a cookie object
|
||||
cy.getCookie('token').should('have.property', 'value', '123ABC')
|
||||
})
|
||||
|
||||
it('cy.getCookies() - get browser cookies', () => {
|
||||
// https://on.cypress.io/getcookies
|
||||
cy.getCookies().should('be.empty')
|
||||
|
||||
cy.get('#getCookies .set-a-cookie').click()
|
||||
|
||||
// cy.getCookies() yields an array of cookies
|
||||
cy.getCookies().should('have.length', 1).should((cookies) => {
|
||||
// each cookie has these properties
|
||||
expect(cookies[0]).to.have.property('name', 'token')
|
||||
expect(cookies[0]).to.have.property('value', '123ABC')
|
||||
expect(cookies[0]).to.have.property('httpOnly', false)
|
||||
expect(cookies[0]).to.have.property('secure', false)
|
||||
expect(cookies[0]).to.have.property('domain')
|
||||
expect(cookies[0]).to.have.property('path')
|
||||
})
|
||||
})
|
||||
|
||||
it('cy.setCookie() - set a browser cookie', () => {
|
||||
// https://on.cypress.io/setcookie
|
||||
cy.getCookies().should('be.empty')
|
||||
|
||||
cy.setCookie('foo', 'bar')
|
||||
|
||||
// cy.getCookie() yields a cookie object
|
||||
cy.getCookie('foo').should('have.property', 'value', 'bar')
|
||||
})
|
||||
|
||||
it('cy.clearCookie() - clear a browser cookie', () => {
|
||||
// https://on.cypress.io/clearcookie
|
||||
cy.getCookie('token').should('be.null')
|
||||
|
||||
cy.get('#clearCookie .set-a-cookie').click()
|
||||
|
||||
cy.getCookie('token').should('have.property', 'value', '123ABC')
|
||||
|
||||
// cy.clearCookies() yields null
|
||||
cy.clearCookie('token').should('be.null')
|
||||
|
||||
cy.getCookie('token').should('be.null')
|
||||
})
|
||||
|
||||
it('cy.clearCookies() - clear browser cookies', () => {
|
||||
// https://on.cypress.io/clearcookies
|
||||
cy.getCookies().should('be.empty')
|
||||
|
||||
cy.get('#clearCookies .set-a-cookie').click()
|
||||
|
||||
cy.getCookies().should('have.length', 1)
|
||||
|
||||
// cy.clearCookies() yields null
|
||||
cy.clearCookies()
|
||||
|
||||
cy.getCookies().should('be.empty')
|
||||
})
|
||||
})
|
@ -0,0 +1,202 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
context('Cypress.Commands', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('https://example.cypress.io/cypress-api')
|
||||
})
|
||||
|
||||
// https://on.cypress.io/custom-commands
|
||||
|
||||
it('.add() - create a custom command', () => {
|
||||
Cypress.Commands.add('console', {
|
||||
prevSubject: true,
|
||||
}, (subject, method) => {
|
||||
// the previous subject is automatically received
|
||||
// and the commands arguments are shifted
|
||||
|
||||
// allow us to change the console method used
|
||||
method = method || 'log'
|
||||
|
||||
// log the subject to the console
|
||||
// @ts-ignore TS7017
|
||||
console[method]('The subject is', subject)
|
||||
|
||||
// whatever we return becomes the new subject
|
||||
// we don't want to change the subject so
|
||||
// we return whatever was passed in
|
||||
return subject
|
||||
})
|
||||
|
||||
// @ts-ignore TS2339
|
||||
cy.get('button').console('info').then(($button) => {
|
||||
// subject is still $button
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
context('Cypress.Cookies', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('https://example.cypress.io/cypress-api')
|
||||
})
|
||||
|
||||
// https://on.cypress.io/cookies
|
||||
it('.debug() - enable or disable debugging', () => {
|
||||
Cypress.Cookies.debug(true)
|
||||
|
||||
// Cypress will now log in the console when
|
||||
// cookies are set or cleared
|
||||
cy.setCookie('fakeCookie', '123ABC')
|
||||
cy.clearCookie('fakeCookie')
|
||||
cy.setCookie('fakeCookie', '123ABC')
|
||||
cy.clearCookie('fakeCookie')
|
||||
cy.setCookie('fakeCookie', '123ABC')
|
||||
})
|
||||
|
||||
it('.preserveOnce() - preserve cookies by key', () => {
|
||||
// normally cookies are reset after each test
|
||||
cy.getCookie('fakeCookie').should('not.be.ok')
|
||||
|
||||
// preserving a cookie will not clear it when
|
||||
// the next test starts
|
||||
cy.setCookie('lastCookie', '789XYZ')
|
||||
Cypress.Cookies.preserveOnce('lastCookie')
|
||||
})
|
||||
|
||||
it('.defaults() - set defaults for all cookies', () => {
|
||||
// now any cookie with the name 'session_id' will
|
||||
// not be cleared before each new test runs
|
||||
Cypress.Cookies.defaults({
|
||||
preserve: 'session_id',
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
context('Cypress.arch', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('https://example.cypress.io/cypress-api')
|
||||
})
|
||||
|
||||
it('Get CPU architecture name of underlying OS', () => {
|
||||
// https://on.cypress.io/arch
|
||||
expect(Cypress.arch).to.exist
|
||||
})
|
||||
})
|
||||
|
||||
context('Cypress.config()', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('https://example.cypress.io/cypress-api')
|
||||
})
|
||||
|
||||
it('Get and set configuration options', () => {
|
||||
// https://on.cypress.io/config
|
||||
let myConfig = Cypress.config()
|
||||
|
||||
expect(myConfig).to.have.property('animationDistanceThreshold', 5)
|
||||
expect(myConfig).to.have.property('baseUrl', null)
|
||||
expect(myConfig).to.have.property('defaultCommandTimeout', 4000)
|
||||
expect(myConfig).to.have.property('requestTimeout', 5000)
|
||||
expect(myConfig).to.have.property('responseTimeout', 30000)
|
||||
expect(myConfig).to.have.property('viewportHeight', 660)
|
||||
expect(myConfig).to.have.property('viewportWidth', 1000)
|
||||
expect(myConfig).to.have.property('pageLoadTimeout', 60000)
|
||||
expect(myConfig).to.have.property('waitForAnimations', true)
|
||||
|
||||
expect(Cypress.config('pageLoadTimeout')).to.eq(60000)
|
||||
|
||||
// this will change the config for the rest of your tests!
|
||||
Cypress.config('pageLoadTimeout', 20000)
|
||||
|
||||
expect(Cypress.config('pageLoadTimeout')).to.eq(20000)
|
||||
|
||||
Cypress.config('pageLoadTimeout', 60000)
|
||||
})
|
||||
})
|
||||
|
||||
context('Cypress.dom', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('https://example.cypress.io/cypress-api')
|
||||
})
|
||||
|
||||
// https://on.cypress.io/dom
|
||||
it('.isHidden() - determine if a DOM element is hidden', () => {
|
||||
let hiddenP = Cypress.$('.dom-p p.hidden').get(0)
|
||||
let visibleP = Cypress.$('.dom-p p.visible').get(0)
|
||||
|
||||
// our first paragraph has css class 'hidden'
|
||||
expect(Cypress.dom.isHidden(hiddenP)).to.be.true
|
||||
expect(Cypress.dom.isHidden(visibleP)).to.be.false
|
||||
})
|
||||
})
|
||||
|
||||
context('Cypress.env()', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('https://example.cypress.io/cypress-api')
|
||||
})
|
||||
|
||||
// We can set environment variables for highly dynamic values
|
||||
|
||||
// https://on.cypress.io/environment-variables
|
||||
it('Get environment variables', () => {
|
||||
// https://on.cypress.io/env
|
||||
// set multiple environment variables
|
||||
Cypress.env({
|
||||
host: 'veronica.dev.local',
|
||||
api_server: 'http://localhost:8888/v1/',
|
||||
})
|
||||
|
||||
// get environment variable
|
||||
expect(Cypress.env('host')).to.eq('veronica.dev.local')
|
||||
|
||||
// set environment variable
|
||||
Cypress.env('api_server', 'http://localhost:8888/v2/')
|
||||
expect(Cypress.env('api_server')).to.eq('http://localhost:8888/v2/')
|
||||
|
||||
// get all environment variable
|
||||
expect(Cypress.env()).to.have.property('host', 'veronica.dev.local')
|
||||
expect(Cypress.env()).to.have.property('api_server', 'http://localhost:8888/v2/')
|
||||
})
|
||||
})
|
||||
|
||||
context('Cypress.log', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('https://example.cypress.io/cypress-api')
|
||||
})
|
||||
|
||||
it('Control what is printed to the Command Log', () => {
|
||||
// https://on.cypress.io/cypress-log
|
||||
})
|
||||
})
|
||||
|
||||
context('Cypress.platform', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('https://example.cypress.io/cypress-api')
|
||||
})
|
||||
|
||||
it('Get underlying OS name', () => {
|
||||
// https://on.cypress.io/platform
|
||||
expect(Cypress.platform).to.be.exist
|
||||
})
|
||||
})
|
||||
|
||||
context('Cypress.version', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('https://example.cypress.io/cypress-api')
|
||||
})
|
||||
|
||||
it('Get current version of Cypress being run', () => {
|
||||
// https://on.cypress.io/version
|
||||
expect(Cypress.version).to.be.exist
|
||||
})
|
||||
})
|
||||
|
||||
context('Cypress.spec', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('https://example.cypress.io/cypress-api')
|
||||
})
|
||||
|
||||
it('Get current spec information', () => {
|
||||
// https://on.cypress.io/spec
|
||||
// wrap the object so we can inspect it easily by clicking in the command log
|
||||
cy.wrap(Cypress.spec).should('include.keys', ['name', 'relative', 'absolute'])
|
||||
})
|
||||
})
|
@ -0,0 +1,89 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
/// JSON fixture file can be loaded directly using
|
||||
// the built-in JavaScript bundler
|
||||
// @ts-ignore
|
||||
const requiredExample = require('../../fixtures/example')
|
||||
|
||||
context('Files', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('https://example.cypress.io/commands/files')
|
||||
})
|
||||
|
||||
beforeEach(() => {
|
||||
// load example.json fixture file and store
|
||||
// in the test context object
|
||||
cy.fixture('example.json').as('example')
|
||||
})
|
||||
|
||||
it('cy.fixture() - load a fixture', () => {
|
||||
// https://on.cypress.io/fixture
|
||||
|
||||
// Instead of writing a response inline you can
|
||||
// use a fixture file's content.
|
||||
|
||||
// when application makes an Ajax request matching "GET **/comments/*"
|
||||
// Cypress will intercept it and reply with the object in `example.json` fixture
|
||||
cy.intercept('GET', '**/comments/*', { fixture: 'example.json' }).as('getComment')
|
||||
|
||||
// we have code that gets a comment when
|
||||
// the button is clicked in scripts.js
|
||||
cy.get('.fixture-btn').click()
|
||||
|
||||
cy.wait('@getComment').its('response.body')
|
||||
.should('have.property', 'name')
|
||||
.and('include', 'Using fixtures to represent data')
|
||||
})
|
||||
|
||||
it('cy.fixture() or require - load a fixture', function () {
|
||||
// we are inside the "function () { ... }"
|
||||
// callback and can use test context object "this"
|
||||
// "this.example" was loaded in "beforeEach" function callback
|
||||
expect(this.example, 'fixture in the test context')
|
||||
.to.deep.equal(requiredExample)
|
||||
|
||||
// or use "cy.wrap" and "should('deep.equal', ...)" assertion
|
||||
// @ts-ignore
|
||||
cy.wrap(this.example, 'fixture vs require')
|
||||
.should('deep.equal', requiredExample)
|
||||
})
|
||||
|
||||
it('cy.readFile() - read file contents', () => {
|
||||
// https://on.cypress.io/readfile
|
||||
|
||||
// You can read a file and yield its contents
|
||||
// The filePath is relative to your project's root.
|
||||
cy.readFile('cypress.json').then((json) => {
|
||||
expect(json).to.be.an('object')
|
||||
})
|
||||
})
|
||||
|
||||
it('cy.writeFile() - write to a file', () => {
|
||||
// https://on.cypress.io/writefile
|
||||
|
||||
// You can write to a file
|
||||
|
||||
// Use a response from a request to automatically
|
||||
// generate a fixture file for use later
|
||||
cy.request('https://jsonplaceholder.cypress.io/users')
|
||||
.then((response) => {
|
||||
cy.writeFile('cypress/fixtures/users.json', response.body)
|
||||
})
|
||||
|
||||
cy.fixture('users').should((users) => {
|
||||
expect(users[0].name).to.exist
|
||||
})
|
||||
|
||||
// JavaScript arrays and objects are stringified
|
||||
// and formatted into text.
|
||||
cy.writeFile('cypress/fixtures/profile.json', {
|
||||
id: 8739,
|
||||
name: 'Jane',
|
||||
email: 'jane@example.com',
|
||||
})
|
||||
|
||||
cy.fixture('profile').should((profile) => {
|
||||
expect(profile.name).to.eq('Jane')
|
||||
})
|
||||
})
|
||||
})
|
@ -0,0 +1,52 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
context('Local Storage', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('https://example.cypress.io/commands/local-storage')
|
||||
})
|
||||
// Although local storage is automatically cleared
|
||||
// in between tests to maintain a clean state
|
||||
// sometimes we need to clear the local storage manually
|
||||
|
||||
it('cy.clearLocalStorage() - clear all data in local storage', () => {
|
||||
// https://on.cypress.io/clearlocalstorage
|
||||
cy.get('.ls-btn').click().should(() => {
|
||||
expect(localStorage.getItem('prop1')).to.eq('red')
|
||||
expect(localStorage.getItem('prop2')).to.eq('blue')
|
||||
expect(localStorage.getItem('prop3')).to.eq('magenta')
|
||||
})
|
||||
|
||||
// clearLocalStorage() yields the localStorage object
|
||||
cy.clearLocalStorage().should((ls) => {
|
||||
expect(ls.getItem('prop1')).to.be.null
|
||||
expect(ls.getItem('prop2')).to.be.null
|
||||
expect(ls.getItem('prop3')).to.be.null
|
||||
})
|
||||
|
||||
// Clear key matching string in Local Storage
|
||||
cy.get('.ls-btn').click().should(() => {
|
||||
expect(localStorage.getItem('prop1')).to.eq('red')
|
||||
expect(localStorage.getItem('prop2')).to.eq('blue')
|
||||
expect(localStorage.getItem('prop3')).to.eq('magenta')
|
||||
})
|
||||
|
||||
cy.clearLocalStorage('prop1').should((ls) => {
|
||||
expect(ls.getItem('prop1')).to.be.null
|
||||
expect(ls.getItem('prop2')).to.eq('blue')
|
||||
expect(ls.getItem('prop3')).to.eq('magenta')
|
||||
})
|
||||
|
||||
// Clear keys matching regex in Local Storage
|
||||
cy.get('.ls-btn').click().should(() => {
|
||||
expect(localStorage.getItem('prop1')).to.eq('red')
|
||||
expect(localStorage.getItem('prop2')).to.eq('blue')
|
||||
expect(localStorage.getItem('prop3')).to.eq('magenta')
|
||||
})
|
||||
|
||||
cy.clearLocalStorage(/prop1|2/).should((ls) => {
|
||||
expect(ls.getItem('prop1')).to.be.null
|
||||
expect(ls.getItem('prop2')).to.be.null
|
||||
expect(ls.getItem('prop3')).to.eq('magenta')
|
||||
})
|
||||
})
|
||||
})
|
@ -0,0 +1,32 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
context('Location', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('https://example.cypress.io/commands/location')
|
||||
})
|
||||
|
||||
it('cy.hash() - get the current URL hash', () => {
|
||||
// https://on.cypress.io/hash
|
||||
cy.hash().should('be.empty')
|
||||
})
|
||||
|
||||
it('cy.location() - get window.location', () => {
|
||||
// https://on.cypress.io/location
|
||||
cy.location().should((location) => {
|
||||
expect(location.hash).to.be.empty
|
||||
expect(location.href).to.eq('https://example.cypress.io/commands/location')
|
||||
expect(location.host).to.eq('example.cypress.io')
|
||||
expect(location.hostname).to.eq('example.cypress.io')
|
||||
expect(location.origin).to.eq('https://example.cypress.io')
|
||||
expect(location.pathname).to.eq('/commands/location')
|
||||
expect(location.port).to.eq('')
|
||||
expect(location.protocol).to.eq('https:')
|
||||
expect(location.search).to.be.empty
|
||||
})
|
||||
})
|
||||
|
||||
it('cy.url() - get the current URL', () => {
|
||||
// https://on.cypress.io/url
|
||||
cy.url().should('eq', 'https://example.cypress.io/commands/location')
|
||||
})
|
||||
})
|
@ -0,0 +1,104 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
context('Misc', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('https://example.cypress.io/commands/misc')
|
||||
})
|
||||
|
||||
it('.end() - end the command chain', () => {
|
||||
// https://on.cypress.io/end
|
||||
|
||||
// cy.end is useful when you want to end a chain of commands
|
||||
// and force Cypress to re-query from the root element
|
||||
cy.get('.misc-table').within(() => {
|
||||
// ends the current chain and yields null
|
||||
cy.contains('Cheryl').click().end()
|
||||
|
||||
// queries the entire table again
|
||||
cy.contains('Charles').click()
|
||||
})
|
||||
})
|
||||
|
||||
it('cy.exec() - execute a system command', () => {
|
||||
// execute a system command.
|
||||
// so you can take actions necessary for
|
||||
// your test outside the scope of Cypress.
|
||||
// https://on.cypress.io/exec
|
||||
|
||||
// we can use Cypress.platform string to
|
||||
// select appropriate command
|
||||
// https://on.cypress/io/platform
|
||||
cy.log(`Platform ${Cypress.platform} architecture ${Cypress.arch}`)
|
||||
|
||||
// on CircleCI Windows build machines we have a failure to run bash shell
|
||||
// https://github.com/cypress-io/cypress/issues/5169
|
||||
// so skip some of the tests by passing flag "--env circle=true"
|
||||
const isCircleOnWindows = Cypress.platform === 'win32' && Cypress.env('circle')
|
||||
|
||||
if (isCircleOnWindows) {
|
||||
cy.log('Skipping test on CircleCI')
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// cy.exec problem on Shippable CI
|
||||
// https://github.com/cypress-io/cypress/issues/6718
|
||||
const isShippable = Cypress.platform === 'linux' && Cypress.env('shippable')
|
||||
|
||||
if (isShippable) {
|
||||
cy.log('Skipping test on ShippableCI')
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
cy.exec('echo Jane Lane')
|
||||
.its('stdout').should('contain', 'Jane Lane')
|
||||
|
||||
if (Cypress.platform === 'win32') {
|
||||
cy.exec('print cypress.json')
|
||||
.its('stderr').should('be.empty')
|
||||
} else {
|
||||
cy.exec('cat cypress.json')
|
||||
.its('stderr').should('be.empty')
|
||||
|
||||
cy.exec('pwd')
|
||||
.its('code').should('eq', 0)
|
||||
}
|
||||
})
|
||||
|
||||
it('cy.focused() - get the DOM element that has focus', () => {
|
||||
// https://on.cypress.io/focused
|
||||
cy.get('.misc-form').find('#name').click()
|
||||
cy.focused().should('have.id', 'name')
|
||||
|
||||
cy.get('.misc-form').find('#description').click()
|
||||
cy.focused().should('have.id', 'description')
|
||||
})
|
||||
|
||||
context('Cypress.Screenshot', function () {
|
||||
it('cy.screenshot() - take a screenshot', () => {
|
||||
// https://on.cypress.io/screenshot
|
||||
cy.screenshot('my-image')
|
||||
})
|
||||
|
||||
it('Cypress.Screenshot.defaults() - change default config of screenshots', function () {
|
||||
Cypress.Screenshot.defaults({
|
||||
blackout: ['.foo'],
|
||||
capture: 'viewport',
|
||||
clip: { x: 0, y: 0, width: 200, height: 200 },
|
||||
scale: false,
|
||||
disableTimersAndAnimations: true,
|
||||
screenshotOnRunFailure: true,
|
||||
onBeforeScreenshot () { },
|
||||
onAfterScreenshot () { },
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
it('cy.wrap() - wrap an object', () => {
|
||||
// https://on.cypress.io/wrap
|
||||
cy.wrap({ foo: 'bar' })
|
||||
.should('have.property', 'foo')
|
||||
.and('include', 'bar')
|
||||
})
|
||||
})
|
@ -0,0 +1,56 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
context('Navigation', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('https://example.cypress.io')
|
||||
cy.get('.navbar-nav').contains('Commands').click()
|
||||
cy.get('.dropdown-menu').contains('Navigation').click()
|
||||
})
|
||||
|
||||
it('cy.go() - go back or forward in the browser\'s history', () => {
|
||||
// https://on.cypress.io/go
|
||||
|
||||
cy.location('pathname').should('include', 'navigation')
|
||||
|
||||
cy.go('back')
|
||||
cy.location('pathname').should('not.include', 'navigation')
|
||||
|
||||
cy.go('forward')
|
||||
cy.location('pathname').should('include', 'navigation')
|
||||
|
||||
// clicking back
|
||||
cy.go(-1)
|
||||
cy.location('pathname').should('not.include', 'navigation')
|
||||
|
||||
// clicking forward
|
||||
cy.go(1)
|
||||
cy.location('pathname').should('include', 'navigation')
|
||||
})
|
||||
|
||||
it('cy.reload() - reload the page', () => {
|
||||
// https://on.cypress.io/reload
|
||||
cy.reload()
|
||||
|
||||
// reload the page without using the cache
|
||||
cy.reload(true)
|
||||
})
|
||||
|
||||
it('cy.visit() - visit a remote url', () => {
|
||||
// https://on.cypress.io/visit
|
||||
|
||||
// Visit any sub-domain of your current domain
|
||||
|
||||
// Pass options to the visit
|
||||
cy.visit('https://example.cypress.io/commands/navigation', {
|
||||
timeout: 50000, // increase total time for the visit to resolve
|
||||
onBeforeLoad (contentWindow) {
|
||||
// contentWindow is the remote page's window object
|
||||
expect(typeof contentWindow === 'object').to.be.true
|
||||
},
|
||||
onLoad (contentWindow) {
|
||||
// contentWindow is the remote page's window object
|
||||
expect(typeof contentWindow === 'object').to.be.true
|
||||
},
|
||||
})
|
||||
})
|
||||
})
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue