diff --git a/.travis.yml b/.travis.yml index 71aebc33..1d925acb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,11 +5,6 @@ env: - MOZ_HEADLESS=1 install: - - wget -N https://github.com/mozilla/geckodriver/releases/download/v0.20.1/geckodriver-v0.20.1-linux64.tar.gz -O geckodriver.tar.gz - - tar xzf geckodriver.tar.gz - - rm geckodriver.tar.gz - - chmod +x geckodriver - - sudo mv geckodriver /usr/local/bin/geckodriver - npm install - bundle install --jobs=3 --retry=3 --deployment - npm run build @@ -29,24 +24,15 @@ before_install: - sudo apt-get -qq update - sudo apt-get install libav-tools imagemagick - curl -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.4.6/elasticsearch-2.4.6.deb && sudo dpkg -i --force-confnew elasticsearch-2.4.6.deb && sudo service elasticsearch restart - - mysql -e 'CREATE DATABASE kor_test;' - - cp deploy/database.travis.yml config/database.yml - # - npm install - # - npm run build - # - bundle install - - # - deploy/dockerize.sh $TRAVIS_COMMIT test - # - docker pull mysql - # - docker pull elasticsearch:2.4.4 - # - docker run -d -e MYSQL_ROOT_PASSWORD=root --name mysql mysql - # - docker run -d --name elastic elasticsearch:2.4.4 - -# install: true + - wget -N https://github.com/mozilla/geckodriver/releases/download/v0.20.1/geckodriver-v0.20.1-linux64.tar.gz -O geckodriver.tar.gz + - tar xzf geckodriver.tar.gz + - rm geckodriver.tar.gz + - chmod +x geckodriver + - sudo mv geckodriver /usr/local/bin/geckodriver script: + - mysql -e 'CREATE DATABASE kor_test;' + - cp deploy/database.travis.yml config/database.yml - bundle exec rake db:test:load - bundle exec cucumber features/ - bundle exec rspec spec/ - # - docker run --rm --link mysql:mysql --link elastic:elastic docker.coneda.net:443/kor:$TRAVIS_COMMIT bundle exec rake db:drop db:setup db:test:load - # - docker run --rm --link mysql:mysql --link elastic:elastic docker.coneda.net:443/kor:$TRAVIS_COMMIT bundle exec rspec spec --format=progress - # - docker run --rm --link mysql:mysql --link elastic:elastic -e HEADLESS=true docker.coneda.net:443/kor:$TRAVIS_COMMIT bundle exec cucumber features --format=progress diff --git a/Gemfile.lock b/Gemfile.lock index 07951d97..bbaab563 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -43,8 +43,8 @@ GEM tzinfo (~> 1.1) acts-as-taggable-on (3.5.0) activerecord (>= 3.2, < 5) - addressable (2.5.1) - public_suffix (~> 2.0, >= 2.0.2) + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) angularjs-rails (1.5.6) arel (6.0.4) ast (2.2.0) @@ -64,20 +64,20 @@ GEM slim (>= 1.3.6, < 4.0) terminal-table (~> 1.4) builder (3.2.3) - capybara (2.15.1) + capybara (2.18.0) addressable mini_mime (>= 0.1.3) nokogiri (>= 1.3.3) rack (>= 1.0.0) rack-test (>= 0.5.4) - xpath (~> 2.0) - childprocess (0.8.0) + xpath (>= 2.0, < 4.0) + childprocess (0.9.0) ffi (~> 1.0, >= 1.0.11) climate_control (0.0.3) activesupport (>= 3.0) cocaine (0.5.8) climate_control (>= 0.0.3, < 1.0) - coderay (1.1.0) + coderay (1.1.2) coffee-rails (4.2.2) coffee-script (>= 2.2.0) railties (>= 4.0.0) @@ -128,7 +128,7 @@ GEM factory_girl (~> 4.7.0) railties (>= 3.0.0) fastercsv (1.5.5) - ffi (1.9.18) + ffi (1.9.23) gherkin (4.1.3) globalid (0.4.0) activesupport (>= 4.2.0) @@ -156,19 +156,19 @@ GEM mime-types (>= 1.16, < 4) method_profiler (2.0.1) hirb (>= 0.6.0) - method_source (0.8.2) + method_source (0.9.0) mime-types (3.1) mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) mimemagic (0.3.0) - mini_mime (0.1.4) - mini_portile2 (2.2.0) + mini_mime (1.0.0) + mini_portile2 (2.3.0) minitest (5.10.2) multi_json (1.12.1) multi_test (0.1.2) mysql2 (0.4.2) - nokogiri (1.8.0) - mini_portile2 (~> 2.2.0) + nokogiri (1.8.2) + mini_portile2 (~> 2.3.0) paperclip (4.3.6) activemodel (>= 3.2.0) activesupport (>= 3.2.0) @@ -185,15 +185,14 @@ GEM rails (>= 3.1) power_assert (0.2.7) powerpack (0.1.1) - pry (0.10.3) + pry (0.11.3) coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) - public_suffix (2.0.5) + method_source (~> 0.9.0) + public_suffix (3.0.2) puma (3.9.1) quiet_assets (1.1.0) railties (>= 3.1, < 5.0) - rack (1.6.8) + rack (1.6.10) rack-cors (0.4.0) rack-test (0.6.3) rack (>= 1.0) @@ -265,9 +264,9 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - selenium-webdriver (3.5.2) + selenium-webdriver (3.11.0) childprocess (~> 0.5) - rubyzip (~> 1.0) + rubyzip (~> 1.2) sexp_processor (4.7.0) simplecov (0.11.2) docile (~> 1.1.0) @@ -277,7 +276,6 @@ GEM slim (3.0.6) temple (~> 0.7.3) tilt (>= 1.3.3, < 2.1) - slop (3.6.0) spreadsheet (1.1.4) ruby-ole (>= 1.0) sprockets (3.7.1) @@ -315,8 +313,8 @@ GEM crack (>= 0.3.2) hashdiff will_paginate (3.0.7) - xpath (2.1.0) - nokogiri (~> 1.3) + xpath (3.0.0) + nokogiri (~> 1.8) PLATFORMS ruby @@ -377,4 +375,4 @@ DEPENDENCIES will_paginate (~> 3.0.3) BUNDLED WITH - 1.16.0 + 1.16.1 diff --git a/app/assets/stylesheets/modules/widgets.css.sass b/app/assets/stylesheets/modules/widgets.css.sass index b05f8299..e3596fe0 100644 --- a/app/assets/stylesheets/modules/widgets.css.sass +++ b/app/assets/stylesheets/modules/widgets.css.sass @@ -90,6 +90,9 @@ $black_default: #1E1E1E cursor: pointer + [kor-entity-widget] + display: inline-block + img width: 100% diff --git a/features/easyrel.feature b/features/easyrel.feature index ce6fa5fb..dd261ba6 100644 --- a/features/easyrel.feature +++ b/features/easyrel.feature @@ -21,9 +21,9 @@ Feature: Inplace relationship editor Given I am logged in as "admin" And I am on the entity page for "Mona Lisa" Then I should see "Mona Lisa" - And I should not see "Create link" + And I should not see "Create relationship" When I click element "[data-name=plus]" within ".relationships" - Then I should see "Create link" + Then I should see "Create relationship" @javascript Scenario: Click the 'Create' button without having the form completed @@ -45,7 +45,7 @@ Feature: Inplace relationship editor And I fill in "terms" with "schrei" And I click element "[kor-id='2']" And I press "Save" - And I should not see "Create link" + And I should not see "Create relationship" Then I should see "Der Schrei" within ".relationship" @javascript @@ -58,7 +58,7 @@ Feature: Inplace relationship editor And I click button "Add" within ".relationship .properties" And I fill in ".property input" with "this is almost certain" And I press "Save" - And I should not see "Edit link" + And I should not see "Edit relationship" And I should see "Relationship has been changed" And I should see "this is almost certain" within ".relationship" @@ -82,7 +82,7 @@ Feature: Inplace relationship editor When I click element "[data-name=pen]" within ".relationships" And I select "is equivalent to" from "relation_name" And I press "Save" - And I should not see "Edit link" + And I should not see "Edit relationship" And I should see "Relationship has been changed" And I should see "is equivalent to" within ".relationships" And I should not see "is similar to" within ".relationships" @@ -98,7 +98,7 @@ Feature: Inplace relationship editor And I follow "recently created" And I click on entity "The Last Supper" And I press "Save" - And I should not see "Edit link" + And I should not see "Edit relationship" And I should see "Relationship has been changed" And I should see "is similar to" within ".relationships" And I should see "The Last Supper" within ".relationships" diff --git a/features/entities.feature b/features/entities.feature index 25e51809..77a6667b 100644 --- a/features/entities.feature +++ b/features/entities.feature @@ -175,7 +175,7 @@ Feature: Entities Then I should not see "Mona Lisa" Given user "admin" is allowed to "view" collection "side" through credential "side_admins" - When I go to the entity page for "Leonardo da Vinci" + When I reload the page Then I should see "Mona Lisa" diff --git a/features/media.feature b/features/media.feature index 42806c48..bc3933b3 100644 --- a/features/media.feature +++ b/features/media.feature @@ -4,28 +4,31 @@ Feature: Media I want to be able to upload, transform and link media - @javascript @nodelay + @javascript Scenario: Rotate an uploaded image Given I am logged in as "admin" And the medium "spec/fixtures/image_a.jpg" + And everything is processed When I go to the entity page for the last medium And I follow "Rotate_cw" Then I should be on the entity page for the last medium - @javascript @nodelay + @javascript Scenario: Previews for uploaded images Given I am logged in as "admin" And the medium "spec/fixtures/image_a.jpg" + And everything is processed And I go to the root page And I go to the entity page for the last medium Then I should see element "img[src*='/media/images/preview/000/000/001/image.jpg']" within ".viewer" - @javascript @nodelay + @javascript Scenario: Upload a video and watch it Given I am logged in as "admin" And the medium "spec/fixtures/video_a.m4v" + And everything is processed When I go to the entity page for the last medium And I click on the player link Then I should see the video player diff --git a/features/step_definitions/processing_steps.rb b/features/step_definitions/processing_steps.rb index 25be9081..fe352ae9 100644 --- a/features/step_definitions/processing_steps.rb +++ b/features/step_definitions/processing_steps.rb @@ -1,3 +1,7 @@ Given /^everything is indexed$/ do Kor::Elastic.index_all end + +Given /^everything is processed$/ do + Delayed::Worker.new.work_off +end diff --git a/features/step_definitions/web_steps.rb b/features/step_definitions/web_steps.rb index 3653a677..cabde1ea 100644 --- a/features/step_definitions/web_steps.rb +++ b/features/step_definitions/web_steps.rb @@ -331,7 +331,7 @@ page.evaluate_script('window.history.back()') end -When(/^I refresh the page$/) do +When(/^I (?:refresh|reload) the page$/) do page.evaluate_script("window.location.reload()") end