diff --git a/.gitignore b/.gitignore index a997124bf..c61ccee1f 100644 --- a/.gitignore +++ b/.gitignore @@ -87,3 +87,7 @@ bundle_finished # Auto-generated Storybook stories app/javascript/generated_stories/ + +# Cypress test run artifacts +cypress/videos +cypress/screenshots diff --git a/.travis.yml b/.travis.yml index 49ecc6963..ff68d3f42 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,8 @@ addons: paths: - $(ls tmp/screenshots/*.png | tr "\n" ":") - $(ls tmp/csvs/*.csv | tr "\n" ":") + - $(ls cypress/screenshots/*.* | tr "\n" ":") + - $(ls cypress/videos/*.* | tr "\n" ":") debug: true services: - redis @@ -67,6 +69,12 @@ script: - if [ "$KNAPSACK_PRO_CI_NODE_INDEX" == "1" ]; then bundle exec bundle-audit check --update --ignore CVE-2015-9284; fi - if [ "$KNAPSACK_PRO_CI_NODE_INDEX" == "1" ]; then yarn build-storybook; fi - if [ "$KNAPSACK_PRO_CI_NODE_INDEX" == "2" ]; then bin/test-console-check; fi + - yarn e2e:ci + # Dropping and recreating the database for Capybara/rspecs + - export FOREM_OWNER_SECRET="secret" + - bundle exec rails db:drop + - bundle exec rails db:create + - bundle exec rails db:schema:load - 'bin/knapsack_pro_rspec' - '[ ! -f .approvals ] || bundle exec approvals verify --ask false' after_script: diff --git a/app/views/shared/authentication/_email_registration_form.html.erb b/app/views/shared/authentication/_email_registration_form.html.erb index 27449361d..09e11974c 100644 --- a/app/views/shared/authentication/_email_registration_form.html.erb +++ b/app/views/shared/authentication/_email_registration_form.html.erb @@ -4,9 +4,9 @@ <%= flash[:notice] %> <% end %> - <%= form_for(User.new, as: :user, url: registration_path(:user)) do |f| %> + <%= form_for(User.new, as: :user, data: { testid: "registration-form" }, url: registration_path(:user)) do |f| %> <% if defined?(resource) && resource&.errors&.any? %> -