Sha256: 1c47b20f4b4222c71d0cb5e4397b9bbd8287011d8c67044aa6ad9c27896cf66a

Contents?: true

Size: 950 Bytes

Versions: 25

Compression:

Stored size: 950 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

describe 'Sign in' do
  shared_examples 'sign_in' do
    subject do
      visit '/u/t/categoria_de_cosas'
      fill_in 'user_email', with: user.email
      fill_in 'user_password', with: password
      find('input[type=submit]').click
    end

    let(:password) { 'pass1234' }
    let!(:user) { create :user, :owner, password: }

    it do
      subject
      expect(page).to have_text :all, 'No hay ninguna categoría de cosa que mostrar'
    end
  end

  # drivers = %i[
  #   selenium_headless
  #   selenium_chrome_headless
  #   selenium_chrome_headless_notebook
  #   selenium_chrome_headless_iphone
  # ]
  drivers = %i[selenium_chrome_headless_iphone]
  drivers = [ENV['DRIVER'].to_sym] if ENV['DRIVER'].present?

  drivers.each do |driver|
    context("with driver '#{driver}'") do
      before do
        driven_by driver
      end

      it_behaves_like 'sign_in'
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
pg_rails-7.6.28 pg_engine/spec/system/login_spec.rb
pg_rails-7.6.27 pg_engine/spec/system/login_spec.rb
pg_rails-7.6.26 pg_engine/spec/system/login_spec.rb
pg_rails-7.6.25 pg_engine/spec/system/login_spec.rb
pg_rails-7.6.24 pg_engine/spec/system/login_spec.rb
pg_rails-7.6.24.pre.5 pg_engine/spec/system/login_spec.rb
pg_rails-7.6.24.pre.4 pg_engine/spec/system/login_spec.rb
pg_rails-7.6.24.pre.3 pg_engine/spec/system/login_spec.rb
pg_rails-7.6.23 pg_engine/spec/system/login_spec.rb
pg_rails-7.6.22 pg_engine/spec/system/login_spec.rb
pg_rails-7.6.22.pre.3 pg_engine/spec/system/login_spec.rb
pg_rails-7.6.22.pre.2 pg_engine/spec/system/login_spec.rb
pg_rails-7.6.22.pre.1 pg_engine/spec/system/login_spec.rb
pg_rails-7.6.21 pg_engine/spec/system/login_spec.rb
pg_rails-7.6.21.pre.11 pg_engine/spec/system/login_spec.rb
pg_rails-7.6.21.pre.10 pg_engine/spec/system/login_spec.rb
pg_rails-7.6.21.pre.9 pg_engine/spec/system/login_spec.rb
pg_rails-7.6.21.pre.8 pg_engine/spec/system/login_spec.rb
pg_rails-7.6.21.pre.7 pg_engine/spec/system/login_spec.rb
pg_rails-7.6.21.pre.6 pg_engine/spec/system/login_spec.rb