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

test: get tests running on macOS again by leveraging built-in platform detection #5144

Merged
merged 1 commit into from
May 14, 2024

Conversation

nperez0111
Copy link
Contributor

Changes Overview

The tests were failing to run on a macOS machine because the keyboard shortcut for strike was trying to implement it's own platform detection.
Instead of relying on the existing keyboard shortcut code:

if (isiOS() || isMacOS()) {
meta = true
} else {
ctrl = true
}

The tests that were being run only ever sent the CTRL key instead of using the platform-independent modKey

Implementation Approach

Simplify the keyboard shortcut handler to utilize the built-in Mod which means CMD on macOS and CTRL on Windows

Testing Done

I ran the demo src/Marks/Strike and everything worked as expected.

Verification Steps

Run the tests on macOS host, and on CI. Verify shortcut on your own

Additional Notes

Checklist

  • I have renamed my PR according to the naming conventions. (e.g. feat: Implement new feature or chore(deps): Update dependencies)
  • My changes do not break the library.
  • I have added tests where applicable.
  • I have followed the project guidelines.
  • I have fixed any lint issues.

Related Issues

Copy link

netlify bot commented May 14, 2024

Deploy Preview for tiptap-embed ready!

Name Link
🔨 Latest commit 67b8c9a
🔍 Latest deploy log https://app.netlify.com/sites/tiptap-embed/deploys/6642c179fbf18000078d9535
😎 Deploy Preview https://deploy-preview-5144--tiptap-embed.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@nperez0111 nperez0111 force-pushed the issue/strikethrough-shortcut branch from 74f0493 to 67b8c9a Compare May 14, 2024 01:42
@nperez0111 nperez0111 marked this pull request as ready for review May 14, 2024 01:47
@bdbch bdbch merged commit 1ff58ae into main May 14, 2024
14 checks passed
@bdbch bdbch deleted the issue/strikethrough-shortcut branch May 14, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants