-
Notifications
You must be signed in to change notification settings - Fork 0
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
setup selenium testing #24
Open
yzhoubk
wants to merge
6
commits into
DP-1025-upgrade-omniauth
Choose a base branch
from
DP-1025-Selenium-webdriver
base: DP-1025-upgrade-omniauth
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ee02a3c
setup selenium testing
yzhoubk 8a7133f
with config from TIND-QA
yzhoubk 516e072
Add Configure from TIND-QA
yzhoubk 1a4e03c
add service aliases
yzhoubk 0cdfa13
Updated Chrome settings
danschmidt5189 7e179ed
Restores shm settings -- headless is sufficient
danschmidt5189 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
require 'rails_helper' | ||
|
||
|
||
# RSpec.feature 'Clicking login link on root page', type: :feature do | ||
# scenario 'User clicks login link and is redirected login page' do | ||
# Rails.logger.info 'User is logged in' | ||
# visit root_path | ||
# click_link 'login' | ||
# logger.info("PPPPP-#{user_calnet_omniauth_authorize_path}") | ||
# expect(page).to have_current_path(user_calnet_omniauth_authorize_path) | ||
# end | ||
# end | ||
|
||
|
||
# describe 'User Util Links' do | ||
# it 'has link' do | ||
# visit root_path | ||
# click_link 'login' | ||
# # logger.info("PPPPP-#{user_calnet_omniauth_authorize_path}") | ||
# # expect(page).to have_current_path(user_calnet_omniauth_authorize_path) | ||
# end | ||
# end | ||
|
||
RSpec.feature 'Homepage', type: :feature, js: true do | ||
include Capybara::DSL | ||
scenario 'User visits the homepage' do | ||
# root_path = 'https://www.google.com' | ||
visit root_path | ||
expect(page).to have_content('UC Berkeley GeoData Repository') | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Try copying exactly what we got working in TIND-QA, which is a simplified version of what's configured for Framework. The option arguments and preferences differ a bit between the two and it's not immediately obvious what would cause a problem, so best to start with a known working config.
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.
Ah ha! Per our discussion off-GitHub—a problem is that the Selenium container makes requests to localhost:3000, but the actual address (from its perspective) is
app:3000
. IIRC from having worked with Capybara like this in the past, something in the stack (Chrome?) will complain about hitting a hostname with an invalid TLD, so you may have to useapp.test:3000
with a network alias added to your compose file: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 also had to reconfigure
shm
:shm_size
from the Compose file--disable-dev-shm-usage
Having done both of those I'm now able to run the feature specs locally on an M-chip MacBook.