mirror of
https://github.com/heyman/heynote.git
synced 2025-08-11 23:49:14 +02:00
Make language selector also search through the languages' filename suffixes (using the guesslang attribute)
This makes the "cpp" string match C++, and "cs" match C#.
This commit is contained in:
16
tests/language-selector.spec.js
Normal file
16
tests/language-selector.spec.js
Normal file
@ -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++")
|
||||
})
|
Reference in New Issue
Block a user