Commit Graph

57 Commits

Author SHA1 Message Date
Erik Pasternak
1e40641f45 Fix formatting 2025-07-08 14:35:28 -07:00
Erik Pasternak
274891d34e Responses to comments
- Switch to using scrollBoundsIntoView instead of scrolling the flyout
- Use webdriverio Key.Escape instead of the string code for it
2025-07-08 14:27:50 -07:00
Erik Pasternak
b890e32bf9 Re-enable undo/redo tests now that focus is working 2025-07-07 11:48:55 -07:00
Erik Pasternak
ce3e251441 Disable test to drag all blocks out and fix comment resize test 2025-06-27 15:25:46 -07:00
Erik Pasternak
3d6ac549a9 Fix procedure tests 2025-06-27 15:25:46 -07:00
Erik Pasternak
77543d3c18 Fix tests for opening categories 2025-06-27 15:25:45 -07:00
Erik Pasternak
51bfadba11 Remove .only 2025-06-27 15:25:45 -07:00
Erik Pasternak
9b18a9b75a Work on fixing more browser tests 2025-06-27 15:25:44 -07:00
RoboErikG
361b453f17 fix: Fix browser tests PART 1 (#9064)
* Move block into view before clicking

* fix right click test failures

* Fix drag three blocks test

dragAndDrop is relative to the start and the test window is very small.

* Fix a few more tests

- Switch to using clickBlock instead of getting the block and clicking it
- Update drag positions for some tests so they don't snap and change size

* Add a pause between right clicking a block and waiting for the menu

* Fix mutator test by finding the dragged out elseif block

* Make disable test less flakey
2025-05-19 14:25:55 -07:00
Aaron Dodson
7a23c8878f fix: Actually fix the browser tests. (#8736) 2025-01-16 11:02:49 -08:00
Aaron Dodson
a86ba15154 fix: Fix the browser tests. (#8735) 2025-01-16 10:37:24 -08:00
Aaron Dodson
5870c66cf0 chore: Migrate ESLint configuration file to new flat format. (#8675)
* chore: rename .eslintrc.js to eslint.config.js

* chore: Rename eslint.config.js to eslint.config.mjs.

* refactor: Migrate ESLint config to new flat format.

* chore: Remove old per-directory and global ignore ESLint config files.

* fix: Allowlist JSDoc tag aliases.

* fix: Don't require @license in tests/*.

* fix: Add NodeJS globals to several files that run under Node.

* chore: Remove now-unneeded ESLint directives in core.

* chore: Remove invalid/unneeded ESLint directives.

* fix: Fix invalid use of `await` outside of an `async` function.

* fix: Improve screenshot error message.

* fix: Update ESLint config file to not warn on existing violations.

* chore: Remove suppressions of rules that weren't triggering.

* chore: Fix package-lock.json.
2024-12-03 12:40:48 -08:00
Christopher Allen
ce22f42868 chore: Organise imports (#8527)
* chore(deps): Add pretter-plugin-organize-imports

* chore: Remove insignificant blank lines in import sections

  Since prettier-plugin-organize-imports sorts imports within
  sections separated by blank lines, but preserves the section
  divisions, remove any blank lines that are not dividing imports
  into meaningful sections.

  Do not remove blank lines separating side-effect-only imports
  from main imports.

* chore: Remove unneded eslint-disable directives

* chore: Organise imports
2024-08-15 03:16:14 +01:00
abhinavjha0239
ec8f9c8589 chore: removed the whole Drag category from the browser test (#8478)
* fix: removed the whole Drag category from the blocks

* fix: added comment according to reviewer

* fix: added comment according to reviewer

* fix: added comment according to reviewer
2024-08-14 11:17:28 -07:00
John Nesky
cd31edbd9a fix: Update dev-tools and remove toolbox category tests Colour and Angles. (#8457) 2024-08-05 12:02:58 -07:00
dependabot[bot]
bfb5b1dd49 chore(deps): Bump chai from 4.3.10 to 5.1.1 (#8092)
* chore(deps): Bump chai from 4.3.10 to 5.1.1

  Bumps [chai](https://github.com/chaijs/chai) from 4.3.10 to 5.1.1.
  - [Release notes](https://github.com/chaijs/chai/releases)
  - [Changelog](https://github.com/chaijs/chai/blob/main/History.md)
  - [Commits](https://github.com/chaijs/chai/compare/v4.3.10...v5.1.1)

  ---
  updated-dependencies:
  - dependency-name: chai
    dependency-type: direct:development
    update-type: version-update:semver-major
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

* fix(tests): Migrate all usage of chai to ESM (#8216)

* fix(tests): Migrate node tests from CJS to ESM

  This allows us to import (rather than require) chai, fixing failures
  caused by that package dropping suppport for CJS in chai v5.0.0.

* fix(tests): Have mocha tests directly import chai

  Previously they relied on obtaining it from the global scope, but it's
  better if imports are explicit.

* fix(tests): Remove broken load of chai as script

  Chai v5.0.0 no longer supports being loaded as a script, so this did
  nothing but emit an syntax error message on the console.

* fix(tests): Migrate browser tests from CJS to ESM

  This allows us to import (rather than require) chai, fixing failures
  caused by chai no longer supporting CJS.

* chore(tests): format

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Christopher Allen <cpcallen+git@google.com>
2024-06-17 16:48:21 +01:00
Sampada Bhujel
260bc6f678 feat(tests): Browser test helper to get workspace svg root (#8166)
* feat: Add helper to get the svg root of workspace to be clicked on

* feat: Add helper to get the mutator svg root to be clicked on

* fix: fix style format issue
2024-05-23 15:52:00 +01:00
Beka Westberg
d6744758f8 chore: add webdriver tests for workspace comments (#7954)
* chore: add collapse and uncollapse tests

* chore: add typing test

* chore: add resizing test

* chore: add delete tests

* chore: add better assertion messages

* chore: copyright year
2024-04-05 16:18:01 +00:00
Rachel Fenichel
b22656b636 chore(deps): update webdriverio to 8.16 and stop using selenium-standalone 2023-09-18 11:49:12 -07:00
Rachel Fenichel
cc3c0d9bdf fix: minor issues in browser tests 2023-09-14 14:01:31 -07:00
Rachel Fenichel
67f42f017a chore(tests): rewrite getClickableBlockElement as clickBlock 2023-09-13 12:36:39 -07:00
Rachel Fenichel
5ee26c9051 feat: use block instead of block ID in getClickableBlockElement 2023-09-13 11:30:46 -07:00
Rachel Fenichel
cad3d4b10c chore(tests): format 2023-09-12 15:13:43 -07:00
Rachel Fenichel
8d6eb80290 chore(tests): use new helper function in delete tests 2023-09-12 14:50:05 -07:00
Rachel Fenichel
6a920a87cc fix(tests): use new helper function for right-clicks 2023-09-12 14:45:08 -07:00
Rachel Fenichel
1f5dc25b3c fix(tests): use new helper function for right-clicks 2023-09-12 14:43:31 -07:00
Rachel Fenichel
6d63f3cc6b feat(tests): add helper to get a clickable element on a block 2023-09-12 14:30:11 -07:00
Beka Westberg
8193cffe77 chore: clean up mutator tests (#7434)
* chore: work on cleaning up mutator tests

* chore: remove need for dragBlockSelector

* chore: add helpers to clean up tests

* chore: add issue link in TODO

* chore: format and add docs for new helpers

* Revert "chore: remove need for dragBlockSelector"

This reverts commit dfec88a6aa.

* chore: fixup connect helper
2023-08-28 22:01:10 +00:00
Rachel Fenichel
a38340bfdf chore(tests): set browser pause time in one place and enable toolbox tests (#7402)
* chore(tests): add a PAUSE_TIME constant for all test pauses

* chore(tests): respond to PR feedback
2023-08-18 17:13:32 -07:00
Rachel Fenichel
d32a13cf3f fix(tests): wait for the workspace to render before starting test actions (#7399) 2023-08-16 14:30:05 -07:00
Rachel Fenichel
8241fca23f chore(tests): cleanup and toolbox drag tests (#7350)
* chore(tests): use helpers for the basic drag test in the playground

* chore(tests): miscellaneous test cleanup

* chore: format

* feat(tests): add test that drags out every block from the toolbox

* feat(tests): add RTL version of toolbox drag tests

* chore: lint

* chore(tests): respond to PR feedback
2023-08-03 00:31:51 +00:00
Maribeth Bottorff
18e0d530e2 chore(tests): fix delete tests (#7351)
* fix(tests): context menu delete test

* fix(tests): try increasing pause length after keys
2023-08-02 10:10:18 -07:00
Christopher Allen
889310726e fix(tests): Make .mocharc.js CWD-independent (#7329)
Move tests/browser/test/.mocharc.js to tests/browser and use
__dirname to make the require directive work regardless of where
mocha is invoked from.

Simplify the browser:test script accordingly, taking advantage
also of the mocha default of running all tests in the test/
subdirectory.
2023-07-31 08:54:19 +01:00
Maribeth Bottorff
1fe82b2354 chore(tests): fix disable block tests (#7330)
* chore(tests): fix disable block tests

* chore: add comment
2023-07-28 09:42:28 -07:00
Maribeth Bottorff
9dc293b762 chore(tests): add basic delete tests (#7285)
* chore(tests): add basic delete tests

* chore: fixes from rebase, comments, and format
2023-07-27 17:12:13 -07:00
ericblackmonGoogle
5151889f13 chore: create test for mutator (#7278)
* chore: create mutator test

* chore: create test for undo block movements and editing a field

* chore: create test for mutator

* chore: creating test for mutator

* chore: create test for undo block movements and editing a field

* chore: create mutator test

* chore: create mutator test

* chore: create mutator test

* chore: create mutator test

* chore: create mutator test
2023-07-27 11:34:42 -04:00
Maribeth Bottorff
734b687f40 chore(tests): Update RTL tests and misc improvements to helpers (#7293)
* chore(tests): make switch to rtl wait before continuing

* chore: use browser.pause

* chore: fix documentation

* chore: format

* fix: missing await
2023-07-27 01:03:42 +00:00
Rachel Fenichel
b5911c25de chore(tests): use a shared chrome instance for all browser tests (#7328)
* chore(tests): use a shared chrome instance for all browser tests

* chore: format

* chore: lint
2023-07-25 16:41:05 +00:00
dependabot[bot]
2546b01d70 chore(deps): Bump prettier from 2.8.8 to 3.0.0 (#7322)
* chore(deps): Bump prettier from 2.8.8 to 3.0.0

Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.0.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.0.0)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: Reformat using Prettier v3.0 defaults

The main change is to add trailing commas to the last line of
block-formatted function calls.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Christopher Allen <cpcallen+git@google.com>
2023-07-25 14:56:10 +00:00
Rachel Fenichel
c61da55566 fix(tests): fix broken browser tests (#7324)
* fix(tests):broken browser tests

* chore: format

* chore(tests): flip assertion order
2023-07-24 22:10:00 +00:00
Neil Fraser
06ba992206 feat: Allow dragging from simple toolbox (#7301)
fix: Add delay after block connection.  Otherwise it can randomly and silently fail.
2023-07-18 19:36:20 +02:00
Beka Westberg
abb82a2f91 chore: add tests for disabling blocks (#7279)
* chore: add tests for disabling blocks

* chore: update asserts to be one line

* fix: test setup
2023-07-17 13:28:03 -07:00
Christopher Allen
82a775a982 test: Basic Blocks: verify drag blocks works properly (#7291)
* refactor(tests): Have testSetup accept a URL

  Have testSetup accept a URL.  Make testFileLocations a dictionary
  whose values are URLs, and change the spellings of the keys to
  be CONSTANT_CASE.

  This allows tests to specify their own URL, or to add a query or
  fragment.

* feat(tests): Add getAllBlocks helper

* test: Verify drag blocks works properly

* chore(tests): Reformat comments

  Manually reformat comments to comply with styleguide.
2023-07-14 15:51:38 +01:00
Rachel Fenichel
741e8dbebb chore(tests): Add tests for adding and removing comments (#7284)
* chore(tests): Add tests for adding and removing comments

* chore(tests): respond to PR feedback
2023-07-13 13:57:38 -07:00
ericblackmonGoogle
a940dc5671 chore: Added test for loading json and interblock deletion (#7282)
* chore: Added test for loading json and interblock deletion

* chore: Added test for loading json and interblock deletion

* chore: Added test for loading json and interblock deletion

* chore: Added test for loading json and interblock deletion

* chore: Added test for loading json and interblock deletion
2023-07-12 11:22:59 -04:00
Rachel Fenichel
6b3803e68f chore(tests): Add documentation to browser test helper functions (#7280)
* chore(test): release strictness of jsdoc parsing in browser tests

* chore(tests): add jsdoc to browser test helper functions

* Update tests/browser/test/test_setup.js

Co-authored-by: Beka Westberg <bwestberg@google.com>

---------

Co-authored-by: Beka Westberg <bwestberg@google.com>
2023-07-11 21:43:53 +00:00
ericblackmonGoogle
cae721e968 chore: create test for undo block movements and editing a field (#7272)
* chore: create test for undo block movements and editing a field

* chore: create test for undo block movements and editing a field

* chore: create test for undo block movements and editing a field

* chore: create test for undo block movements and editing a field

* chore: create test for undo block movements and editing a field

* chore: create test for undo block movements and editing a field

* chore: create test for undo block movements and editing a field

* chore: create test for undo block movements and editing a field

* chore: create test for undo block movements and editing a field

* chore: create test for undo block movements and editing a field

* chore: create test for undo block movements and editing a field
2023-07-11 12:51:04 -04:00
Beka Westberg
b1045a27b0 chore: remove extra waits and shorten necessary ones (#7259) 2023-07-11 09:24:01 -07:00
Rachel Fenichel
c7d0610ed0 feat(tests): add right click tests and helpers (#7262)
* feat(tests): add test for collapsing block

* chore: format

* chore: format

* feat(tests): add right-click tests and helpers

* chore(tests): respond to review feedback
2023-07-10 14:24:30 -07:00
Beka Westberg
07ba841850 chore: add test helpers for connecting blocks (#7258)
* chore: get procedure test passing on linux

* chore: cleanup

* chore: format
2023-07-06 15:35:58 -07:00