e2e: add tests for translations (#114390)
e2e: add tests for translations
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { FRENCH_FRANCE } from '@grafana/i18n';
|
||||
import { expect, test } from '@grafana/plugin-e2e';
|
||||
|
||||
test.use({ userPreferences: { language: FRENCH_FRANCE } });
|
||||
|
||||
test('should display default translation (en-US)', async ({ panelEditPage }) => {
|
||||
panelEditPage.setVisualization('Grafana E2ETest Panel');
|
||||
|
||||
await expect(panelEditPage.panel.locator.getByText('Text option value:')).toBeVisible();
|
||||
const options = panelEditPage.getCustomOptions('Grafana E2ETest Panel');
|
||||
const showSeriesCounter = options.getSwitch('Show series counter');
|
||||
await expect(showSeriesCounter.locator()).toBeVisible();
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
import { SWEDISH_SWEDEN } from '@grafana/i18n';
|
||||
import { expect, test } from '@grafana/plugin-e2e';
|
||||
|
||||
test.use({ userPreferences: { language: SWEDISH_SWEDEN } });
|
||||
|
||||
test('should display correct translation', async ({ panelEditPage }) => {
|
||||
panelEditPage.setVisualization('Grafana E2ETest Panel');
|
||||
|
||||
await expect(panelEditPage.panel.locator.getByText('Textalternativ värde:')).toBeVisible();
|
||||
const options = panelEditPage.getCustomOptions('Grafana E2ETest Panel');
|
||||
const showSeriesCounter = options.getSwitch('Visa serieräknare');
|
||||
await expect(showSeriesCounter.locator()).toBeVisible();
|
||||
});
|
||||
Reference in New Issue
Block a user