Sha256: b4f3fb6cb8fa89b5c3978a2f76901bf718b30e076b5c8b6760690c6da62b922f

Contents?: true

Size: 1.12 KB

Versions: 55

Compression:

Stored size: 1.12 KB

Contents

require 'test_helper'

module Workarea
  module Admin
    class TaxonomySystemTest < SystemTest
      include Admin::IntegrationTest

      def test_management
        visit admin.navigation_taxons_path
        page.find('.menu-editor__add-item-button--last-position').click

        fill_in 'taxon[name]', with: 'First Taxon'
        fill_in 'taxon[url]', with: '/test'
        click_button 'create_taxon'

        assert(page.has_content?('Success'))
        assert(page.has_content?('First Taxon'))


        click_link 'First Taxon'
        wait_for_xhr
        within '.menu-editor__menu:last-child' do
          page.find('.menu-editor__add-item-button--last-position').click
        end

        fill_in 'taxon[name]', with: 'Second Taxon'
        fill_in 'taxon[url]', with: '/test'
        click_button 'create_taxon'

        assert(page.has_content?('Success'))
        assert(page.has_content?('Second Taxon'))

        click_button 'remove_taxon', match: :first

        assert(page.has_content?('Success'))
        refute(page.has_content?('First Taxon'))
        refute(page.has_content?('Second Taxon'))
      end
    end
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
workarea-admin-3.4.33 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.5.11 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.5.10 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.4.32 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.5.9 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.4.31 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.5.8 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.4.30 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.5.7 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.4.29 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.5.6 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.4.28 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.5.5 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.4.27 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.5.4 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.4.26 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.5.3 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.4.25 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.5.2 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.4.24 test/system/workarea/admin/taxonomy_system_test.rb