Skip to content

Commit 4bcf0bc

Browse files
committed
Add feature tests for sorting
1 parent 166a97f commit 4bcf0bc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

admin/spec/features/product_spec.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# frozen_string_literal: true
22

33
require 'spec_helper'
4+
require "solidus_admin/testing_support/shared_examples/moveable"
45

56
describe "Product", type: :feature do
67
before do
@@ -113,5 +114,14 @@
113114
expect(page).to have_current_path("/admin/option_types")
114115
end
115116
end
117+
118+
it_behaves_like "features: sortable" do
119+
let(:product) { create(:product) }
120+
let(:factory) { :option_type }
121+
let(:factory_attrs) { { products: [product] } }
122+
let(:displayed_attribute) { :name }
123+
let(:handle) { ".handle" }
124+
let(:path) { solidus_admin.product_path(product) }
125+
end
116126
end
117127
end

0 commit comments

Comments
 (0)