Co-authored-by: jimmay5469 <jimmay5469@gmail.com>
pull/136/head
katibest 7 years ago
parent 6b59f0cf21
commit f6fd0b88e6
  1. 2
      apps/explorer_web/lib/explorer_web/templates/address_transaction/index.html.eex
  2. 12
      apps/explorer_web/lib/explorer_web/templates/layout/app.html.eex
  3. 9
      apps/explorer_web/test/explorer_web/features/contributor_browsing_test.exs

@ -27,7 +27,7 @@
</h2>
</div>
<div class="dropdown u-float-right u-push-sm-right u-push-sm-bottom">
<button data-test="filterDropdown" class="button button--secondary dropdown-toggle" type="button"
<button data-test="filter_dropdown" class="button button--secondary dropdown-toggle" type="button"
id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Filter: <%= format_current_filter(@filter) %>
</button>

@ -19,7 +19,7 @@
<!-- Sidebar Holder -->
<nav id="sidebar" class="sticky fixed-top">
<div class="sidebar-header">
<a href="<%= chain_path(@conn, :show) %>">
<a href="<%= chain_path(@conn, :show) %>" data-test="header_logo" >
<img class="" src="<%= static_path(@conn, "/images/logo.svg") %>" />
</a>
</div>
@ -50,7 +50,7 @@
<div id="content" class="size-content">
<div class="content-header sticky fixed-top">
<nav>
<button type="button" id="sidebarCollapse" class="navbar-btn">
<button type="button" id="sidebarCollapse" class="navbar-btn" data-test="hamburger_menu_button">
<span></span>
<span></span>
<span></span>
@ -70,9 +70,11 @@
</header>
</div>
<div class="content-container">
<p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p>
<p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
<%= render @view_module, @view_template, assigns %>
<main>
<p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p>
<p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
<%= render @view_module, @view_template, assigns %>
</main>
</div>
<!-- <%= render ExplorerWeb.LayoutView, "_footer.html", assigns %> -->
</div>

@ -5,14 +5,14 @@ defmodule ExplorerWeb.UserListTest do
alias Explorer.Chain.{Credit, Debit}
@logo css("img.header__logo")
@logo css("[data-test='header_logo']")
test "browses the home page", %{session: session} do
session |> visit("/")
assert current_path(session) == "/en"
session
|> assert_has(css(".header__logo"))
|> click(css("[data-test='hamburger_menu_button']"))
|> click(@logo)
|> assert_has(css("main", text: "Blocks"))
end
@ -91,6 +91,7 @@ defmodule ExplorerWeb.UserListTest do
|> assert_has(css(".blocks__column--gas-used", count: 5, text: "10"))
session
|> click(css("[data-test='hamburger_menu_button']"))
|> click(link("Blocks"))
|> assert_has(css(".blocks__column--height", text: "311"))
|> click(link("311"))
@ -243,7 +244,7 @@ defmodule ExplorerWeb.UserListTest do
test "can filter to only see transactions to an address", %{session: session} do
session
|> visit("/en/addresses/0xlincoln")
|> click(css("[data-test='filterDropdown']", text: "Filter: All"))
|> click(css("[data-test='filter_dropdown']", text: "Filter: All"))
|> click(css(".address__link", text: "To"))
|> assert_has(css(".transactions__link--long-hash", text: "0xSk8"))
|> refute_has(css(".transactions__link--long-hash", text: "0xrazerscooter"))
@ -252,7 +253,7 @@ defmodule ExplorerWeb.UserListTest do
test "can filter to only see transactions from an address", %{session: session} do
session
|> visit("/en/addresses/0xlincoln")
|> click(css("[data-test='filterDropdown']", text: "Filter: All"))
|> click(css("[data-test='filter_dropdown']", text: "Filter: All"))
|> click(css(".address__link", text: "From"))
|> assert_has(css(".transactions__link--long-hash", text: "0xrazerscooter"))
|> refute_has(css(".transactions__link--long-hash", text: "0xSk8"))

Loading…
Cancel
Save