forked from code-dot-org/code-dot-org
-
Notifications
You must be signed in to change notification settings - Fork 0
Testing
Dayne edited this page Mar 7, 2023
·
10 revisions
setup doteardown do
RAILS_ENV=test bundle exec rake test:pegasus TEST=test/test_pegasus_documents.rb
pushd dashboard/test/ui; bundle exec ./runner.rb -l -f features/sometest.feature; popd
Something to try soon would be the following:
bundle exec rake test:ui feature=dashboard/test/ui/features/sometest.feature
find . -type f \( -name "*.rb" -o -name "*.feature" \) | entr -scr 'pushd dashboard/test/ui; ./runner.rb -l --html --eyes -f features/markdown_rendering.feature; popd'
diff --git a/dashboard/test/ui/utils/selenium_browser.rb b/dashboard/test/ui/utils/selenium_browser.rb
index 3bbcd0a6eb5..004274811c2 100644
--- a/dashboard/test/ui/utils/selenium_browser.rb
+++ b/dashboard/test/ui/utils/selenium_browser.rb
@@ -7,6 +7,7 @@ module SeleniumBrowser
options = {}
case browser
when :chrome
+ Selenium::WebDriver::Chrome.driver_path = "/Users/daycode/.webdrivers/chromedriver"
options[:options] = Selenium::WebDriver::Chrome::Options.new
options[:options].add_argument('headless') if headless
options[:options].add_argument('window-size=1280,1024')
find . -type f \( -name "*.rb" -o -name "*.feature" \) | entr -scr 'pushd dashboard; RAILS_ENV=test bundle exec spring testunit test/controllers/courses_controller_test.rb --name test_user_calling_get_index_should_receive_success; popd'
WATCH=1 BROWSER=Chrome LEVEL_TYPE='applab1' npm run test:integration --grep='ec_goals'
- You may have to adjust
applab1orec_goals.
- Add
debugger;in the JS code.- You will need to right-click the chrome window and launch the debugger for the breakpoint to get hit though.
TODO get actual error
needs migrate
Do this:
pushd dashboard; bundle exec rake db:migrate RAILS_ENV=test; popd