mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-09 15:35:22 +02:00
Flakey test fix
This commit is contained in:
parent
daaf6abe74
commit
44f24e68dd
3 changed files with 7 additions and 8 deletions
|
@ -8,11 +8,10 @@
|
|||
<% desktop_nav_items = mobile_nav_items.reject { |item| item[:mobile_only] } %>
|
||||
|
||||
<%= render "layouts/shared/htmldoc" do %>
|
||||
<div
|
||||
<div
|
||||
class="flex flex-col lg:flex-row h-dvh lg:h-full bg-surface"
|
||||
data-controller="app-layout"
|
||||
data-app-layout-user-id-value="<%= Current.user.id %>"
|
||||
>
|
||||
data-app-layout-user-id-value="<%= Current.user.id %>">
|
||||
<div
|
||||
class="hidden fixed inset-0 bg-surface z-20 h-dvh w-full p-3 overflow-y-auto transition-all duration-300"
|
||||
data-app-layout-target="mobileSidebar">
|
||||
|
@ -119,4 +118,4 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -17,4 +17,4 @@
|
|||
<%= name %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -29,12 +29,12 @@ class TradesTest < ApplicationSystemTestCase
|
|||
visit_trades
|
||||
|
||||
within_trades do
|
||||
assert_text "Purchase 10 shares of AAPL"
|
||||
assert_text "Buy #{shares_qty} shares of AAPL"
|
||||
end
|
||||
end
|
||||
|
||||
test "can create sell transaction" do
|
||||
qty = 10
|
||||
aapl = @account.holdings.find { |h| h.security.ticker == "AAPL" }
|
||||
|
||||
open_new_trade_modal
|
||||
|
@ -42,7 +42,7 @@ class TradesTest < ApplicationSystemTestCase
|
|||
select "Sell", from: "Type"
|
||||
fill_in "Ticker symbol", with: aapl.ticker
|
||||
fill_in "Date", with: Date.current
|
||||
fill_in "Quantity", with: aapl.qty
|
||||
fill_in "Quantity", with: qty
|
||||
fill_in "entry[price]", with: 215.33
|
||||
|
||||
click_button "Add transaction"
|
||||
|
@ -50,7 +50,7 @@ class TradesTest < ApplicationSystemTestCase
|
|||
visit_trades
|
||||
|
||||
within_trades do
|
||||
assert_text "Sell #{aapl.qty.round} shares of AAPL"
|
||||
assert_text "Sell #{qty} shares of AAPL"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue