Skip to content

chore: highlight edited locator while recording#33632

Merged
pavelfeldman merged 1 commit intomicrosoft:mainfrom
pavelfeldman:inspect_while_recording
Nov 15, 2024
Merged

chore: highlight edited locator while recording#33632
pavelfeldman merged 1 commit intomicrosoft:mainfrom
pavelfeldman:inspect_while_recording

Conversation

@pavelfeldman
Copy link
Member

No description provided.

@github-actions

This comment has been minimized.

highlight = { elements };
else
this._actionSelectorModel = null;
highlight = 'clear';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this always clear highlight when recorder switches from state.ariaTemplate to state.actionSelector? I think this should be:

else if (highlight === 'noop')
  highlight = 'clear';

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code only runs if the template was the thing that changed last, so should be ok?

if (!state.actionSelector && !state.ariaTemplate)
this._actionSelectorModel = null;

if (this.state.mode === 'none' || this.state.mode === 'standby')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This mode check is gone. Do we clear highlight upon performing an action on the recorder side?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we do, so should be unrelated to that scenario.

@pavelfeldman pavelfeldman force-pushed the inspect_while_recording branch from 6bfbb19 to 0580258 Compare November 15, 2024 21:22
@pavelfeldman pavelfeldman force-pushed the inspect_while_recording branch from 0580258 to cc24cf9 Compare November 15, 2024 21:24
@pavelfeldman pavelfeldman merged commit 44cd1d0 into microsoft:main Nov 15, 2024
@github-actions
Copy link
Contributor

Test results for "tests 1"

1 flaky ⚠️ [webkit-library] › library/browsercontext-clearcookies.spec.ts:92:3 › should remove cookies by domain @webkit-ubuntu-22.04-node18

36912 passed, 650 skipped
✔️✔️✔️

Merge workflow run.

dgozman added a commit to dgozman/playwright that referenced this pull request Nov 29, 2024
This breaks when VSCode updates the highlight during recording.
The problem was exposed by microsoft#33632.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants