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

Add bundled configuration for Cypress #339

Merged
merged 15 commits into from
Nov 5, 2021

Conversation

ayushn21
Copy link
Member

@ayushn21 ayushn21 commented Jun 17, 2021

This is a 🙋 feature or enhancement.

Summary

This PR adds a bundled configuration for Cypress based on the automation by @ParamagicDev (https://github.com/ParamagicDev/bridgetown-automation-cypress).

There's an issue with running the tests though. We run yarn start before running the tests which forks off processes to run the Bridgetown server and Webpack dev server. These processes aren't killed after the test suite ends so the only way to run the server again is to find the process id and kill the process before running yarn start again.

Not quite sure how to fix this. Once we switch to Rake, would be possible to fix this problem? Might be worth holding off on merging until then.

To Do

  • Figure out a fix for the the orphaned server processes during testing
  • Update docs on website

Context

Resolves #311

@jaredcwhite
Copy link
Member

Not sure the switch to Rake would automatically resolve the issue, but yeah would make sense to implement then and not now (thus having to reimplement later).

@ayushn21
Copy link
Member Author

I took a (very) short peek at your Rake/Roda etc PR and saw that the commands in Rake were triggered using Ruby (Bridgetown::Commands::Build.start etc etc) ... so figured that might give us an easier way to kill the forked processes once the tests are run. This is a complete guess though; I know next to nothing about Rake and orchestrating processes and things.

…d-cypress-configuration

# Conflicts:
#	bridgetown-core/lib/bridgetown-core/configurations/tailwindcss.rb
# Conflicts:
#	bridgetown-website/src/_docs/testing.md
@ayushn21
Copy link
Member Author

@jaredcwhite I'm half asleep (it's 1am here) but I got on a roll so thought I'd sort this out. I think it should be more or less good to go. It'd be great if you could take a peek and let me know if you have any feedback.

Otherwise will re-test and merge tomorrow when I'm more awake!

Copy link
Member

@jaredcwhite jaredcwhite left a comment

Choose a reason for hiding this comment

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

This look great! I'll test it out more when I get a chance but meanwhile LGTM. (Just one question about the Rake tasks)

@ayushn21
Copy link
Member Author

ayushn21 commented Nov 4, 2021

Thanks! I'll leave this open until you get a chance to test it, just in case something's not quite right. Seemed ok in my testing but you never know!

@jaredcwhite jaredcwhite merged commit fa431c1 into bridgetownrb:main Nov 5, 2021
@ayushn21 ayushn21 deleted the add-cypress-configuration branch November 5, 2021 15:37
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.

docs: Simplify docs for cypress testing
2 participants