From 85e063ada66874e09489b548da9e3ef70e9c406a Mon Sep 17 00:00:00 2001
From: Kerdo Kurs <kerdokurs@gmail.com>
Date: Sun, 10 Nov 2024 14:13:06 +0200
Subject: [PATCH] minor changes for #11

---
 config/test.exs                               |  2 +-
 features/accessing_root.feature               |  8 ------
 features/config.exs                           |  4 ---
 .../contexts/user_registration_context.exs    |  2 +-
 features/contexts/white_bread_context.exs     | 28 -------------------
 .../controllers/register_html/index.html.heex |  7 +++--
 6 files changed, 6 insertions(+), 45 deletions(-)
 delete mode 100644 features/accessing_root.feature
 delete mode 100644 features/contexts/white_bread_context.exs

diff --git a/config/test.exs b/config/test.exs
index 392ca3d..922b66c 100644
--- a/config/test.exs
+++ b/config/test.exs
@@ -37,5 +37,5 @@ config :phoenix_live_view,
   enable_expensive_runtime_checks: true
 
 
-config :hound, driver: "chrome_driver", port: 54833
+config :hound, driver: "chrome_driver", port: 9999
 config :proptrackr, sql_sandbox: true
diff --git a/features/accessing_root.feature b/features/accessing_root.feature
deleted file mode 100644
index af39a29..0000000
--- a/features/accessing_root.feature
+++ /dev/null
@@ -1,8 +0,0 @@
-Feature: Homepage Access
-  As a website visitor
-  Such that I can see the website is working
-  I want to access the homepage
-
-  Scenario: Visiting the homepage
-    When I visit the homepage
-    Then I should see the welcome message
diff --git a/features/config.exs b/features/config.exs
index 4318663..3f4b67c 100644
--- a/features/config.exs
+++ b/features/config.exs
@@ -1,10 +1,6 @@
 defmodule WhiteBreadConfig do
   use WhiteBread.SuiteConfiguration
 
-  suite name:          "All",
-        context:       WhiteBreadContext,
-        feature_paths: ["features/"]
-
   suite name:          "User Registration Features",
         context:       UserRegistrationContext,
         feature_paths: ["features/"]
diff --git a/features/contexts/user_registration_context.exs b/features/contexts/user_registration_context.exs
index 5176836..8690d42 100644
--- a/features/contexts/user_registration_context.exs
+++ b/features/contexts/user_registration_context.exs
@@ -19,7 +19,7 @@ defmodule UserRegistrationContext do
 
   scenario_finalize fn _status, _state ->
     Ecto.Adapters.SQL.Sandbox.checkin(PropTrackr.Repo)
-    # Hound.end_session()
+    Hound.end_session()
   end
 
   given_ ~r/^I am on the registration page$/, fn state ->
diff --git a/features/contexts/white_bread_context.exs b/features/contexts/white_bread_context.exs
deleted file mode 100644
index fb83546..0000000
--- a/features/contexts/white_bread_context.exs
+++ /dev/null
@@ -1,28 +0,0 @@
-defmodule WhiteBreadContext do
-  use WhiteBread.Context
-  use Hound.Helpers
-
-  feature_starting_state fn ->
-    Application.ensure_all_started(:hound)
-    %{}
-  end
-
-  scenario_starting_state fn _state ->
-    Hound.start_session
-    %{}
-  end
-
-  scenario_finalize fn _status, _state ->
-    Hound.end_session
-  end
-
-  when_ ~r/^I visit the homepage$/, fn state ->
-    navigate_to "/"
-    {:ok, state}
-  end
-
-  then_ ~r/^I should see the welcome message$/, fn state ->
-    assert visible_in_page? ~r/Peace of mind from prototype to production./
-    {:ok, state}
-  end
-end
diff --git a/lib/proptrackr_web/controllers/register_html/index.html.heex b/lib/proptrackr_web/controllers/register_html/index.html.heex
index 23844d0..dacc5ce 100644
--- a/lib/proptrackr_web/controllers/register_html/index.html.heex
+++ b/lib/proptrackr_web/controllers/register_html/index.html.heex
@@ -12,11 +12,12 @@
   <.input field={f[:phone_number]} type="text" label="Phone number" />
   <.input field={f[:bio]} type="text" label="Bio" />
   <.input field={f[:email]} type="text" label="Email" />
-  <.input field={f[:password]} type="text" label="Password" />
-  <.input field={f[:confirm_password]} type="text" label="Confirm password" />
+  <.input field={f[:password]} type="password" label="Password" />
+  <.input field={f[:confirm_password]} type="password" label="Confirm password" />
   <:actions>
     <.button id="register_button">Register</.button>
   </:actions>
 </.simple_form>
 
-<.back navigate={~p"/users"}>Already have account</.back>
\ No newline at end of file
+<.back navigate={~p"/users"}>Already have account</.back>
+
-- 
GitLab