enso/app/gui2/e2e/graphNodeVisualization.spec.ts
somebody1234 9b7e3d0f16
E2E tests (#8239)
- Closes #8179

# Important Notes
- ⚠️ These tests are currently *not run* on any CI workflow.
- There is some unused code for mocking the PM. This has been intentionally kept, as this may be useful in the future.
Note that this may be useful for testing the dashboard, however the dashboard is currently only tested in cloud mode
- that is, without the backend switcher, and with only the remote backend available. As such, currently it uses HTTP API mocks, and no PM mock.
2023-11-27 15:48:37 +00:00

19 lines
813 B
TypeScript

import { expect, test } from '@playwright/test'
import * as actions from './actions'
import * as customExpect from './customExpect'
import * as locate from './locate'
test('node can open and load visualization', async ({ page }) => {
await actions.goToGraph(page)
const node = locate.graphNode(page).last()
await node.click({ position: { x: 8, y: 8 } })
await customExpect.toExist(locate.circularMenu(page))
await locate.toggleVisualizationButton(page).click()
await customExpect.toExist(locate.anyVisualization(page))
await locate.showVisualizationSelectorButton(page).click()
await page.getByText('JSON').click()
await customExpect.toExist(locate.jsonVisualization(page))
// The default JSON viz data contains an object.
await expect(locate.jsonVisualization(page)).toContainText('{')
})