mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 04:49:33 -07:00
commit
9f3ab48de6
5 changed files with 25 additions and 32 deletions
|
@ -19,7 +19,6 @@ import { CookieService } from "ng2-cookies";
|
||||||
import { CustomPageComponent } from "./custompage/custompage.component";
|
import { CustomPageComponent } from "./custompage/custompage.component";
|
||||||
import { DataViewModule } from "primeng/dataview";
|
import { DataViewModule } from "primeng/dataview";
|
||||||
import { DialogModule } from "primeng/dialog";
|
import { DialogModule } from "primeng/dialog";
|
||||||
import { FilterService } from "./discover/services/filter-service";
|
|
||||||
import { JwtModule } from "@auth0/angular-jwt";
|
import { JwtModule } from "@auth0/angular-jwt";
|
||||||
import { LandingPageComponent } from "./landingpage/landingpage.component";
|
import { LandingPageComponent } from "./landingpage/landingpage.component";
|
||||||
import { LandingPageService } from "./services";
|
import { LandingPageService } from "./services";
|
||||||
|
@ -222,7 +221,6 @@ export function JwtTokenGetter() {
|
||||||
MessageService,
|
MessageService,
|
||||||
StorageService,
|
StorageService,
|
||||||
RequestService,
|
RequestService,
|
||||||
FilterService,
|
|
||||||
SignalRNotificationService,
|
SignalRNotificationService,
|
||||||
{
|
{
|
||||||
provide: APP_BASE_HREF,
|
provide: APP_BASE_HREF,
|
||||||
|
|
|
@ -55,18 +55,17 @@ export class DiscoverSearchResultsComponent implements OnInit {
|
||||||
|
|
||||||
public async ngOnInit() {
|
public async ngOnInit() {
|
||||||
this.isAdmin = this.authService.isAdmin();
|
this.isAdmin = this.authService.isAdmin();
|
||||||
|
|
||||||
if (this.advancedDataService) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.loadingFlag = true;
|
|
||||||
|
|
||||||
this.filterService.onFilterChange.subscribe(async x => {
|
this.filterService.onFilterChange.subscribe(async x => {
|
||||||
if (!isEqual(this.filter, x)) {
|
if (!isEqual(this.filter, x)) {
|
||||||
this.filter = { ...x };
|
this.filter = { ...x };
|
||||||
await this.search();
|
await this.search();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (this.advancedDataService) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.loadingFlag = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async init() {
|
public async init() {
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import { EventEmitter, Injectable, Output } from "@angular/core";
|
import { EventEmitter, Injectable, Output } from "@angular/core";
|
||||||
|
|
||||||
import { SearchFilter } from "../../my-nav/SearchFilter";
|
import { SearchFilter } from "../../my-nav/SearchFilter";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable({providedIn: 'root'})
|
||||||
export class FilterService {
|
export class FilterService {
|
||||||
|
|
||||||
@Output() public onFilterChange = new EventEmitter<SearchFilter>();
|
@Output() public onFilterChange = new EventEmitter<SearchFilter>();
|
||||||
|
|
|
@ -18,17 +18,6 @@ class ProfileTab {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class MobileTab {
|
|
||||||
|
|
||||||
get qrCode(): Cypress.Chainable<any> {
|
|
||||||
return cy.get('#qrCode');
|
|
||||||
}
|
|
||||||
|
|
||||||
get noQrCode(): Cypress.Chainable<any> {
|
|
||||||
return cy.get('#noQrCode');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class SecurityTab {
|
class SecurityTab {
|
||||||
get currentPassword(): Cypress.Chainable<any> {
|
get currentPassword(): Cypress.Chainable<any> {
|
||||||
return cy.get('#currentPassword');
|
return cy.get('#currentPassword');
|
||||||
|
@ -62,23 +51,17 @@ class UserPreferencesPage extends BasePage {
|
||||||
}
|
}
|
||||||
|
|
||||||
get profileTab(): Cypress.Chainable<any> {
|
get profileTab(): Cypress.Chainable<any> {
|
||||||
return cy.get('[role="tab"]').eq(0);
|
return cy.get('#mat-tab-label-0-0');
|
||||||
}
|
}
|
||||||
|
|
||||||
get securityTab(): Cypress.Chainable<any> {
|
get securityTab(): Cypress.Chainable<any> {
|
||||||
return cy.get('[role="tab"]').eq(1);
|
cy.waitUntil(() => {
|
||||||
}
|
return cy.get('#mat-tab-label-0-1').should('be.visible');
|
||||||
|
});
|
||||||
get preferencesTab(): Cypress.Chainable<any> {
|
return cy.get('#mat-tab-label-0-1');
|
||||||
return cy.get('[role="tab"]').eq(2);
|
|
||||||
}
|
|
||||||
|
|
||||||
get mobileTab(): Cypress.Chainable<any> {
|
|
||||||
return cy.get('[role="tab"]').eq(3);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
profile = new ProfileTab();
|
profile = new ProfileTab();
|
||||||
mobile = new MobileTab();
|
|
||||||
security = new SecurityTab();
|
security = new SecurityTab();
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { discoverPage as Page } from "@/integration/page-objects";
|
|
||||||
import { DiscoverType } from "@/integration/page-objects/shared/DiscoverCard";
|
import { DiscoverType } from "@/integration/page-objects/shared/DiscoverCard";
|
||||||
|
import { discoverPage as Page } from "@/integration/page-objects";
|
||||||
|
|
||||||
describe("Discover Cards Requests Tests", () => {
|
describe("Discover Cards Requests Tests", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -288,9 +288,15 @@ describe("Discover Cards Requests Tests", () => {
|
||||||
var expectedId = body[3].id;
|
var expectedId = body[3].id;
|
||||||
var title = body[3].title;
|
var title = body[3].title;
|
||||||
|
|
||||||
|
cy.wait(3000);
|
||||||
|
|
||||||
const card = Page.popularCarousel.getCard(expectedId, false, DiscoverType.Popular);
|
const card = Page.popularCarousel.getCard(expectedId, false, DiscoverType.Popular);
|
||||||
card.title.realHover();
|
card.title.realHover();
|
||||||
|
|
||||||
|
cy.waitUntil(() => {
|
||||||
|
return card.requestButton.should("be.visible");
|
||||||
|
});
|
||||||
|
|
||||||
card.verifyTitle(title);
|
card.verifyTitle(title);
|
||||||
card.requestButton.should("be.visible");
|
card.requestButton.should("be.visible");
|
||||||
card.requestButton.click();
|
card.requestButton.click();
|
||||||
|
@ -335,9 +341,15 @@ describe("Discover Cards Requests Tests", () => {
|
||||||
var expectedId = body[5].id;
|
var expectedId = body[5].id;
|
||||||
var title = body[5].title;
|
var title = body[5].title;
|
||||||
|
|
||||||
|
cy.wait(3000);
|
||||||
|
|
||||||
const card = Page.popularCarousel.getCard(expectedId, false, DiscoverType.Popular);
|
const card = Page.popularCarousel.getCard(expectedId, false, DiscoverType.Popular);
|
||||||
card.title.realHover();
|
card.title.realHover();
|
||||||
|
|
||||||
|
cy.waitUntil(() => {
|
||||||
|
return card.requestButton.should("be.visible");
|
||||||
|
});
|
||||||
|
|
||||||
card.verifyTitle(title);
|
card.verifyTitle(title);
|
||||||
card.requestButton.should("be.visible");
|
card.requestButton.should("be.visible");
|
||||||
card.requestButton.click();
|
card.requestButton.click();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue