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.45 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.4.44 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.4.43 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.4.42 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.4.41 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.5.19 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.4.40 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.5.18 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.4.39 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.5.17 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.4.38 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.5.16 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.4.37 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.5.15 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.4.36 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.5.14 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.4.35 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.5.13 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.4.34 test/system/workarea/admin/taxonomy_system_test.rb
workarea-admin-3.5.12 test/system/workarea/admin/taxonomy_system_test.rb