Skip to content

Commit

Permalink
small improvements to fix flaky tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tidusjar committed Jun 20, 2023
1 parent 6025c5e commit 9fa1a48
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export class UserPreferenceComponent implements OnInit {
if (user.name) {
this.username = user.name;
}

this.selectedLang = this.translate.currentLang;

const accessToken = await this.identityService.getAccessToken().toPromise();
Expand Down Expand Up @@ -86,8 +85,10 @@ export class UserPreferenceComponent implements OnInit {
}

public languageSelected() {
this.identityService.updateLanguage(this.selectedLang).subscribe(x => this.notification.success(this.translate.instant("UserPreferences.Updated")));
this.translate.use(this.selectedLang);
this.identityService.updateLanguage(this.selectedLang).subscribe(_ => {
this.notification.success(this.translate.instant("UserPreferences.Updated"))
this.translate.use(this.selectedLang);
});
}

public countrySelected() {
Expand Down
3 changes: 3 additions & 0 deletions tests/cypress/tests/details/tv/tvdetails-buttons.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ describe("TV Details Buttons", () => {
cy.visit("/details/tv/1399");

cy.wait('@issuesEnabled');
cy.waitUntil(() => {
return Page.reportIssueButton.should("be.visible");
});
Page.reportIssueButton.should('be.visible');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ describe("Discover Recently Requested Tests", () => {
});
});

it.only("Approve Requested Tv Show", () => {
it("Approve Requested Tv Show", () => {

cy.requestAllTv(71712);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ langs.forEach((l) => {

Page.profile.languageSelectBox.click();
Page.profile.languageSelectBoxOption(l.code).click();

Page.navbar.discover.contains(l.discover);

cy.wait('@langSave').then((intercept) => {
Expand Down

0 comments on commit 9fa1a48

Please sign in to comment.