mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-29 06:36:46 +00:00
test: language verification
Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
This commit is contained in:
committed by
Muhammed Mustafa
parent
3ed244cd42
commit
dc3f150c06
61
scripts/playwright/tests/language.spec.ts
Normal file
61
scripts/playwright/tests/language.spec.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import { test } from "@playwright/test";
|
||||
import { DashboardPage } from "../pages/Dashboard";
|
||||
import setup from "../setup";
|
||||
|
||||
const langMenu = [
|
||||
"help-translate",
|
||||
"ar.json",
|
||||
"bn_IN.json",
|
||||
"da.json",
|
||||
"de.json",
|
||||
"en.json",
|
||||
"es.json",
|
||||
"fa.json",
|
||||
"fi.json",
|
||||
"fr.json",
|
||||
"he.json",
|
||||
"hi.json",
|
||||
"hr.json",
|
||||
"id.json",
|
||||
"it.json",
|
||||
"ja.json",
|
||||
"ko.json",
|
||||
"lv.json",
|
||||
"nl.json",
|
||||
"no.json",
|
||||
"pl.json",
|
||||
"pt.json",
|
||||
"pt_BR.json",
|
||||
"ru.json",
|
||||
"sl.json",
|
||||
"sv.json",
|
||||
"th.json",
|
||||
"tr.json",
|
||||
"uk.json",
|
||||
"vi.json",
|
||||
"zh-Hans.json",
|
||||
"zh-Hant.json",
|
||||
];
|
||||
|
||||
test.describe("Common", () => {
|
||||
let dashboard: DashboardPage;
|
||||
let context: any;
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
context = await setup({ page });
|
||||
dashboard = new DashboardPage(page, context.project);
|
||||
});
|
||||
|
||||
test("Language", async () => {
|
||||
await dashboard.clickHome();
|
||||
|
||||
// Index is the order in which menu options appear
|
||||
for (let i = 1; i < langMenu.length; i++) {
|
||||
// scripts/playwright/tests/language.spec.ts
|
||||
let json = require(`../../../packages/nc-gui/lang/${langMenu[i]}`);
|
||||
await dashboard.openLanguageMenu();
|
||||
await dashboard.selectLanguage({ index: i });
|
||||
await dashboard.verifyLanguage({ json });
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user