Sha256: 30dcd6495f82c59c09f58f00b64c20cc829704e4c1ae4a2ad774c66b8ad3b1d4

Contents?: true

Size: 1.35 KB

Versions: 28

Compression:

Stored size: 1.35 KB

Contents

# Initially generated with PgRails::SystemSpecGenerator
# https://github.com/martin-rosso/pg_rails

require 'rails_helper'

# By default uses selenium_chrome_headless_iphone driver
# run with DRIVER environment variable to override, eg:
#
# DRIVER=selenium rspec
describe 'Breadcrumbs' do
  let(:cosa) { create :cosa }

  before do
    login_as create :user, :developer

    # just to sort a circumvent a capybara issue
    create_list :cosa, 1, categoria_de_cosa: cosa.categoria_de_cosa
  end

  describe 'some case' do
    it do
      visit "/a/cosas/#{cosa.id}"

      expect(page).to have_css('nav ol.breadcrumb li').exactly(3)
      expect(page).to have_css('nav ol.breadcrumb li a').exactly(1)
    end

    context 'cuando es con nested' do
      it do
        hashid = cosa.categoria_de_cosa.hashid
        visit "/a/categoria_de_cosas/#{hashid}/cosas/#{cosa.id}"

        expect(page).to have_css('nav ol.breadcrumb li').exactly(4)
        expect(page).to have_css('nav ol.breadcrumb li a').exactly(1)
      end
    end

    context 'cuando es con nested y modal' do
      it do
        visit "/a/categoria_de_cosas/#{cosa.categoria_de_cosa.hashid}"
        find_all('td span[title=Ver] a').first.click

        expect(page).to have_css('.modal nav ol.breadcrumb li').exactly(4)
        expect(page).to have_no_css('.modal nav ol.breadcrumb li a')
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

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