Skip to content

Conversation

@Morantron
Copy link
Collaborator

Resurrecting #254

@Morantron Morantron mentioned this pull request Mar 14, 2018
@sauloperez
Copy link
Collaborator

sauloperez and others added 16 commits March 15, 2018 21:55
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.
Copy link
Collaborator

@sauloperez sauloperez left a 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
Copy link
Collaborator

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

fill_in 'transfer_minutes', with: minutes

# hack alert! there is no translation for this string. How we build the
# copy then?
Copy link
Collaborator

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

Copy link
Collaborator Author

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
Copy link
Collaborator

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?

@Morantron Morantron force-pushed the feature-specs branch 2 times, most recently from 372380b to f9f86f5 Compare March 20, 2018 19:10
@enricostano enricostano dismissed sauloperez’s stale review May 10, 2018 15:31

La vida es dura.

@enricostano enricostano merged commit c775567 into develop May 10, 2018
@enricostano enricostano deleted the feature-specs branch May 10, 2018 15:32
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' )
Copy link
Collaborator

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?

Copy link
Contributor

Choose a reason for hiding this comment

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

Done #352

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.

3 participants