-
Couldn't load subscription status.
- Fork 69
Feature specs #333
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
Feature specs #333
Conversation
|
❤ |
This sets up capybara with the new headless chrome driver and adds the necessary requires in order to run single spec file. So far, there was no other way than doing `bundle exec rake` due to missing requires.
The headless chromedriver requires Chrome to be installed. See https://robots.thoughtbot.com/headless-feature-specs-with-chrome#on-ci for details.
We had `use_transactional_fixtures` enabled but no fixtures where defined in spec/fixtures. This prevented Capybara tests with javascript to work. This is explained in detail in https://github.com/DatabaseCleaner/database_cleaner#rspec-with-capybara-example.
I want to know if when the t&c could not be created because the tests assume they are always persisted in DB.
f9533e8 to
f129448
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pretty neat 👌
| sign_in_with(user.email, 'papapa22') | ||
|
|
||
| expect(Capybara.current_session.driver.browser.manage.cookie_named('_timeoverflow_session')).to be_truthy | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also expect to navigate to a page which contains the nav menu, or the terms of service
spec/features/transfer_spec.rb
Outdated
| fill_in 'transfer_minutes', with: minutes | ||
|
|
||
| # hack alert! there is no translation for this string. How we build the | ||
| # copy then? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather create an issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just active record magic, see here
| Document.create!(label: "t&c") do |doc| | ||
| doc.title = "Terms and Conditions" | ||
| doc.content = "blah blah blah" | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about creating a #create_terms_and_conditions?
372380b to
f9f86f5
Compare
0cfc6d1 to
90ac1d4
Compare
| fill_in 'offer_description', with: 'Lorem ipsum in the night' | ||
| select category.name, from: 'offer_category_id' | ||
|
|
||
| # TODO there are two i18n keys for getting "Crear oferta" copy ( one returns 'Crear oferta' and the other 'Crear Oferta' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we create an issue so we keep track of it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done #352
Resurrecting #254