mirror of
https://github.com/enso-org/enso.git
synced 2025-01-03 09:03:57 +03:00
ebf4cd5c1f
- Remove unnecessary modules - Remove `ts-plugin-namespace-auto-import` as it was a workaround to use the non-conventional `import *` convention - Remove `esbuild-plugin-copy-directories` as it is unuse - Inline modules that are only ever used once - Inline `project-manager-shim` into `gui2` - it is only used during `gui2`'s dev mode - Inline `content-config` into `client` - Flatten `app/ide-desktop/lib/` to `app/ide-desktop/` - Flatten `app/ide-desktop/lib/dashboard/` to `app/dashboard/` # Important Notes - As mentioned above, all remaining modules have been moved up from `app/ide-desktop/lib/` to `app/ide-desktop/`. It's not ideal but I'd rather hold off on moving them anywhere else before we have a consensus on what should go where. - (That is to say, this may not be the final directory structure - but I figure it's fine to get *something* done so that hopefully the rest of the restructuring is simpler.)
38 lines
1.3 KiB
TypeScript
38 lines
1.3 KiB
TypeScript
/** @file Actions for a "new Data Link" modal. */
|
|
import type * as test from 'playwright/test'
|
|
|
|
import type * as baseActions from './BaseActions'
|
|
import BaseActions from './BaseActions'
|
|
import DrivePageActions from './DrivePageActions'
|
|
|
|
// ==============================
|
|
// === locateNewDataLinkModal ===
|
|
// ==============================
|
|
|
|
/** Locate the "new data link" modal. */
|
|
function locateNewDataLinkModal(page: test.Page) {
|
|
return page.getByRole('heading').and(page.getByText('Create Datalink')).locator('..')
|
|
}
|
|
|
|
// ===============================
|
|
// === NewDataLinkModalActions ===
|
|
// ===============================
|
|
|
|
/** Actions for a "new Data Link" modal. */
|
|
export default class NewDataLinkModalActions extends BaseActions {
|
|
/** Cancel creating the new Data Link (don't submit the form). */
|
|
cancel() {
|
|
return this.step('Cancel out of "new data link" modal', async () => {
|
|
await this.press('Escape')
|
|
}).into(DrivePageActions)
|
|
}
|
|
|
|
/** Interact with the "name" input - for example, to set the name using `.fill("")`. */
|
|
withNameInput(callback: baseActions.LocatorCallback) {
|
|
return this.step('Interact with "name" input', async page => {
|
|
const locator = locateNewDataLinkModal(page).getByLabel('Name')
|
|
await callback(locator)
|
|
})
|
|
}
|
|
}
|