Sha256: ff5ee0127a9c8ba76a8020d3280b3570e3337ae20bbac7fea05c834b8db2bca4

Contents?: true

Size: 1.49 KB

Versions: 9

Compression:

Stored size: 1.49 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
  subject(:visitar) do
    visit path
  end

  let(:path) { "/admin/cosas/#{cosa.id}" }
  let(:cosa) { create :cosa }
  let(:logged_user) { create :user, :developer }
  let(:account) { logged_user.current_account }

  before do
    login_as logged_user
  end

  describe 'some case' do
    it do
      visitar

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

    context 'cuando es con nested' do
      let(:path) do
        hashid = cosa.categoria_de_cosa.hashid
        "/admin/categoria_de_cosas/#{hashid}/cosas/#{cosa.id}"
      end

      it do
        visitar

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

    context 'cuando es con nested y modal' do
      let(:path) do
        hashid = cosa.categoria_de_cosa.hashid
        "/admin/categoria_de_cosas/#{hashid}"
      end

      it do
        visitar
        find('td span[title=Ver] a').click

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pg_rails-7.4.3 pg_engine/spec/system/breadcrumbs_spec.rb
pg_rails-7.4.2 pg_engine/spec/system/breadcrumbs_spec.rb
pg_rails-7.4.1 pg_engine/spec/system/breadcrumbs_spec.rb
pg_rails-7.4.0 pg_engine/spec/system/breadcrumbs_spec.rb
pg_rails-7.3.5 pg_engine/spec/system/breadcrumbs_spec.rb
pg_rails-7.3.4 pg_engine/spec/system/breadcrumbs_spec.rb
pg_rails-7.3.3 pg_engine/spec/system/breadcrumbs_spec.rb
pg_rails-7.3.2 pg_engine/spec/system/breadcrumbs_spec.rb
pg_rails-7.3.1 pg_engine/spec/system/breadcrumbs_spec.rb