Skip to content

Commit 849ad2b

Browse files
committed
Merge branch 'develop' into wip/db/14142-ydoc-websocket
2 parents 11ef7b8 + 17d39b3 commit 849ad2b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+963
-563
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
Table.input components.
88
- [Text widgets have a fixed maximum size in collapsed mode][14775]
99
- [Fixed uploading corrupted projects to the cloud storage][14805]
10+
- [Drive is now a separate panel instead of tab.][14807]
1011
- [Fixed <kbd>Ctrl</kbd>-clicking enso:// links][14820]
1112

1213
[14590]: https://github.com/enso-org/enso/pull/14590
1314
[14678]: https://github.com/enso-org/enso/pull/14678
1415
[14775]: https://github.com/enso-org/enso/pull/14775
1516
[14805]: https://github.com/enso-org/enso/pull/14805
17+
[14807]: https://github.com/enso-org/enso/pull/14807
1618
[14820]: https://github.com/enso-org/enso/pull/14820
1719

1820
#### Enso Standard Library

app/common/src/utilities/uniqueString.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
let counter = Number(new Date()) >>> 2
55

66
/** Returns a new, mostly unique string. */
7-
export function uniqueString(): string {
7+
export function uniqueString(minLength?: number): string {
88
counter += 1
9-
return counter.toString()
9+
return counter.toString().padStart(minLength ?? 0, 'a')
1010
}

app/electron-client/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ export default defineConfig({
1515
},
1616
use: {
1717
actionTimeout: 5000,
18-
viewport: { width: 1380, height: 900 },
18+
viewport: { width: 1780, height: 1000 },
1919
},
2020
})

app/electron-client/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ import { getUrlToOpen, handleOpenUrl, registerAssociations } from './urlAssociat
4848

4949
type Electron = typeof import('electron')
5050

51-
const DEFAULT_WINDOW_WIDTH = 1380
52-
const DEFAULT_WINDOW_HEIGHT = 900
51+
const DEFAULT_WINDOW_WIDTH = 1780
52+
const DEFAULT_WINDOW_HEIGHT = 1000
5353

5454
/** Convert path to proper `file://` URL. */
5555
function pathToURL(path: string): URL {

app/electron-client/tests/electronTest.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,6 @@ export async function closeWelcome(page: Page) {
159159
* @returns Locator for the newest project
160160
*/
161161
export async function getNewestProject(page: Page): Promise<Locator> {
162-
// Returning back to the data catalog
163-
const dataCatalogTab = page.getByRole('tab', { name: 'Data Catalog' })
164-
await dataCatalogTab.click()
165-
166162
await expect(page.getByTestId('drive-view')).toBeVisible({ timeout: LOADING_TIMEOUT })
167163
const projectsLocator = page.getByTestId('drive-view').getByText(/New Project \d+/)
168164
await expect(projectsLocator).not.toHaveCount(0)

app/electron-client/tests/gettingStarted.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ test('Exercise 2', async ({ page }) => {
284284
await visualizeData(page)
285285

286286
// Move cross_tab a bit down for more clearance
287-
const crossTab = page.getByText('cross_tab')
287+
const crossTab = page.getByText('cross_tab', { exact: true })
288288
await crossTab.dragTo(crossTab, { targetPosition: { x: 0, y: 200 }, force: true })
289289
})
290290

app/electron-client/tests/localWorkflow.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ test('Local Workflow', async ({ page, app, projectsDir }) => {
179179
await expect(page.getByTitle('Project Name')).toHaveText('Test Project')
180180

181181
// Check that the name is changed also in drive
182-
await page.getByRole('tab', { name: 'Data Catalog' }).click()
183182
await expect(page.getByTestId('asset-row-name')).toHaveCount(2)
184183
await expect(page.getByTestId('asset-row-name')).toHaveText(['Samples', 'Test Project'])
185184
})

app/gui/integration-test/actions/DrivePageActions.ts

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,6 @@ function locateCategoryButton(page: Page, category: string): Locator {
7272
.getByRole('button', { name: category, exact: true })
7373
}
7474

75-
/** Find an asset panel. */
76-
function locateRightPanel(page: Page) {
77-
// This has no identifying features.
78-
return page.getByTestId('right-panel').locator('visible=true')
79-
}
80-
8175
/** Actions for the "drive" page. */
8276
export default class DrivePageActions<Context = object> extends PageActions<Context> {
8377
/** Actions for navigating to another page. */
@@ -421,27 +415,6 @@ export default class DrivePageActions<Context = object> extends PageActions<Cont
421415
})
422416
}
423417

424-
/** Show the properties tab of the Asset Panel. */
425-
togglePropertiesAssetPanel() {
426-
return this.step('Toggle properties asset panel', async (page) => {
427-
await page.getByRole('tab', { name: 'Properties' }).click()
428-
})
429-
}
430-
431-
/** Show the description tab of the Asset Panel. */
432-
toggleDescriptionAssetPanel() {
433-
return this.step('Toggle description asset panel', async (page) => {
434-
await page.getByRole('tab', { name: 'Description' }).click()
435-
})
436-
}
437-
438-
/** Show the Docs tab of the Asset Panel. */
439-
toggleDocsAssetPanel() {
440-
return this.step('Toggle docs asset panel', async (page) => {
441-
await page.getByRole('tab', { name: 'Documentation' }).click()
442-
})
443-
}
444-
445418
/** Interact with the container element of the assets table. */
446419
withAssetsTable(
447420
callback: (input: Locator, context: Context, page: Page) => Promise<void> | void,
@@ -451,13 +424,6 @@ export default class DrivePageActions<Context = object> extends PageActions<Cont
451424
})
452425
}
453426

454-
/** Interact with the Asset Panel. */
455-
withRightPanel(callback: LocatorCallback<Context>) {
456-
return this.step('Interact with right panel', async (page, context) => {
457-
await callback(locateRightPanel(page), context)
458-
})
459-
}
460-
461427
/** Open the Data Link creation modal by clicking on the Data Link icon. */
462428
openDataLinkModal() {
463429
return this.step('Open "new data link" modal', (page) =>

app/gui/integration-test/actions/EditorPageActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ export default class EditorPageActions<Context = object> extends PageActions<Con
229229
// TODO: Automatically find graph background region that is safe to click,
230230
// or somehow ensure that the dispatched click event performs
231231
// Current value chosen just so it worked for existing tests.
232-
await page.mouse.click(250, 300)
232+
await page.mouse.click(700, 300)
233233
await this.expectNodeCount(0, '.selected')
234234
})
235235
}

app/gui/integration-test/actions/PageActions.ts

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
/** @file Actions common to all pages. */
2-
import BaseActions, { type BaseActionsClass } from './BaseActions'
2+
import { expect, type Page } from 'integration-test/base'
3+
import BaseActions, { type BaseActionsClass, type LocatorCallback } from './BaseActions'
34
import { openUserMenuAction } from './openUserMenuAction'
45
import { userMenuActions } from './userMenuActions'
56

7+
/** Find right panel. */
8+
function locateRightPanel(page: Page) {
9+
// This has no identifying features.
10+
return page.getByTestId('right-panel').locator('visible=true')
11+
}
12+
613
/** Actions common to all pages. */
714
export default class PageActions<
815
Context,
@@ -17,4 +24,39 @@ export default class PageActions<
1724
openUserMenu() {
1825
return openUserMenuAction(this.step.bind(this))
1926
}
27+
28+
/** Show the properties tab of the Right Panel. */
29+
togglePropertiesAssetPanel() {
30+
return this.step('Toggle properties asset panel', async (page) => {
31+
await page.getByRole('tab', { name: 'Properties' }).click()
32+
})
33+
}
34+
35+
/** Show the description tab of the Right Panel. */
36+
toggleDescriptionAssetPanel() {
37+
return this.step('Toggle description asset panel', async (page) => {
38+
await page.getByRole('tab', { name: 'Description' }).click()
39+
})
40+
}
41+
42+
/** Expect Documentation Panel to be visible. */
43+
expectDocsPanel() {
44+
return this.step('Docs panel is opened', async (page) => {
45+
await expect(page.locator('.DocumentationEditor')).toBeVisible()
46+
})
47+
}
48+
49+
/** Show the Docs tab of the Right Panel. */
50+
toggleDocsAssetPanel() {
51+
return this.step('Toggle docs asset panel', async (page) => {
52+
await page.getByRole('tab', { name: 'Documentation' }).click()
53+
})
54+
}
55+
56+
/** Interact with the Right Panel. */
57+
withRightPanel(callback: LocatorCallback<Context>) {
58+
return this.step('Interact with right panel', async (page, context) => {
59+
await callback(locateRightPanel(page), context)
60+
})
61+
}
2062
}

0 commit comments

Comments
 (0)