Skip to content

Add Cypress component test for MessageEditor #9365

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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

mtsgrd
Copy link
Contributor

@mtsgrd mtsgrd commented Jul 12, 2025

  • nabled component testing by replacing reactive variables with Svelte
    ;stores and removing $effect usage in .svelte.ts constructors.
  • Sacrificed lifecycle management and automatic unsubscription for simpler testing setup.
  • Improved browser compatibility to support Cypress component testing.
  • Added a Cypress component test for the CommitMessageEditor.

mtsgrd added 3 commits July 12, 2025 14:57
Removes some dependence on reactive variables in favor of using svelte
stores, meaning we should not use $effect in any .svelte.ts 
constructors.

Without effects we no longer have lifecycle management, so we never 
unsubscribe from dependencies. This isn't ideal, but it's also 
realistically not an immediate issue.

The benefit of this is we can easily create component tests using 
Cypress, and necessary to the `CommitMessageEditor` tests I have been 
working on.
This further enables component testing with Cypress.
Copy link

vercel bot commented Jul 12, 2025

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

Name Status Preview Comments Updated (UTC)
gitbutler-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2025 1:42pm
gitbutler-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2025 1:42pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant