mirror of
https://github.com/enso-org/enso.git
synced 2025-01-05 10:09:15 +03:00
cf9d757457
- Fix https://github.com/enso-org/cloud-v2/issues/1383 - Fix file download - both on Electron, and in browser - Refresh versions list when uploading neww file version - Fix app crashing when asset is opened in asset panel while switching to Local Backend - Don't show asset id when asset is opened in asset panel, but user is on the Local backend, resulting in the internal Asset ID being shown - Fix drag-n-drop - ⚠️ `npm run dev` is NOT fixed in this PR - however it should already be fixed in another PR which has already been merged. This needs testing to confirm whether it is fixed though. Other changes: - Add support for "duplicate project" endpoint on Local Backend - Fix downloading project from nested directory on Local Backend (not working) - Refactor more E2E tests to use the "new" architecture - Simplify "new" E2E architecture to minimize boilerplate # Important Notes - When testing downloads, both Electron and browser should be tested as they use completely separate implementations for how files are downloaded.
45 lines
1.4 KiB
TypeScript
45 lines
1.4 KiB
TypeScript
/** @file Actions for going to a different page. */
|
|
import type * as baseActions from './BaseActions'
|
|
import BaseActions from './BaseActions'
|
|
import DrivePageActions from './DrivePageActions'
|
|
import EditorPageActions from './EditorPageActions'
|
|
import SettingsPageActions from './SettingsPageActions'
|
|
|
|
// =======================
|
|
// === GoToPageActions ===
|
|
// =======================
|
|
|
|
/** Actions for going to a different page. */
|
|
export interface GoToPageActions {
|
|
readonly drive: () => DrivePageActions
|
|
readonly editor: () => EditorPageActions
|
|
readonly settings: () => SettingsPageActions
|
|
}
|
|
|
|
// =======================
|
|
// === goToPageActions ===
|
|
// =======================
|
|
|
|
/** Generate actions for going to a different page. */
|
|
export function goToPageActions(
|
|
step: (name: string, callback: baseActions.PageCallback) => BaseActions
|
|
): GoToPageActions {
|
|
return {
|
|
drive: () =>
|
|
step('Go to "Data Catalog" page', page =>
|
|
page
|
|
.getByRole('button')
|
|
.filter({ has: page.getByText('Data Catalog') })
|
|
.click()
|
|
).into(DrivePageActions),
|
|
editor: () =>
|
|
step('Go to "Spatial Analysis" page', page =>
|
|
page.getByTestId('editor-tab-button').click()
|
|
).into(EditorPageActions),
|
|
settings: () =>
|
|
step('Go to "settings" page', page => BaseActions.press(page, 'Mod+,')).into(
|
|
SettingsPageActions
|
|
),
|
|
}
|
|
}
|