-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Take screenshots during system tests, upload to Google Cloud storage, and append to Dangerbot output #5320
Closed
Closed
Take screenshots during system tests, upload to Google Cloud storage, and append to Dangerbot output #5320
Changes from 55 commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
cd852cf
Create screenshots_test
jywarren 05d3f19
Rename screenshots_test to screenshots_test.rb
jywarren c217fcc
Update screenshots_test.rb
jywarren 3d2b068
Update Dangerfile
jywarren 4394add
relative path to screenshots
jywarren 97667d8
Update Dangerfile
jywarren f8eecc1
gem "google-cloud-storage"
jywarren 79981f6
try assert_select "ul.dropdown-menu li", count: 2
jywarren d871f8e
attempt gcloud upload
jywarren 9ea5c1e
file.acl.public!
jywarren ee6d328
Update Dangerfile
jywarren d1da598
Also trying to comment out require "google/cloud/storage" to see if t…
jywarren 548d712
Update Dangerfile
jywarren e900013
gem install google-cloud-storage
jywarren 3197cd9
Run danger inside container
icarito fd99dce
Install Danger into container
icarito a005d89
Bundle exec danger
icarito 6b87b2a
Not bundle exec danger
icarito faa039a
try system("bundle install")
jywarren 081de73
Update Dangerfile
jywarren ba69f0d
add -e DANGER_GITHUB_API_TOKEN=$DANGER_GITHUB_API_TOKEN
jywarren 3b3f7f3
Add Danger environment variable
icarito ef37820
Try adding back docker-compose -e
icarito b79d1a4
Put env variable before docker-compose command
icarito d988a83
Add many env vars
icarito e29fc4b
And even more env variables
icarito 1c2cb58
add google-cloud-storage to .travis.yml step
jywarren 0d02277
GOOGLE_CLOUD_KEYFILE_JSON in docker compose
jywarren 5ee7ec9
Update .travis.yml
jywarren 8606dfd
GOOGLE_APPLICATION_CREDENTIALS
jywarren 6b074e2
put GOOGLE_APPLICATION_CREDENTIALS into a json file, change val to path
jywarren b391311
Update Dangerfile
jywarren 11d5821
Update screenshots_test.rb
jywarren 880326e
Update .travis.yml
jywarren ccad841
test echo JSON_TEST
jywarren 3932a10
Update Dangerfile
jywarren 590b580
Update Dangerfile
jywarren 5875cd4
Merge branch 'master' into screenshot-test
jywarren 2e65bef
Pass missing var
icarito 36a9830
Fix yaml
icarito 01cadf6
Missing ]
icarito ed8e5e2
Run danger in container
icarito 234353b
Remove JSON test
icarito 71443ac
Remove json test
icarito ef7bd7c
Pass on env var for phantomjs
icarito dae7a65
Avoid processing `.` or `..` screenshots
icarito 734ac34
Use Dir.glob instead of Dir.foreach
icarito 2395274
Convert issue number to string
icarito 0aa9c20
add ".png"
jywarren 508f133
change puts to message and output only file.name and file.public_url
jywarren a32d000
Update Dangerfile
jywarren 4f65112
remove true emoji
jywarren 442b96d
Update Dangerfile
jywarren b784006
Encoding.default_external = 'UTF-8'
jywarren 53d2f28
Update Dangerfile
jywarren bcbecce
item.split('/').last
jywarren cb5a489
Update screenshots_test.rb
jywarren 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
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 |
---|---|---|
|
@@ -27,6 +27,22 @@ services: | |
- RAILS_ENV=${RAILS_ENV} | ||
- SECRET_KEY_BASE=${SECRET_KEY_BASE} | ||
- REDIS_URL=redis://redis:6379/0 | ||
- DANGER_GITHUB_API_TOKEN=${DANGER_GITHUB_API_TOKEN} | ||
- TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST} | ||
- TRAVIS_REPO_SLUG=${TRAVIS_REPO_SLUG} | ||
- CI=${CI} | ||
- TRAVIS=${TRAVIS} | ||
- CONTINUOUS_INTEGRATION=${CONTINUOUS_INTEGRATION} | ||
- HAS_JOSH_K_SEAL_OF_APPROVAL=${HAS_JOSH_K_SEAL_OF_APPROVAL} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lol ummmmm |
||
- GITHUB_ACTION=${GITHUB_ACTION} | ||
- GITHUB_TOKEN=${GITHUB_TOKEN} | ||
- GITHUB_REPOSITORY=${GITHUB_REPOSITORY} | ||
- GITHUB_EVENT_PATH=${GITHUB_EVENT_PATH} | ||
- GITHUB_EVENT_NAME=${GITHUB_EVENT_NAME} | ||
- GOOGLE_CLOUD_KEYFILE_JSON=${GOOGLE_CLOUD_KEYFILE_JSON} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
- GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS} | ||
- GOOGLE_APPLICATION_CREDENTIALS_JSON=${GOOGLE_APPLICATION_CREDENTIALS_JSON} | ||
- QT_QPA_PLATFORM=${QT_QPA_PLATFORM} | ||
links: | ||
- redis | ||
volumes: | ||
|
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,17 @@ | ||
require "application_system_test_case" | ||
# https://guides.rubyonrails.org/testing.html#implementing-a-system-test | ||
|
||
class ScreenshotsTest < ApplicationSystemTestCase | ||
test 'front page with navbar search autocomplete' do | ||
visit '/' | ||
|
||
fill_in("searchform_input", with: "Canon") | ||
|
||
take_screenshot # remove this later | ||
# we set RAILS_SYSTEM_TESTING_SCREENSHOT to 'inline', could be 'artifact' too... see Rails API guide | ||
|
||
assert_selector ".typeahead li", text: "Canon A1200 IR conversion at PLOTS Barnraising at LUMCON", wait: 10 | ||
|
||
take_screenshot | ||
end | ||
end |
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.
This may need:
# encoding: utf-8
as per https://stackoverflow.com/questions/20521371/set-utf-8-as-default-for-ruby-1-9-3#20523482There 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.
Encoding.default_internal = Encoding::UTF_8
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.
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.
Yes maybe as a follow-up?