Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lexical-playground] CI: standardise key press delay #6246

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

potatowagon
Copy link
Contributor

@potatowagon potatowagon commented Jun 4, 2024

Description

credits to @Sahejkm for pointing out that 100ms is workable as a delay https://github.com/facebook/lexical/pull/6245/files#r1625266582

introducing const STANDARD_KEYPRESS_DELAY_MS

  • setting 100ms as a standard keypress delay const, so it can be reused and developers dont need to waste time through trial an error to find an optimal delay value
  • the goal of this standard delay is to provide a delay value that is short enough yet not too short such that keypresses still override each other thus leading to flakiness
  • this standard should work for most test cases. if there are outliers, a custom value can be passed as the delay instead
  • open to adjusting this standard value overtime

Closes #

Test plan

npm run start & npm run test-e2e-collab-chromium

  Slow test file: [chromium] › packages/lexical-playground/__tests__/e2e/Mentions.spec.mjs (19.9s)
  Consider splitting slow test files to speed up parallel execution
  1 flaky
    [chromium] › packages/lexical-playground/__tests__/e2e/Tables.spec.mjs:1269:3 › Tables › Grid selection: can select multiple cells and insert an image 
  66 skipped
  370 passed (3.9m)

tests using the 100ms delay not in flaky list

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link

vercel bot commented Jun 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 4, 2024 9:31am
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 4, 2024 9:31am

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 4, 2024
Copy link

github-actions bot commented Jun 4, 2024

size-limit report 📦

Path Size
lexical - cjs 28.33 KB (0%)
lexical - esm 28.14 KB (0%)
@lexical/rich-text - cjs 36.77 KB (0%)
@lexical/rich-text - esm 28.1 KB (0%)
@lexical/plain-text - cjs 35.35 KB (0%)
@lexical/plain-text - esm 25.33 KB (0%)
@lexical/react - cjs 38.51 KB (0%)
@lexical/react - esm 29.12 KB (0%)

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@potatowagon potatowagon changed the title standardise key press delay [lexical-playground] CI: standardise key press delay Jun 4, 2024
@potatowagon potatowagon added this pull request to the merge queue Jun 4, 2024
Merged via the queue into main with commit 5e3a65d Jun 4, 2024
38 checks passed
@potatowagon potatowagon deleted the standardise-key-press branch July 26, 2024 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants