Sha256: fe4169c062dc95eab3da6057fb439f86b9cc64942378203f2a3f04caca7d2f58

Contents?: true

Size: 1.15 KB

Versions: 3

Compression:

Stored size: 1.15 KB

Contents

#!/usr/bin/env bash
set -eo pipefail

echo '--- testing rails 3.2'

echo '-- setting environment'
export DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export RAILS_ENV=test
export BUNDLE_GEMFILE="$DIR/Gemfile"
cd $DIR

echo '-- bundle install'
bundle --version
bundle install --quiet --gemfile="$DIR/Gemfile" --retry 2 --path vendor/bundle

echo '-- cypress install'
bundle exec ./bin/rails g cypress_on_rails:install --install_cypress --install_playwright --install_with=npm
rm -vf cypress/e2e/rails_examples/advance_factory_bot.cy.js
rm -vf cypress/e2e/rails_examples/using_vcr.cy.js

echo '-- start rails server'
# make sure the server is not running
(kill -9 `cat tmp/pids/server.pid` || true )

bundle exec ./bin/rails server -p 5017 -e test &
sleep 2 # give rails a chance to start up correctly

echo '-- cypress run'
cp -fv ../cypress.config.js .
# if [ -z $CYPRESS_RECORD_KEY ]
# then
#     node_modules/.bin/cypress run
# else
    node_modules/.bin/cypress run --record
# fi

echo '-- playwright run'
cp -fv ../playwright.config.js .
npx playwright install-deps
npx playwright test playwright/e2e/

echo '-- stop rails server'
kill -9 `cat tmp/pids/server.pid`

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cypress-on-rails-1.16.0 specs_e2e/rails_3_2/test.sh
cypress-on-rails-1.15.1 specs_e2e/rails_3_2/test.sh
cypress-on-rails-1.15.0 specs_e2e/rails_3_2/test.sh