Sha256: ba7d5017631bac3cb8b54bc6b9510c0def081f3a39e2355b3fa6c2c7b1b45c14

Contents?: true

Size: 1.15 KB

Versions: 43

Compression:

Stored size: 1.15 KB

Contents

require 'spec_helper'

describe "Taxonomies and taxons", type: :feature do
  stub_authorization!

  it "admin should be able to edit taxon" do
    visit spree.new_admin_taxonomy_path

    fill_in "Name", with: "Hello"
    click_button "Create"

    @taxonomy = Spree::Taxonomy.last

    visit spree.edit_admin_taxonomy_taxon_path(@taxonomy, @taxonomy.root.id)

    fill_in "taxon_name", with: "Shirt"
    fill_in "taxon_description", with: "Discover our new rails shirts"

    fill_in "permalink_part", with: "shirt-rails"
    click_button "Update"
    expect(page).to have_content("Taxon \"Shirt\" has been successfully updated!")
  end

  it "can view and add to taxon tree", js: true do
    taxonomy = create :taxonomy

    visit spree.edit_admin_taxonomy_path(taxonomy)
    expect(page).to have_content('Brand')

    click_on('Add taxon')
    expect(page).to have_content('New node')

    # Little tricky to select the right taxon. Since the text is technically
    # inside the top-level li.
    within '#taxonomy_tree li li', text: 'New node' do
      click_icon :edit
    end

    expect(page).to have_current_path %r{/admin/taxonomies/\d+/taxons/\d+/edit}
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
solidus_backend-2.5.2 spec/features/admin/taxons_spec.rb
solidus_backend-2.5.1 spec/features/admin/taxons_spec.rb
solidus_backend-2.5.0 spec/features/admin/taxons_spec.rb
solidus_backend-2.5.0.rc1 spec/features/admin/taxons_spec.rb
solidus_backend-2.5.0.beta2 spec/features/admin/taxons_spec.rb
solidus_backend-2.5.0.beta1 spec/features/admin/taxons_spec.rb
solidus_backend-2.4.2 spec/features/admin/taxons_spec.rb
solidus_backend-2.4.1 spec/features/admin/taxons_spec.rb
solidus_backend-2.3.1 spec/features/admin/taxons_spec.rb
solidus_backend-2.2.2 spec/features/admin/taxons_spec.rb
solidus_backend-2.1.1 spec/features/admin/taxons_spec.rb
solidus_backend-2.0.3 spec/features/admin/taxons_spec.rb
solidus_backend-1.4.2 spec/features/admin/taxons_spec.rb
solidus_backend-1.3.2 spec/features/admin/taxons_spec.rb
solidus_backend-2.4.0 spec/features/admin/taxons_spec.rb
solidus_backend-2.4.0.rc1 spec/features/admin/taxons_spec.rb
solidus_backend-2.4.0.beta1 spec/features/admin/taxons_spec.rb
solidus_backend-2.3.0 spec/features/admin/taxons_spec.rb
solidus_backend-2.3.0.rc3 spec/features/admin/taxons_spec.rb
solidus_backend-2.3.0.rc2 spec/features/admin/taxons_spec.rb