From ec852b4c6688859faea65e13882835ce5f92b4ff Mon Sep 17 00:00:00 2001 From: Sampo Tawast Date: Thu, 19 Dec 2024 12:07:30 +0200 Subject: [PATCH] chore: lint header --- .../shared/browser-tests/page-models/Header.ts | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/frontend/shared/browser-tests/page-models/Header.ts b/frontend/shared/browser-tests/page-models/Header.ts index 2077cc2369..ca855715e1 100644 --- a/frontend/shared/browser-tests/page-models/Header.ts +++ b/frontend/shared/browser-tests/page-models/Header.ts @@ -1,9 +1,7 @@ import { Selector, t } from 'testcafe'; import TranslationsApi from '../../src/__tests__/types/translations'; -import isRealIntegrationsEnabled from '../../src/flags/is-real-integrations-enabled'; import { Language } from '../../src/i18n/i18n'; -import User from '../../src/types/user'; import TranslatedComponent, { CommonTranslations } from './TranslatedComponent'; class Header< @@ -15,15 +13,10 @@ class Header< } private withinNavigationActions = this.within( + // eslint-disable-next-line no-secrets/no-secrets Selector('div[class*="HeaderActionBar-module_headerActions"]') ); - private getUserInfo(user?: User): string { - return `${ - isRealIntegrationsEnabled() ? 'Mika Hietanen' : user?.name ?? '' - }`; - } - private headerTitle(): Selector { return this.within(this.component.findByRole('banner')) .findAllByText(this.translations.appName) @@ -47,6 +40,7 @@ class Header< }); } + // eslint-disable-next-line class-methods-use-this private userInfoDropdown(): Selector { return Selector('button').withAttribute( 'aria-controls', @@ -60,7 +54,7 @@ class Header< }); } - public userIsLoggedIn(user?: User): Promise { + public userIsLoggedIn(): Promise { return this.expect(this.userInfoDropdown()); } @@ -76,7 +70,7 @@ class Header< return t.click(this.loginButton()); } - public async clickLogoutButton(user?: User): Promise { + public async clickLogoutButton(): Promise { return t.click(this.userInfoDropdown()).click(this.logoutButton()); } }