enso/app/dashboard/e2e
somebody1234 cad50a5b63
Dashboard fixes (#11059)
- Fix https://github.com/enso-org/cloud-v2/issues/1482
- Fix "clear trash" not doing anything
- Show "shared with" column as "root folder", but only owners (TODO: actually it should only show the first item in the permissions list)
- Fix https://github.com/enso-org/cloud-v2/issues/1480
- Fix importing .enso-projects not doing anything
- Could not repro crash. Also note that we do want to be able to upload files
- Partly address https://github.com/enso-org/cloud-v2/issues/1479
- Remove "invite" and "share" buttons on top right
- Hide "upgrade" button on top right if on Team or Enterprise plan
- Warn when deleting folder (for now warns for all folders otherwise we may need to expand the folder to know whether it is empty)
- Fix importing projects via upload button
- Fix importing projects via drag
- Hide cut on running projects
- Partly address https://github.com/enso-org/cloud-v2/issues/1481
- Fix "edit secret" not showing dialog
- Fix multiple selection context menu in Team space

# Important Notes
None
2024-09-16 09:03:49 +00:00
..
actions Dashboard fixes (#11059) 2024-09-16 09:03:49 +00:00
actions.ts Dashboard fixes (#11059) 2024-09-16 09:03:49 +00:00
api.ts Dashboard fixes (#11059) 2024-09-16 09:03:49 +00:00
assetPanel.spec.ts Require accepting Terms of Service and Privacy Policy when registering (#10772) 2024-08-28 17:51:31 +00:00
assetSearchBar.spec.ts Split ydoc server into separate module (#10735) 2024-08-08 12:12:05 +00:00
assetsTableFeatures.spec.ts Fix test report artifact upload error handling (#10789) 2024-08-12 10:25:18 +00:00
authPreserveEmail.spec.ts Show errors in forms in authentication flow (#10739) 2024-08-13 11:50:07 +00:00
copy.spec.ts Adjust Refresh Interval in Assets table (#10775) 2024-09-04 16:22:50 +00: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 Dashboard fixes (#11059) 2024-09-16 09:03:49 +00:00
driveView.spec.ts Dashboard fixes (#11059) 2024-09-16 09:03:49 +00:00
editAssetName.spec.ts Remove edit name on mod+click (#11058) 2024-09-13 12:51:35 +00:00
labels.spec.ts Show errors in forms in authentication flow (#10739) 2024-08-13 11:50:07 +00:00
labelsPanel.spec.ts Dashboard fixes (#11059) 2024-09-16 09:03:49 +00:00
latestGithubReleases.json Fix flaky dashboard E2E tests (#10773) 2024-08-12 12:55:49 +00:00
loginLogout.spec.ts Require accepting Terms of Service and Privacy Policy when registering (#10772) 2024-08-28 17:51:31 +00:00
loginScreen.spec.ts Require accepting Terms of Service and Privacy Policy when registering (#10772) 2024-08-28 17:51:31 +00:00
membersSettings.spec.ts User & Team spaces (#10477) 2024-08-21 18:10:56 +00:00
organizationSettings.spec.ts Settings improvements (#10924) 2024-09-06 14:29:26 +00:00
pageSwitcher.spec.ts Fix flaky dashboard E2E tests (#10773) 2024-08-12 12:55:49 +00:00
README.md Split ydoc server into separate module (#10735) 2024-08-08 12:12:05 +00:00
signUp.spec.ts Show errors in forms in authentication flow (#10739) 2024-08-13 11:50:07 +00: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 Show errors in forms in authentication flow (#10739) 2024-08-13 11:50:07 +00:00

End-to-end tests

Running tests

Execute all commands from the parent directory.

# Run tests normally
pnpm run test:e2e
# Open UI to run tests
pnpm run test:e2e:debug
# Run tests in a specific file only
pnpm run test:e2e -- e2e/file-name-here.spec.ts
pnpm 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 pnpm run test:e2e
PROD=1 pnpm run test:e2e:debug
PROD=1 pnpm run test:e2e -- e2e/file-name-here.spec.ts
PROD=1 pnpm 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')
      }),
  ),
)