grantspeelman / cypress-on-rails Goto Github PK
View Code? Open in Web Editor NEWThis project forked from shakacode/cypress-on-rails
Use cypress.io with your rails and rack application
This project forked from shakacode/cypress-on-rails
Use cypress.io with your rails and rack application
I am having issues using traits:
cy.appFactories([
['create', 'order', 'trial']
])
outputs: app error: Trait not registered: trial
in the rails stdout/stderr and log/test.log
I noticed you added specs for trait, but with a mock factory. I'll attempt to recreate the issue within the gem specs.
My setup:
# ruby -v
ruby 2.4.5p335
# rails -v
Rails 5.2.2
# bundle info cypress-on-rails
* cypress-on-rails (1.3.0)
Summary: Integrates cypress with rails or rack applications
Homepage: http://github.com/grantspeelman/cypress-on-rails
Path: /var/lib/gems/2.4.0/gems/cypress-on-rails-1.3.0
Hello,
I have 3 simple tests working well on my local machine.
I try to run the tests on travis.ci, but I have a 500 error as reponse from the middleware for the clean command... The server logs are pretty empty, I only have one line for the POST on /cypress/command
I'm stuck, maybe somebody can help me at least to have a little bit more logs
Thanks in advance,
Gil
Hello,
From what I understood of the original project, rspec mocking commands should be supported. I have tried to use allow_any_instance_of(Class).to receive(:check).and_return([])
as the only command in the basic scenario file (of the provided examples). However, my Rails returns an error when I try to execute this. Do you have any clue how I can get this to work?
Text from the original project:
In the scenario you also have access to RSpec mocking functions. So you could do something like:
scenario :basic do
allow(ExternalService).to receive(:retrieve).and_return("result")
end
Thanks a lot!
Update:
By adding the following code, I managed to get it to work! However, I am curious if there's a better way. Also, is there a way to clean up my spec changes for when I don't want to mock anymore? Any idea's?
require 'rspec/rails'
RSpec::Mocks.teardown
RSpec::Mocks.setup
extend RSpec::Mocks::ExampleMethods
allow_any_instance_of(Class).to receive(:check).and_return([])
Hello there,
When I change HTML view on my server I would like to tell Cypress to trigger test run. Is there any API that I can use to call and run specific test file?
For example watch server files with Guard and trigger this call.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.