Skip to content

Commit a40c3a0

Browse files
committed
test
1 parent 42b3141 commit a40c3a0

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

lib/algora_web/components/layouts/user.html.heex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@
169169
>
170170
<span class="relative text-sm font-semibold">Docs</span>
171171
</.link>
172+
<div>
173+
<%= live_render(@socket, AlgoraWeb.Activity.UserNavTimelineLive, id: "activity-timeline", session: %{}, sticky: true, assigns: %{current_user: @current_user}) %>
174+
</div>
172175
<%= if @current_user do %>
173176
<div>
174177
<.dropdown2 id="dashboard-dropdown">

lib/algora_web/live/admin/company_analytics_live.ex

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ defmodule AlgoraWeb.Admin.CompanyAnalyticsLive do
22
@moduledoc false
33
use AlgoraWeb, :live_view
44

5+
alias Algora.Activities
56
alias Algora.Analytics
67

8+
import AlgoraWeb.Components.Activity
9+
710
def mount(_params, _session, socket) do
811
analytics = Analytics.get_company_analytics()
912
funnel_data = Analytics.get_funnel_data()
@@ -12,7 +15,10 @@ defmodule AlgoraWeb.Admin.CompanyAnalyticsLive do
1215
socket
1316
|> assign(:analytics, analytics)
1417
|> assign(:funnel_data, funnel_data)
15-
|> assign(:selected_period, "30d")}
18+
|> assign(:selected_period, "30d")
19+
|> stream(:activities, [])
20+
|> start_async(:get_activities, fn -> Activities.all() end)}
21+
1622
end
1723

1824
def render(assigns) do

test/algora/bounties_test.exs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,14 @@ defmodule Algora.BountiesTest do
4444
amount: amount
4545
}
4646

47-
{:ok, bounty} = Algora.Bounties.create_bounty(bounty_params, [])
48-
{:ok, tip} = Algora.Bounties.create_tip(%{amount: amount, owner: owner, creator: creator, recipient: creator})
47+
assert {:ok, bounty} = Algora.Bounties.create_bounty(bounty_params, [])
4948

50-
assert bounty
51-
assert tip
49+
assert {:ok, tip} =
50+
Algora.Bounties.create_tip(%{amount: amount, owner: owner, creator: creator, recipient: creator})
5251

53-
assert_activity_names([])
54-
assert_activity_names_for_user(creator.id, [])
55-
assert_activity_names_for_user(owner.id, [])
52+
assert_activity_names([:bounty_posted, :tip_awarded])
53+
assert_activity_names_for_user(creator.id, [:bounty_posted, :tip_awarded])
54+
assert_activity_names_for_user(owner.id, [:bounty_posted, :tip_awarded])
5655
end
5756

5857
test "query" do

0 commit comments

Comments
 (0)