-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make language selector also search through the languages' filename su…
…ffixes (using the guesslang attribute) This makes the "cpp" string match C++, and "cs" match C#.
- Loading branch information
Showing
2 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { test, expect } from "@playwright/test"; | ||
import { HeynotePage } from "./test-utils.js"; | ||
|
||
let heynotePage | ||
|
||
test.beforeEach(async ({ page }) => { | ||
heynotePage = new HeynotePage(page) | ||
await heynotePage.goto() | ||
}) | ||
|
||
|
||
test("test language selector search by file ending", async ({ page }) => { | ||
await page.locator("body").press(heynotePage.agnosticKey("Mod+L")) | ||
await page.locator("body").pressSequentially("cpp") | ||
await expect(page.locator("css=.language-selector .items > li.selected")).toHaveText("C++") | ||
}) |