Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: small improvements to fix flaky tests #4970

Merged
merged 1 commit into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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