Skip to content

Commit

Permalink
Remove start modal
Browse files Browse the repository at this point in the history
  • Loading branch information
MrFlashAccount committed Mar 4, 2025
1 parent b7300c9 commit 8b69ce1
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 141 deletions.
15 changes: 0 additions & 15 deletions app/gui/integration-test/dashboard/actions/DrivePageActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import EditorPageActions from './EditorPageActions'
import { goToPageActions, type GoToPageActions } from './goToPageActions'
import NewDataLinkModalActions from './NewDataLinkModalActions'
import PageActions from './PageActions'
import StartModalActions from './StartModalActions'

const ASSET_ROW_SAFE_POSITION = { x: 150, y: 16 }

Expand Down Expand Up @@ -368,20 +367,6 @@ export default class DrivePageActions<Context> extends PageActions<Context> {
}
}

/** Open the "start" modal. */
openStartModal() {
return this.step('Open "start" modal', (page) =>
page.getByText(TEXT.startWithATemplate).click(),
).into(StartModalActions<Context>)
}

/** Expect the "start" modal to be visible. */
expectStartModal() {
return this.into(StartModalActions<Context>).withStartModal(async (startModal) => {
await expect(startModal).toBeVisible()
})
}

/** Clear trash. */
clearTrash() {
return this.step('Clear trash', async (page) => {
Expand Down
61 changes: 0 additions & 61 deletions app/gui/integration-test/dashboard/actions/StartModalActions.ts

This file was deleted.

15 changes: 2 additions & 13 deletions app/gui/integration-test/dashboard/actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
import DrivePageActions from './DrivePageActions'
import LATEST_GITHUB_RELEASES from './latestGithubReleases.json' with { type: 'json' }
import LoginPageActions from './LoginPageActions'
import StartModalActions from './StartModalActions'

/** An example password that does not meet validation requirements. */
export const INVALID_PASSWORD = 'password'
Expand Down Expand Up @@ -156,25 +155,15 @@ export function mockAll({ page, setupAPI }: MockParams) {
})
}

export interface MockAllAndLoginParams extends MockParams {
readonly hideStartModal?: boolean | undefined
}
export interface MockAllAndLoginParams extends MockParams {}

/** Set up all mocks, and log in with dummy credentials. */
export function mockAllAndLogin({ page, setupAPI, hideStartModal = true }: MockAllAndLoginParams) {
export function mockAllAndLogin({ page, setupAPI }: MockAllAndLoginParams) {
const actions = mockAll({ page, setupAPI })

return actions
.step('Login', (page) => login({ page }))
.step('Wait for dashboard to load', waitForDashboardToLoad)
.step('Check if start modal is shown', async (page) => {
if (hideStartModal) {
// @ts-expect-error This is the only place in which the private member `.context`
// should be accessed.
const context = actions.context
await new StartModalActions(page, context).close()
}
})
.into(DrivePageActions<Context>)
}

Expand Down
7 changes: 0 additions & 7 deletions app/gui/integration-test/dashboard/assetPanel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ function locateAssetPanelDescription(page: Page) {
return locateAssetPanel(page).getByTestId('asset-panel-description')
}

/** Find asset permissions in an asset panel. */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function locateAssetPanelPermissions(page: Page) {
// This has no identifying features.
return locateAssetPanel(page).getByTestId('asset-panel-permissions').getByRole('button')
}

/** An example description for the asset selected in the asset panel. */
const DESCRIPTION = 'foo bar'
/** An example owner username for the asset selected in the asset panel. */
Expand Down
2 changes: 0 additions & 2 deletions app/gui/integration-test/dashboard/createAsset.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ test('create folder', ({ page }) =>
test('create project', ({ page }) =>
mockAllAndLogin({ page })
.newEmptyProject()
// FIXME[sb]: https://github.com/enso-org/cloud-v2/issues/1615
// Uncomment once cloud execution in the browser is re-enabled.
.waitForEditorToLoad()
.goToPage.drive()
.driveTable.withRows((rows) => expect(rows).toHaveCount(1)))
Expand Down
5 changes: 0 additions & 5 deletions app/gui/integration-test/dashboard/delete.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ test('clear trash', ({ page }) =>
.clearTrash()
.driveTable.expectTrashPlaceholderRow()
.goToCategory.cloud()
.expectStartModal()
.withStartModal(async (startModal) => {
await expect(startModal).toBeVisible()
})
.close()
.driveTable.withRows(async (rows) => {
await expect(rows).toHaveCount(0)
}))
2 changes: 0 additions & 2 deletions app/gui/integration-test/dashboard/loginLogout.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ test.use({ storageState: { cookies: [], origins: [] } })
test('login and logout', ({ page }) =>
mockAll({ page })
.login()
.expectStartModal()
.close()
.withDriveView(async (driveView) => {
await expect(driveView).toBeVisible()
})
Expand Down
36 changes: 0 additions & 36 deletions app/gui/integration-test/dashboard/startModal.spec.ts

This file was deleted.

0 comments on commit 8b69ce1

Please sign in to comment.