mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 19:21:54 +03:00
d7689b3357
Render markdown image syntax in documentation. Relative URLs are fetched from the project directory; absolute URLs are hotlinked from wherever they point. Syntax and URL resolution: ``` # In New_Project27/src/Main.enso ## Main method docs - Image at `New_Project27/src/image.jpg`: ![Image](image.jpg) - Image at `New_Project27/image.png`: ![Image](../image.png) - Image at `New_Project27/src/image.jpg`: ![Image](/src/image.jpg) - Image at `New_Project27/image.png`: ![Image](/image.png) main = 42 ``` https://github.com/enso-org/enso/assets/1047859/3f873f3f-31b1-44bf-ae3e-2f467f2d546d Closes #10058. # Important Notes Stacked on #10064.
21 lines
758 B
TypeScript
21 lines
758 B
TypeScript
import { expect, test } from 'playwright/test'
|
|
import * as actions from './actions'
|
|
import { CONTROL_KEY } from './keyboard'
|
|
import * as locate from './locate'
|
|
|
|
test('Main method documentation', async ({ page }) => {
|
|
await actions.goToGraph(page)
|
|
|
|
// Documentation panel hotkey opens right-dock.
|
|
await expect(locate.rightDock(page)).not.toBeVisible()
|
|
await page.keyboard.press(`${CONTROL_KEY}+D`)
|
|
await expect(locate.rightDock(page)).toBeVisible()
|
|
|
|
// Right-dock displays main method documentation.
|
|
await expect(locate.lexicalContent(locate.rightDock(page))).toHaveText('The main method')
|
|
|
|
// Documentation hotkey closes right-dock.p
|
|
await page.keyboard.press(`${CONTROL_KEY}+D`)
|
|
await expect(locate.rightDock(page)).not.toBeVisible()
|
|
})
|