From 856165312186f0386c6ef392f9fea2b51acc6bfb Mon Sep 17 00:00:00 2001 From: aguspe Date: Tue, 23 Jul 2024 12:07:54 +0200 Subject: [PATCH] Try a different way --- .github/workflows/rspec_selenium.yml | 10 ++-------- .github/workflows/rspec_watir.yml | 28 ---------------------------- spec/system/selenium_rspec_spec.rb | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 36 deletions(-) delete mode 100644 .github/workflows/rspec_watir.yml create mode 100644 spec/system/selenium_rspec_spec.rb diff --git a/.github/workflows/rspec_selenium.yml b/.github/workflows/rspec_selenium.yml index 7ce29c5..5305a42 100644 --- a/.github/workflows/rspec_selenium.yml +++ b/.github/workflows/rspec_selenium.yml @@ -18,11 +18,5 @@ jobs: - name: Install gems run: bundle install - - name: Create Raider framework - run: bin/raider new rspec_watir -p framework:rspec automation:watir - - - name: Setup Raider tests - run: cd rspec_watir && bundle install && raider utility browser_options chrome headless - - - name: Run Raider tests - run: cd rspec_watir && rspec spec/ + - name: Build and run system tests + run: spec spec/system/selenium_rspec_spec.rb diff --git a/.github/workflows/rspec_watir.yml b/.github/workflows/rspec_watir.yml deleted file mode 100644 index 2a85b61..0000000 --- a/.github/workflows/rspec_watir.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Rspec Watir Test on Ubuntu -on: [ pull_request ] - -jobs: - build: - name: Watir-Rspec pipeline - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.1.0 - - - name: Install gems - run: bundle install - - - name: Create Raider framework - run: bin/raider new rspec_watir -p framework:rspec automation:watir - - - name: Setup Raider tests - run: cd rspec_watir && bundle install && raider utility browser_options chrome headless - - - name: Run Raider tests - run: cd rspec_watir && rspec spec/ diff --git a/spec/system/selenium_rspec_spec.rb b/spec/system/selenium_rspec_spec.rb new file mode 100644 index 0000000..6f68d2a --- /dev/null +++ b/spec/system/selenium_rspec_spec.rb @@ -0,0 +1,15 @@ +require_relative '../../lib/ruby_raider' + +describe 'Selenium and Rspec framework' do + before do + RubyRaider::Raider.new.invoke(:new, nil, %w[selenium_rspec -p framework:rspec automation:selenium]) + end + + after do + FileUtils.rm_rf('selenium_rspec') + end + + it 'creates a selenium and rspec framework' do + system('cd selenium_rspec && bundle install && raider utility browser_options chrome headless && bundle exec rspec') + end +end