Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v4.3] Use Order#email to show the order's email in new admin #6007

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def customer_column
col: { class: "w-[400px]" },
header: :customer,
data: ->(order) do
customer_email = order.user&.email
customer_email = order.email
content_tag :div, String(customer_email)
end
}
Expand Down
16 changes: 16 additions & 0 deletions admin/spec/features/orders/index_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# frozen_string_literal: true

require 'spec_helper'

describe "Orders", type: :feature do
before { sign_in create(:admin_user, email: '[email protected]') }

it "lists orders", :js do
create(:order, number: "R123456789", total: 19.99)

visit "/admin/orders"
click_on "In Progress"

expect(page).to have_content("[email protected]")
end
end
Loading