Skip to content

Commit

Permalink
Standardize capitalization in admin UI
Browse files Browse the repository at this point in the history
This commit is focused on making the capitalization more consistent
because at the moment it seems very random. I'm sure that this PR will
not solve this issue, as it will be an ongoing effort to improve this
part of the UX, but at least it's a start.
  • Loading branch information
jacobherrington committed Nov 20, 2018
1 parent 854c4a1 commit 4ec3571
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
within_row(1) do
expect(column_text(1)).to eq(shipping_method.name)
expect(column_text(2)).to eq(zone.name)
expect(column_text(3)).to eq("Flat rate")
expect(column_text(3)).to eq("Flat Rate")
expect(column_text(4)).to eq("Yes")
end
end
Expand Down Expand Up @@ -99,7 +99,7 @@ def self.description
click_icon :edit
end

select 'Flexible Rate per package item', from: 'Base Calculator'
select 'Flexible Rate per Package Item', from: 'Base Calculator'

fill_in 'First Item', with: 10
fill_in 'Additional Item', with: 20
Expand Down
2 changes: 1 addition & 1 deletion backend/spec/features/admin/orders/listing_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
within_row(1) { expect(page).to have_content("R100") }
within_row(2) { expect(page).to have_content("R200") }

click_link "Completed At", exact: false
click_link "Completed at", exact: false

# Completed at desc
within_row(1) { expect(page).to have_content("R200") }
Expand Down
2 changes: 1 addition & 1 deletion backend/spec/features/admin/orders/order_details_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@
it 'should not allow a shipment to split stock to itself' do
visit spree.edit_admin_order_path(order)
within('tr', text: line_item.sku) { click_icon 'arrows-h' }
click_on 'Choose location'
click_on 'Choose Location'
within '.select2-results' do
expect(page).to have_content(shipment2.number)
expect(page).not_to have_content(shipment1.number)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def adjust_count_on_hand(count_on_hand)
find(:css, "input[type='number']").set(count_on_hand)
click_icon :check
end
expect(page).to have_content('Updated successfully')
expect(page).to have_content('Updated Successfully')
end

context "with stock locations that don't have stock items for variant yet" do
Expand Down
12 changes: 6 additions & 6 deletions backend/spec/features/admin/promotion_adjustments_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
click_button "Create"
expect(page).to have_title("SAVE SAVE SAVE - Promotions")

select "Item total", from: "Discount rules"
select "Item Total", from: "Discount Rules"
within('#rule_fields') { click_button "Add" }

find('[id$=_preferred_amount]').set(30)
Expand Down Expand Up @@ -81,7 +81,7 @@
click_button "Create"
expect(page).to have_title("SAVE SAVE SAVE - Promotions")

select "Item total", from: "Discount rules"
select "Item Total", from: "Discount Rules"
within('#rule_fields') { click_button "Add" }

find('[id$=_preferred_amount]').set(30)
Expand Down Expand Up @@ -118,7 +118,7 @@
click_button "Create"
expect(page).to have_title("SAVE SAVE SAVE - Promotions")

select "Product(s)", from: "Discount rules"
select "Product(s)", from: "Discount Rules"
within("#rule_fields") { click_button "Add" }
select2_search "RoR Mug", from: "Choose products"
within('#rule_fields') { click_button "Update" }
Expand Down Expand Up @@ -152,12 +152,12 @@
click_button "Create"
expect(page).to have_title("SAVE SAVE SAVE - Promotions")

select "Item total", from: "Discount rules"
select "Item Total", from: "Discount Rules"
within('#rule_fields') { click_button "Add" }
find('[id$=_preferred_amount]').set(30)
within('#rule_fields') { click_button "Update" }

select "Free shipping", from: "Adjustment type"
select "Free Shipping", from: "Adjustment type"
within('#action_fields') { click_button "Add" }
expect(page).to have_content('Makes all shipments for the order free')

Expand Down Expand Up @@ -205,7 +205,7 @@
click_button "Create"
expect(page).to have_title("SAVE SAVE SAVE - Promotions")

select "Item total", from: "Discount rules"
select "Item Total", from: "Discount Rules"
within('#rule_fields') { click_button "Add" }
find('[id$=_preferred_amount]').set(50)
within('#rule_fields') { click_button "Update" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
end

scenario "adding an option value rule", js: true do
select "Option Value(s)", from: "Discount rules"
select "Option Value(s)", from: "Discount Rules"
within("#rules_container") { click_button "Add" }

within("#rules_container .promotion-block") do
Expand Down Expand Up @@ -46,7 +46,7 @@
option_value.update!(name: xss_string)
end
scenario "adding an option value rule", js: true do
select "Option Value(s)", from: "Discount rules"
select "Option Value(s)", from: "Discount Rules"
within("#rules_container") { click_button "Add" }

within("#rules_container .promotion-block") do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
given(:promotion) { create :promotion }

def add_promotion_rule_of_type(type)
select type, from: "Discount rules"
select type, from: "Discount Rules"
within("#rules_container") { click_button "Add" }
end

Expand Down
4 changes: 2 additions & 2 deletions backend/spec/features/admin/promotions/user_rule_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
let!(:other_user) { create(:user, email: '[email protected]') }

scenario "searching a user" do
select "User", from: "Discount rules"
select "User", from: "Discount Rules"
within("#rules_container") { click_button "Add" }

select2_search "foo", from: "Choose users", select: false
Expand All @@ -31,7 +31,7 @@
given!(:user) { create(:user, email: xss_string) }

scenario "adding an option value rule" do
select "User", from: "Discount rules"
select "User", from: "Discount Rules"
within("#rules_container") { click_button "Add" }

select2_search "<script>", from: "Choose users"
Expand Down
2 changes: 1 addition & 1 deletion backend/spec/features/admin/reimbursements_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
expect(page).to have_css('table thead tr th', text: 'Product')
expect(page).to have_css('table thead tr th', text: 'Preferred Reimbursement Type')
expect(page).to have_css('table thead tr th', text: 'Reimbursement Type Override')
expect(page).to have_css('table thead tr th', text: 'Exchange for')
expect(page).to have_css('table thead tr th', text: 'Exchange For')
expect(page).to have_css('table thead tr th', text: 'Amount Before Sales Tax')
expect(page).to have_css('table thead tr th', text: 'Total')
end
Expand Down
2 changes: 1 addition & 1 deletion backend/spec/support/feature/order_feature_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def complete_split_to(destination, quantity: nil)
destination = destination.name
end

select2_no_label(destination, from: 'Choose location')
select2_no_label(destination, from: 'Choose Location')

if quantity
fill_in 'item_quantity', with: quantity
Expand Down
Loading

0 comments on commit 4ec3571

Please sign in to comment.