enso/app/dashboard/e2e
somebody1234 d9fc3a0fb6
Dashboard improvements (#10715)
- Frontend part of https://github.com/enso-org/cloud-v2/issues/1397
- Show organization details to everyone (behavior unchanged)
- ⚠️ Allow editing only for admins
- ⚠️ Currently there is no backend endpoint to get organization permissions
- Stop (incorrectly) submitting *all* settings inputs twice
- Frontend part of https://github.com/enso-org/cloud-v2/issues/1396
- Fix "remove invitation" sending wrong request
- Stop sending `organizationId` in "create invitation" request
- Not adding `email` autocomplete to `/registration`
- Currently already exists
- but it will need to be revisited after the new sign up flow PR is merged.
- Fix https://github.com/enso-org/cloud-v2/issues/1407
- Fix project open request being sent multiple times
- Address https://github.com/enso-org/enso/issues/10633#issuecomment-2252540802
- Fix path to local projects (previously gave the path to their containing folder

Other fixes:
- Various fixes for autocomplete:
- Fix autocomplete appearance (dropdown is no longer detached from main input)
- Add tooltips for overflowing autocomplete entries
- Add tooltips for overflowing usernames in "manage permissions" modal
- Animate height of "asset search bar" dropdown and "autocomplete" dropdown
- Auto-size names of object keys in Datalink input

Other changes:
- Avoid gap with missing background on right side of tab bar when resizing window due to the clip path being animated
- Add <kbd>Cmd</kbd>+<kbd>W</kbd> and <kbd>Cmd</kbd>+<kbd>Option</kbd>+<kbd>W</kbd> to close tab
- Make <kbd>Escape</kbd> only close tab if it is the Settings tab (a temporary tab)

# Important Notes
None
2024-08-01 11:29:05 +00:00
..
actions Dashboard improvements (#10715) 2024-08-01 11:29:05 +00:00
actions.ts Dashboard improvements (#10715) 2024-08-01 11:29:05 +00:00
api.ts Dashboard improvements (#10715) 2024-08-01 11:29:05 +00:00
assetPanel.spec.ts Format TS code (#10648) 2024-07-26 17:47:59 +10:00
assetSearchBar.spec.ts Format TS code (#10648) 2024-07-26 17:47:59 +10:00
assetsTableFeatures.spec.ts Format TS code (#10648) 2024-07-26 17:47:59 +10:00
copy.spec.ts Format TS code (#10648) 2024-07-26 17:47:59 +10:00
createAsset.spec.ts Format TS code (#10648) 2024-07-26 17:47:59 +10:00
dataLinkEditor.spec.ts Format TS code (#10648) 2024-07-26 17:47:59 +10:00
delete.spec.ts Format TS code (#10648) 2024-07-26 17:47:59 +10:00
driveView.spec.ts Format TS code (#10648) 2024-07-26 17:47:59 +10:00
editAssetName.spec.ts Inline modules in app/ide-desktop/ (#10305) 2024-07-17 09:10:42 +00:00
labels.spec.ts Format TS code (#10648) 2024-07-26 17:47:59 +10:00
labelsPanel.spec.ts Inline modules in app/ide-desktop/ (#10305) 2024-07-17 09:10:42 +00:00
loginLogout.spec.ts Format TS code (#10648) 2024-07-26 17:47:59 +10:00
loginScreen.spec.ts Format TS code (#10648) 2024-07-26 17:47:59 +10:00
membersSettings.spec.ts Inline modules in app/ide-desktop/ (#10305) 2024-07-17 09:10:42 +00:00
organizationSettings.spec.ts Inline modules in app/ide-desktop/ (#10305) 2024-07-17 09:10:42 +00:00
pageSwitcher.spec.ts Format TS code (#10648) 2024-07-26 17:47:59 +10:00
README.md Format TS code (#10648) 2024-07-26 17:47:59 +10:00
sort.spec.ts Format TS code (#10648) 2024-07-26 17:47:59 +10:00
startModal.spec.ts Format TS code (#10648) 2024-07-26 17:47:59 +10:00
userMenu.spec.ts Format TS code (#10648) 2024-07-26 17:47:59 +10:00
userSettings.spec.ts Format TS code (#10648) 2024-07-26 17:47:59 +10:00

End-to-end tests

Running tests

Execute all commands from the parent directory.

# Run tests normally
npm run test:e2e
# Open UI to run tests
npm run test:e2e:debug
# Run tests in a specific file only
npm run test:e2e -- e2e/file-name-here.spec.ts
npm run test:e2e:debug -- e2e/file-name-here.spec.ts
# Compile the entire app before running the tests.
# DOES NOT hot reload the tests.
# Prefer not using this when you are trying to fix a test;
# prefer using this when you just want to know which tests are failing (if any).
PROD=1 npm run test:e2e
PROD=1 npm run test:e2e:debug
PROD=1 npm run test:e2e -- e2e/file-name-here.spec.ts
PROD=1 npm run test:e2e:debug -- e2e/file-name-here.spec.ts

Getting started

test.test('test name here', ({ page }) =>
  actions.mockAllAndLogin({ page }).then(
    // ONLY chain methods from `pageActions`.
    // Using methods not in `pageActions` is UNDEFINED BEHAVIOR.
    // If it is absolutely necessary though, please remember to `await` the method chain.
    // Note that the `async`/`await` pair is REQUIRED, as `Actions` subclasses are `PromiseLike`s,
    // not `Promise`s, which causes Playwright to output a type error.
    async ({ pageActions }) => await pageActions.goTo.drive(),
  ),
)

Perform arbitrary actions (e.g. actions on the API)

test.test('test name here', ({ page }) =>
  actions.mockAllAndLogin({ page }).then(
    async ({ pageActions, api }) =>
      await pageActions.do(() => {
        api.foo()
        api.bar()
        test.expect(api.baz()?.quux).toEqual('bar')
      }),
  ),
)