summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gui/src/renderer/components/TunnelControl.tsx4
-rw-r--r--gui/test/e2e/installed/state-dependent/location.spec.ts6
-rw-r--r--gui/test/e2e/utils.ts2
3 files changed, 4 insertions, 8 deletions
diff --git a/gui/src/renderer/components/TunnelControl.tsx b/gui/src/renderer/components/TunnelControl.tsx
index c9fd568a3f..7d12888081 100644
--- a/gui/src/renderer/components/TunnelControl.tsx
+++ b/gui/src/renderer/components/TunnelControl.tsx
@@ -221,7 +221,7 @@ export default class TunnelControl extends React.Component<ITunnelControlProps>
const city = this.props.city === undefined ? '' : relayLocations.gettext(this.props.city);
return (
<LocationRow>
- <StyledMarquee data-test-id="city">{city}</StyledMarquee>
+ <StyledMarquee data-testid="city">{city}</StyledMarquee>
</LocationRow>
);
}
@@ -231,7 +231,7 @@ export default class TunnelControl extends React.Component<ITunnelControlProps>
this.props.country === undefined ? '' : relayLocations.gettext(this.props.country);
return (
<LocationRow>
- <StyledMarquee data-test-id="country">{country}</StyledMarquee>
+ <StyledMarquee data-testid="country">{country}</StyledMarquee>
</LocationRow>
);
}
diff --git a/gui/test/e2e/installed/state-dependent/location.spec.ts b/gui/test/e2e/installed/state-dependent/location.spec.ts
index e57a8d94ed..605e766883 100644
--- a/gui/test/e2e/installed/state-dependent/location.spec.ts
+++ b/gui/test/e2e/installed/state-dependent/location.spec.ts
@@ -1,13 +1,11 @@
import { expect, test } from '@playwright/test';
import { Page } from 'playwright';
-import { TestUtils } from '../../utils';
import { startInstalledApp } from '../installed-utils';
// This test expects the daemon to be logged into an account that has time left.
let page: Page;
-let util: TestUtils;
test.beforeAll(async () => {
({ page, util } = await startInstalledApp());
@@ -18,10 +16,10 @@ test.afterAll(async () => {
});
test('App should have a country', async () => {
- const countryLabel = util.getByTestId('country');
+ const countryLabel = page.getByTestId('country');
await expect(countryLabel).not.toBeEmpty();
- const cityLabel = util.getByTestId('city');
+ const cityLabel = page.getByTestId('city');
const noCityLabel = await cityLabel.count() === 0;
expect(noCityLabel).toBeTruthy();
});
diff --git a/gui/test/e2e/utils.ts b/gui/test/e2e/utils.ts
index 197eadd818..499c634629 100644
--- a/gui/test/e2e/utils.ts
+++ b/gui/test/e2e/utils.ts
@@ -7,7 +7,6 @@ export interface StartAppResponse {
}
export interface TestUtils {
- getByTestId: (id: string) => Locator;
currentRoute: () => Promise<void>;
nextRoute: () => Promise<string>;
}
@@ -27,7 +26,6 @@ export const startApp = async (options: LaunchOptions): Promise<StartAppResponse
page.on('console', (msg) => console.log(msg.text()));
const util: TestUtils = {
- getByTestId: (id: string) => page.locator(`data-test-id=${id}`),
currentRoute: currentRouteFactory(app),
nextRoute: nextRouteFactory(app),
};