enso/app/gui/e2e/dashboard
somebody1234 171a95f17a
Multipart upload for large files (#11319)
- Close https://github.com/enso-org/cloud-v2/issues/1492
- Use multiplart upload for large files (>6MB)
- Split file into chunks of *exactly* 10MB (backend currently returns a fixed number of chunks)
- Call "start upload", then upload each chunk to S3 (currently sequentially), then "end upload"
- Files <=6MB (lambda limit) still use the current endpoint

# Important Notes
None
2024-10-21 15:31:29 +00:00
..
actions Fix ESLint errors, add some docs (#11339) 2024-10-21 12:56:39 +00:00
mock Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
api.ts Multipart upload for large files (#11319) 2024-10-21 15:31:29 +00:00
assetPanel.spec.ts Dashboard improvements (8 Oct 2024) (#11268) 2024-10-21 10:30:19 +00:00
assetSearchBar.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
assetsTableFeatures.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
authPreserveEmail.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
copy.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
createAsset.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
dataLinkEditor.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
delete.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
driveView.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
editAssetName.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
labels.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
labelsPanel.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
latestGithubReleases.json Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
loginLogout.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
loginScreen.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
membersSettings.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
organizationSettings.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
pageSwitcher.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
README.md Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
setup.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
signUp.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
sort.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
startModal.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
userMenu.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
userSettings.spec.ts Unify Frontend App (#11287) 2024-10-11 18:23:02 +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')
      }),
  ),
)