e2e: add tests for translations (#114390)
e2e: add tests for translations
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { FRENCH_FRANCE } from '@grafana/i18n';
|
||||
import { expect, test } from '@grafana/plugin-e2e';
|
||||
import pluginJson from '../../plugin.json';
|
||||
|
||||
test.use({ userPreferences: { language: FRENCH_FRANCE } });
|
||||
|
||||
test('should display default translation (en-US)', async ({ createDataSourceConfigPage }) => {
|
||||
const configPage = await createDataSourceConfigPage({ type: pluginJson.id });
|
||||
|
||||
await expect(configPage.ctx.page.getByLabel('API Key')).toBeVisible();
|
||||
});
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
import { SWEDISH_SWEDEN } from '@grafana/i18n';
|
||||
import { expect, test } from '@grafana/plugin-e2e';
|
||||
import pluginJson from '../../plugin.json';
|
||||
|
||||
test.use({ userPreferences: { language: SWEDISH_SWEDEN } });
|
||||
|
||||
test('should display correct translation', async ({ createDataSourceConfigPage }) => {
|
||||
const configPage = await createDataSourceConfigPage({ type: pluginJson.id });
|
||||
|
||||
await expect(configPage.ctx.page.getByLabel('API-nyckel')).toBeVisible();
|
||||
});
|
||||
Reference in New Issue
Block a user