2024-01-31 14:35:41 +03:00
|
|
|
/** @file Test the "change password" modal. */
|
2024-12-12 12:49:58 +03:00
|
|
|
import { expect, test, type Page } from '@playwright/test'
|
2024-01-31 14:35:41 +03:00
|
|
|
|
2024-12-12 12:49:58 +03:00
|
|
|
import { mockAllAndLogin } from './actions'
|
|
|
|
|
|
|
|
/** Find an editor container. */
|
|
|
|
function locateEditor(page: Page) {
|
|
|
|
// Test ID of a placeholder editor component used during testing.
|
|
|
|
return page.locator('.App')
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Find a samples list. */
|
|
|
|
function locateSamplesList(page: Page) {
|
|
|
|
// This has no identifying features.
|
|
|
|
return page.getByTestId('samples')
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Find all samples list. */
|
|
|
|
function locateSamples(page: Page) {
|
|
|
|
// This has no identifying features.
|
|
|
|
return locateSamplesList(page).getByRole('button')
|
|
|
|
}
|
2024-01-31 14:35:41 +03:00
|
|
|
|
2024-12-05 11:28:41 +03:00
|
|
|
// FIXME[sb]: https://github.com/enso-org/cloud-v2/issues/1615
|
2024-12-12 12:49:58 +03:00
|
|
|
// Unskip once cloud execution in the browser is re-enabled.
|
|
|
|
|
|
|
|
test.skip('create project from template', ({ page }) =>
|
|
|
|
mockAllAndLogin({ page })
|
|
|
|
.expectStartModal()
|
|
|
|
.createProjectFromTemplate(0)
|
|
|
|
.do(async (thePage) => {
|
|
|
|
await expect(locateEditor(thePage)).toBeAttached()
|
|
|
|
await expect(locateSamples(page).first()).not.toBeVisible()
|
|
|
|
}))
|