enso/app/ide-desktop/lib/dashboard/e2e
somebody1234 b5641aa3bd
Fix various issues on the Dashboard (#10256)
- Fix React DevTools not working in Firefox
- Fix selection of asset names when editing them, not working at all in Firefox
- Convert tick/cross buttons when editing assets, and the "plus" and "reload" buttons on the "shared with" column, "labels" column, and keyboard shortcuts table, to match more with the rest of the design
- Update clip path when the container resizes, so that the icons for hidden columns never overlap the actual table header
- Fix #10184
- Fix renames being committed even when cancelling
- Fix duplicate name detection - previously, all asset types only checked folders with the same name, not assets with the same name
- I'm not 100% sure this is the correct behavior still
- Stop using `kbd` (`aria.Keyboard`) to display keyboard shortcuts, since they should not be displayed in a monospace font.
- Fix "plus" and "reload" buttons going past the right side of their parent table cell
- Limit length of `PermissionDisplay` - if the username of a user with permission is too long, it uses a tooltip instead
- Update the username dynamically for all permissions owned by self, when changing username in the settings.
- This avoids having to fully invalidate the directory tree every time the username changes, given that nothing changes about the assets' metadata themselves.
- Cache children in the Drive tree
- This avoids loading spinners when closing a folder and immediately reopening it.
- Note that children are still re-fetched on reopen to ensure freshness

# Important Notes
- This MAY be split into multiple smaller PRs. However, I think it's better to QA as a single PR, to avoid duplicating work checking behavior that may be changed by a sibling PR (assuming the PR was split into multiple).
2024-06-20 18:30:24 +00:00
..
actions Refactor E2E tests for Dashboard; add E2E tests for User and Organization settings pages (#10031) 2024-06-20 16:19:01 +00:00
actions.ts Fix various issues on the Dashboard (#10256) 2024-06-20 18:30:24 +00:00
api.ts Refactor E2E tests for Dashboard; add E2E tests for User and Organization settings pages (#10031) 2024-06-20 16:19:01 +00:00
assetPanel.spec.ts Fix various issues on the Dashboard (#10256) 2024-06-20 18:30:24 +00:00
assetSearchBar.spec.ts Keyboard navigation between components (#9499) 2024-04-05 07:21:02 +00:00
assetsTableFeatures.spec.ts Move to the Tab layout for Dashboard (#9918) 2024-06-19 15:24:11 +00:00
copy.spec.ts Refactor E2E tests for Dashboard; add E2E tests for User and Organization settings pages (#10031) 2024-06-20 16:19:01 +00:00
createAsset.spec.ts Refactor E2E tests for Dashboard; add E2E tests for User and Organization settings pages (#10031) 2024-06-20 16:19:01 +00:00
dataLinkEditor.spec.ts Refactor E2E tests for Dashboard; add E2E tests for User and Organization settings pages (#10031) 2024-06-20 16:19:01 +00:00
delete.spec.ts Refactor E2E tests for Dashboard; add E2E tests for User and Organization settings pages (#10031) 2024-06-20 16:19:01 +00:00
driveView.spec.ts Refactor E2E tests for Dashboard; add E2E tests for User and Organization settings pages (#10031) 2024-06-20 16:19:01 +00:00
editAssetName.spec.ts Fix various issues on the Dashboard (#10256) 2024-06-20 18:30:24 +00:00
labels.spec.ts Fix various issues on the Dashboard (#10256) 2024-06-20 18:30:24 +00:00
labelsPanel.spec.ts More E2E tests; export default classes from modules (#8730) 2024-01-31 11:35:41 +00:00
loginLogout.spec.ts Refactor E2E tests for Dashboard; add E2E tests for User and Organization settings pages (#10031) 2024-06-20 16:19:01 +00:00
loginScreen.spec.ts More E2E tests; export default classes from modules (#8730) 2024-01-31 11:35:41 +00:00
membersSettings.spec.ts Refactor E2E tests for Dashboard; add E2E tests for User and Organization settings pages (#10031) 2024-06-20 16:19:01 +00:00
organizationSettings.spec.ts Refactor E2E tests for Dashboard; add E2E tests for User and Organization settings pages (#10031) 2024-06-20 16:19:01 +00:00
pageSwitcher.spec.ts Refactor E2E tests for Dashboard; add E2E tests for User and Organization settings pages (#10031) 2024-06-20 16:19:01 +00:00
README.md Refactor E2E tests for Dashboard; add E2E tests for User and Organization settings pages (#10031) 2024-06-20 16:19:01 +00:00
signUp.spec.ts Refactor E2E tests for Dashboard; add E2E tests for User and Organization settings pages (#10031) 2024-06-20 16:19:01 +00:00
sort.spec.ts Refactor E2E tests for Dashboard; add E2E tests for User and Organization settings pages (#10031) 2024-06-20 16:19:01 +00:00
startModal.spec.ts Refactor E2E tests for Dashboard; add E2E tests for User and Organization settings pages (#10031) 2024-06-20 16:19:01 +00:00
userMenu.spec.ts Refactor E2E tests for Dashboard; add E2E tests for User and Organization settings pages (#10031) 2024-06-20 16:19:01 +00:00
userSettings.spec.ts Refactor E2E tests for Dashboard; add E2E tests for User and Organization settings pages (#10031) 2024-06-20 16:19:01 +00: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.goToHomePage(),
  ),
);

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");
      }),
  ),
);