Skip to content

Commit

Permalink
chore: Added an E2E test for the main workflow with german names. Fix…
Browse files Browse the repository at this point in the history
…ed type errors in the city-data tools
  • Loading branch information
FleetAdmiralJakob committed Jan 4, 2024
1 parent 7f66715 commit 5715fb8
Show file tree
Hide file tree
Showing 11 changed files with 570 additions and 196 deletions.
1 change: 0 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const config = {
],
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }]
},
ignorePatterns: ['src/lib/city-data/renamejsonproperties.js', "src/lib/city-data/convert.js", "src/lib/city-data/download.js"]
}

module.exports = config
16 changes: 16 additions & 0 deletions e2e-tests/main-workflow.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,19 @@ test("main workflow", async ({ page }) => {

expect(page.url()).toBe("http://localhost:3000/home");
});

test("main workflow german city name", async ({ page }) => {
await page.goto("http://localhost:3000");

await page.click("a");

await page.waitForURL("**/search");

await page.fill("input[type=text]", "München");
await page.waitForSelector("button[aria-label=München]");
await page.press("input[type=text]", "Enter");

await page.waitForURL("**/home");

expect(page.url()).toBe("http://localhost:3000/home");
});
4 changes: 2 additions & 2 deletions src/lib/city-data/admin1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2485,7 +2485,7 @@
},
{
"code": "CN.21",
"name": "Ningxia Hui Autonomous Region"
"name": "Ningxia"
},
{
"code": "CN.03",
Expand Down Expand Up @@ -7757,7 +7757,7 @@
},
{
"code": "ME.25",
"name": "ME.25"
"name": "Zeta"
},
{
"code": "MG.71",
Expand Down
Loading

0 comments on commit 5715fb8

Please sign in to comment.