Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

fix: DEV-4081: e2e tests for selected region after tool changes #1192

Merged
merged 8 commits into from
Mar 20, 2024

Conversation

BradNeuberg
Copy link
Contributor

@BradNeuberg BradNeuberg commented Feb 13, 2023

e2e tests to ensure selected region is correct after moving between certain tools.

When using Brush then Eraser or Pan, existing region should stay selected and have new additions be added to it. Similar for the Magic Wand.

We also have to ensure that the unselectRegionOnToolChange property for the Brush tool is updated on afterCreate so that e2e tests can dynamically update a feature flag and have it be applied.

In addition, we have made adding the magicwand tag to the Registry safer, feature flag gating it on import rather than dynamically in the Registry class.

PR fulfills these requirements

  • [*] Commit message(s) and PR title follows the format [fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made ex. fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
  • [*] Tests for the changes have been added/updated (for bug fixes/features)
  • [*] Docs have been added/updated (for bug fixes/features)
  • [*] Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • [*] Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)

(check all that apply)

  • Product design
  • [*] Frontend

Describe the reason for change

(link to issue, supportive screenshots etc.)

e2e tests for the fixes in HumanSignal/label-studio#3510 , that were also bundled in the PR at #1119

What does this fix?

(if this is a bug fix)

These are e2e tests for region selection behavior for the Brush/Magic Wand when interacting with the Eraser and Pan tools. It also includes a small change to how the unselectRegionOnToolChange value is set on the Brush tool to ensure it can be dynamically changed based on the Magic Wand flag when running during e2e tests.

What is the new behavior?

(if this is a breaking or feature change)

What is the current behavior?

(if this is a breaking or feature change)

What libraries were added/updated?

(list all with version changes)

Does this change affect performance?

(if so describe the impacts positive or negative)

Does this change affect security?

(if so describe the impacts positive or negative)

What alternative approaches were there?

(briefly list any if applicable)

What feature flags were used to cover this change?

(briefly list any if applicable)

FF_DEV_4081 = 'fflag_feat_front_dev_4081_magic_wand_tool'

Does this PR introduce a breaking change?

(check only one)

  • Yes, and covered entirely by feature flag(s)
  • Yes, and covered partially by feature flag(s)
  • [*] No
  • Not sure (briefly explain the situation below)

What level of testing was included in the change?

(check all that apply)

  • [*] e2e
  • integration
  • unit

Which logical domain(s) does this change affect?

(for bug fixes/features, be as precise as possible. ex. Authentication, Annotation History, Review Stream etc.)

…ertain tools.

When using Brush then Eraser or Pan, existing region should stay selected and have new additions be added to it. Similar for the Magic Wand.

We also have to ensure that the unselectRegionOnToolChange property for the Brush tool is updated on `afterCreate` so that e2e tests can dynamically update a feature flag and have it be applied.
@swarmia
Copy link

swarmia bot commented Feb 13, 2023

@BradNeuberg BradNeuberg changed the title ix: DEV-4081: e2e tests for selected region after tool changes fix: DEV-4081: e2e tests for selected region after tool changes Feb 13, 2023
bradneuberg added 3 commits February 14, 2023 13:43
…n the Registry.

This is safer for side effects. We've also modified our e2e tests to work with this different feature flagging approach.
@hogepodge
Copy link

We're tracking internally and waiting for assignment.

@BradNeuberg
Copy link
Contributor Author

BradNeuberg commented Mar 15, 2023 via email

@BradNeuberg
Copy link
Contributor Author

@hogepodge Hi Chris, any updates on this PR? I think all the work and feedback on the code review are essentially done, and these are just integration tests. I'd love to land this if possible. We have a tracking ticket over on Planet's side for this work and I'd love to close that soon if possible.

@BradNeuberg
Copy link
Contributor Author

@hogepodge Checking in about this again :) These are important integration tests to us at Planet, as the selected region getting unselected during a tool change causes significant friction during labeling in our workflow. @cameronbronstein might have found this feature regressing the last few weeks (not completely sure yet as selection can be subtle), and these integration tests were meant to catch that kind of regression. Any updates on landing these tests so that when they break that is caught?

@cameronbronstein
Copy link

I just learned about this new option in the annotator settings: "Keep label selected after creating a region". I think if we have this enabled then we will get the behavior that we want.

Screen Shot 2023-04-04 at 10 15 11 AM

@hogepodge
Copy link

I'll be checking in tomorrow with the QA team to see if we can get this moved along. Thanks

@hogepodge
Copy link

@nicholasrq ping on reviewing this patch

@BradNeuberg
Copy link
Contributor Author

Any update on landing these? They are just tests :)

@hogepodge
Copy link

I've created an internal ticket to try and move this forward.

@hlomzik hlomzik marked this pull request as draft November 20, 2023 15:31
@hlomzik hlomzik marked this pull request as ready for review November 20, 2023 15:31
@hlomzik
Copy link
Collaborator

hlomzik commented Jan 15, 2024

/git merge master

Workflow run
Error: Merge conflict detected, please resolve it using the command line.

@hlomzik hlomzik merged commit 8e5aba5 into HumanSignal:master Mar 20, 2024
11 of 13 checks passed
hlomzik added a commit to HumanSignal/label-studio that referenced this pull request Mar 26, 2024
hlomzik added a commit to HumanSignal/label-studio that referenced this pull request Mar 27, 2024
* feat: LEAP-219: Update LSF E2E with recent changes

- HumanSignal/label-studio-frontend#1192 for Magic Wand from @BradNeuberg
- HumanSignal/label-studio-frontend#1708 with external images problem
- HumanSignal/label-studio-frontend#1021 for maxUsages missed for some reason

* Fix newlines in all LSF E2E from CRLF to LF

* ci: Build frontend

Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/8429166524

* Update web/libs/editor/tests/e2e/tests/ner-text.test.js

* ci: Build frontend

Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/8429666577

---------

Co-authored-by: robot-ci-heartex <[email protected]>
Co-authored-by: bmartel <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants