mirror of
https://github.com/coder/code-server.git
synced 2025-07-24 10:08:20 +08:00

* Update Code to 1.94.2 * Convert from yarn to npm This is to match VS Code. We were already partially using npm for the releases so this is some nice alignment. * Update caniuse-lite This was complaining on every unit test. * Update eslint I was having a bunch of dependency conflicts and eslint seemed to be the culprit so I just removed it and set it up again, since it seems things have changed quite a bit. * Update test dependencies I was getting oom when running the unit tests...updating seems to work. * Remove package.json `scripts` property in release The new pre-install script was being included, which is dev-only. This was always the intent; did not realize jq's merge was recursive. * Remove jest and devDependencies in release as well * Update test extension dependencies This appears to be conflicting with the root dependencies. * Fix playwright exec npm does not let you run binaries like yarn does, as far as I know. * Fix import of server-main.js * Fix several tests by waiting for selectors
26 lines
953 B
TypeScript
26 lines
953 B
TypeScript
import { promises as fs } from "fs"
|
|
import * as path from "path"
|
|
import { describe, test, expect } from "./baseFixture"
|
|
|
|
describe("Webviews", ["--disable-workspace-trust"], {}, () => {
|
|
test("should preview a Markdown file", async ({ codeServerPage }) => {
|
|
// Create Markdown file
|
|
const heading = "Hello world"
|
|
const dir = await codeServerPage.workspaceDir
|
|
const file = path.join(dir, "text.md")
|
|
await fs.writeFile(file, `# ${heading}`)
|
|
await codeServerPage.openFile(file)
|
|
|
|
// Open Preview
|
|
await codeServerPage.executeCommandViaMenus("Markdown: Open Preview to the Side")
|
|
// Wait for the iframe to open and load
|
|
await codeServerPage.waitForTab(`Preview ${file}`)
|
|
|
|
// It's an iframe within an iframe
|
|
// so we have to do .frameLocator twice
|
|
await expect(
|
|
codeServerPage.page.frameLocator("iframe.webview.ready").frameLocator("#active-frame").getByText("Hello world"),
|
|
).toBeVisible()
|
|
})
|
|
})
|