Merge pull request #4341 from Ombi-app/fix-automation

Fix automation 🤖
angular-upgrade-proxy
Jamie 3 years ago committed by GitHub
commit 9f3ab48de6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -19,7 +19,6 @@ import { CookieService } from "ng2-cookies";
import { CustomPageComponent } from "./custompage/custompage.component";
import { DataViewModule } from "primeng/dataview";
import { DialogModule } from "primeng/dialog";
import { FilterService } from "./discover/services/filter-service";
import { JwtModule } from "@auth0/angular-jwt";
import { LandingPageComponent } from "./landingpage/landingpage.component";
import { LandingPageService } from "./services";
@ -222,7 +221,6 @@ export function JwtTokenGetter() {
MessageService,
StorageService,
RequestService,
FilterService,
SignalRNotificationService,
{
provide: APP_BASE_HREF,

@ -55,18 +55,17 @@ export class DiscoverSearchResultsComponent implements OnInit {
public async ngOnInit() {
this.isAdmin = this.authService.isAdmin();
if (this.advancedDataService) {
return;
}
this.loadingFlag = true;
this.filterService.onFilterChange.subscribe(async x => {
if (!isEqual(this.filter, x)) {
this.filter = { ...x };
await this.search();
}
});
if (this.advancedDataService) {
return;
}
this.loadingFlag = true;
}
public async init() {

@ -1,7 +1,8 @@
import { EventEmitter, Injectable, Output } from "@angular/core";
import { SearchFilter } from "../../my-nav/SearchFilter";
@Injectable()
@Injectable({providedIn: 'root'})
export class FilterService {
@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 {
get currentPassword(): Cypress.Chainable<any> {
return cy.get('#currentPassword');
@ -62,23 +51,17 @@ class UserPreferencesPage extends BasePage {
}
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> {
return cy.get('[role="tab"]').eq(1);
}
get preferencesTab(): Cypress.Chainable<any> {
return cy.get('[role="tab"]').eq(2);
}
get mobileTab(): Cypress.Chainable<any> {
return cy.get('[role="tab"]').eq(3);
cy.waitUntil(() => {
return cy.get('#mat-tab-label-0-1').should('be.visible');
});
return cy.get('#mat-tab-label-0-1');
}
profile = new ProfileTab();
mobile = new MobileTab();
security = new SecurityTab();
constructor() {

@ -1,5 +1,5 @@
import { discoverPage as Page } from "@/integration/page-objects";
import { DiscoverType } from "@/integration/page-objects/shared/DiscoverCard";
import { discoverPage as Page } from "@/integration/page-objects";
describe("Discover Cards Requests Tests", () => {
beforeEach(() => {
@ -288,9 +288,15 @@ describe("Discover Cards Requests Tests", () => {
var expectedId = body[3].id;
var title = body[3].title;
cy.wait(3000);
const card = Page.popularCarousel.getCard(expectedId, false, DiscoverType.Popular);
card.title.realHover();
cy.waitUntil(() => {
return card.requestButton.should("be.visible");
});
card.verifyTitle(title);
card.requestButton.should("be.visible");
card.requestButton.click();
@ -335,9 +341,15 @@ describe("Discover Cards Requests Tests", () => {
var expectedId = body[5].id;
var title = body[5].title;
cy.wait(3000);
const card = Page.popularCarousel.getCard(expectedId, false, DiscoverType.Popular);
card.title.realHover();
cy.waitUntil(() => {
return card.requestButton.should("be.visible");
});
card.verifyTitle(title);
card.requestButton.should("be.visible");
card.requestButton.click();

Loading…
Cancel
Save