drinkr's People
Forkers
rew38drinkr's Issues
Implement Coveralls
Sign up for and add Coveralls to your project to include a code coverage badge on your project!
Gem Dependency Issue
CONTEXT
User story
As a developer I would like to test my code.
What I'm trying to do
Trying to create our testing environment.
Error
Could not find gem 'mini_portile (~> 0.5.0 (>= 0) ruby', which is required by gem 'capybara (>= 0) ruby', in any of the sources.
Occurs on both my computer as well as Colin's computer.
Happens when we ran bundle install, bundle exec install, as well as when we run rails g rspec:install
What I've tried
This is what the gem file looks like
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.0'
# Use postgresql as the database for Active Record
gem 'pg'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
# gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring', group: :development
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
gem 'devise', '~> 3.2.4'
gem 'omniauth', '~> 1.2.1'
gem 'omniauth-facebook', '~> 1.6.0'
gem 'geocoder'
gem 'httparty'
group :development, :test do
# gem 'jasmine'
# gem 'rubocop'
# gem 'shoulda-matchers'
# gem 'selenium-webdriver'
gem 'pry-rails'
gem 'rspec'
gem 'rspec-rails'
gem 'capybara'
gem 'simplecov', '~> 0.7.1', :require => false
end
Above in the gem file, jasmine, rubocop, shoulda-matchers, and selenium-webdriver
all cause the error to occur when running bundle install
We deleted the repo and re-cloned, originally assuming it was an issue on my computer.
When we ran into the same error we tried adding the gems on Colin's machine and bundling and ran into the same error.
We then tried isolating each gem and installing them individually.
We also tried bundling with the gems in different orders (above and below capybara) as well as bundling with the gems outside of our :development, :test
group
We then checked the Gemfile.lock to see if the gems were even included. They are and look as follows:
- note the mini-portile gem is not nested within capybara *
We also just tried installing the gem normally... gem install mini-portile
which installed but didn't fix the issue.
We tried googling, but we couldn't find any issue that resembled the error we're getting.
Invalid Travis.yml file
Getting Venmo Access Token
Context:
-As a user I would like to be able to sign into Venmo so I can split my payments with friends.
-Problem: right now the only way I can get to the account authorization page and have it redirect back to my page is by setting up an href link to the page, which will then redirect back to my homepage. This sends back an access token in the url however I do not know how to access that, since it's only in the url and not params.
What I've tried:
-I tried using ajax to set up the get request however it would not even redirect to the venmo authorization page, and the error it was throwing was: "No 'Access-Control-Allow-Origin' header is present on the requested resource".
-I then tried setting up a link which as I said above will redirect to venmo, authorize, and then redirect back to our page with the access token in the url. I know you can do document.URL to get the url and then I can set up a method to just parse out the token info however, I'm not sure where I would set that up because it won't capture if I try to set up an "on click" function, since it occurs after the redirect.
Travis CI ruby version
Update Master Readme
Please update readme on master branch to include Travis Badge, link to ERD, link to Pivotal, and Team members!
Testing button clicking with capybara
CONTEXT
USER STORY
As a user I would like to add items to my cart.
What I'm trying to do
Trying to test adding an item to the users cart.
Error
1) visiting the site a new user visits the hompage gets a guest token
Failure/Error: expect(page).to have_selector('#item_count', text: '1 item(s)')
Capybara::ExpectationNotMet:
expected to find css "#item_count" with text "1 item(s)" but there were no matches. Also found "0 item(s)", which matched the selector but not all filters.
# ./spec/features/landing_spec.rb:30:in `block (3 levels) in <top (required)>'
What we've tried
This is currently what the test looks like that returns the above error
it "gets a guest token", :js => true do
visit root_path
fill_in 'search_merchants', with: 'soho'
find_field('search_merchants').native.send_key(:return)
find('#merchant-30782').native.send_keys(:down)
within(:css, '#merchant-30782 #item-N292 section') do
click_button('Add to Cart')
end
expect(page).to have_selector(:css, '#item_count', text: '1 item(s)')
We were originally thinking it was a scoping issue. But we seem to be able to peer into the proper css child.
e.g. If we change the line in the within block to expect(page).to have_content('Add to Cart')
The test passes.
We've tried all the variations we can find
click_button('Add to Cart')
click('Add to Cart')
find_button('Add to Cart').click
the code is available here... http://drink-r.herokuapp.com/
But this is the html of the button we're trying to click
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.