* fix; remove the bottom 100% * dashboard * fixes + magic border-radius * everything * fix * fix * spec * split PRs * Update app/assets/stylesheets/views/listings.scss Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com> Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
30 lines
633 B
Ruby
30 lines
633 B
Ruby
require "rails_helper"
|
|
|
|
RSpec.describe "Dashboard", type: :system, js: true do
|
|
let(:user) { create(:user) }
|
|
let(:listing) { create(:listing) }
|
|
|
|
before do
|
|
sign_in user
|
|
end
|
|
|
|
context "when looking at analytics counters" do
|
|
it "shows the count of unspent credits" do
|
|
Credit.add_to(user, 2)
|
|
|
|
Credits::Buyer.call(
|
|
purchaser: user,
|
|
purchase: listing,
|
|
cost: 1,
|
|
)
|
|
Credit.counter_culture_fix_counts
|
|
user.reload
|
|
|
|
visit dashboard_path
|
|
|
|
within "main#main-content > header" do
|
|
expect(page).to have_text(/1\nCredits available/)
|
|
end
|
|
end
|
|
end
|
|
end
|