From 981f97249c284014caa007b1b85e3f1814a2a0e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mateusz=20=C5=BBebrak?= <mzebrak@syncad.com>
Date: Mon, 10 Mar 2025 11:41:03 +0100
Subject: [PATCH] Rename CreateProfileFormScreen ->
 ProfileCredentialsFormScreen

---
 .../__private/ui/forms/create_profile/create_profile_form.py  | 4 ++--
 ...file_form_screen.py => profile_credentials_form_screen.py} | 4 ++--
 ..._form_screen.scss => profile_credentials_form_screen.scss} | 2 +-
 tests/tui/test_create_profile.py                              | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)
 rename clive/__private/ui/forms/create_profile/{create_profile_form_screen.py => profile_credentials_form_screen.py} (95%)
 rename clive/__private/ui/forms/create_profile/{create_profile_form_screen.scss => profile_credentials_form_screen.scss} (81%)

diff --git a/clive/__private/ui/forms/create_profile/create_profile_form.py b/clive/__private/ui/forms/create_profile/create_profile_form.py
index 05e89b379e..434e39dfd7 100644
--- a/clive/__private/ui/forms/create_profile/create_profile_form.py
+++ b/clive/__private/ui/forms/create_profile/create_profile_form.py
@@ -1,8 +1,8 @@
 from __future__ import annotations
 
 from clive.__private.core.profile import Profile
-from clive.__private.ui.forms.create_profile.create_profile_form_screen import CreateProfileFormScreen
 from clive.__private.ui.forms.create_profile.new_key_alias_form_screen import NewKeyAliasFormScreen
+from clive.__private.ui.forms.create_profile.profile_credentials_form_screen import ProfileCredentialsFormScreen
 from clive.__private.ui.forms.create_profile.set_account_form_screen import SetAccountFormScreen
 from clive.__private.ui.forms.create_profile.welcome_form_screen import CreateProfileWelcomeFormScreen
 from clive.__private.ui.forms.form import ComposeFormResult, Form
@@ -19,7 +19,7 @@ class CreateProfileForm(Form):
     def compose_form(self) -> ComposeFormResult:
         if not Profile.is_any_profile_saved():
             yield CreateProfileWelcomeFormScreen
-        yield CreateProfileFormScreen
+        yield ProfileCredentialsFormScreen
         yield SetAccountFormScreen
         yield NewKeyAliasFormScreen
 
diff --git a/clive/__private/ui/forms/create_profile/create_profile_form_screen.py b/clive/__private/ui/forms/create_profile/profile_credentials_form_screen.py
similarity index 95%
rename from clive/__private/ui/forms/create_profile/create_profile_form_screen.py
rename to clive/__private/ui/forms/create_profile/profile_credentials_form_screen.py
index 4e19c8bec3..f693f72758 100644
--- a/clive/__private/ui/forms/create_profile/create_profile_form_screen.py
+++ b/clive/__private/ui/forms/create_profile/profile_credentials_form_screen.py
@@ -21,7 +21,7 @@ if TYPE_CHECKING:
     from clive.__private.ui.forms.form import Form
 
 
-class CreateProfileFormScreen(BaseScreen, FormScreen):
+class ProfileCredentialsFormScreen(BaseScreen, FormScreen):
     BINDINGS = [Binding("f1", "help", "Help")]
     CSS_PATH = [get_relative_css_path(__file__)]
     BIG_TITLE = "create profile"
@@ -45,7 +45,7 @@ class CreateProfileFormScreen(BaseScreen, FormScreen):
         # Validate the repeat password input again when password is changed and repeat was already touched.
         self.watch(self._password_input.input, "value", self._revalidate_repeat_password_input_when_password_changed)
 
-    async def validate(self) -> CreateProfileFormScreen.ValidationFail | None:
+    async def validate(self) -> ProfileCredentialsFormScreen.ValidationFail | None:
         try:
             CliveValidatedInput.validate_many_with_error(
                 self._profile_name_input, self._password_input, self._repeat_password_input
diff --git a/clive/__private/ui/forms/create_profile/create_profile_form_screen.scss b/clive/__private/ui/forms/create_profile/profile_credentials_form_screen.scss
similarity index 81%
rename from clive/__private/ui/forms/create_profile/create_profile_form_screen.scss
rename to clive/__private/ui/forms/create_profile/profile_credentials_form_screen.scss
index e2e093c968..c7746d65b2 100644
--- a/clive/__private/ui/forms/create_profile/create_profile_form_screen.scss
+++ b/clive/__private/ui/forms/create_profile/profile_credentials_form_screen.scss
@@ -1,4 +1,4 @@
-CreateProfileFormScreen {
+ProfileCredentialsFormScreen {
   SectionScrollable {
     margin: 1 4 0 4;
 
diff --git a/tests/tui/test_create_profile.py b/tests/tui/test_create_profile.py
index c84b47c482..1697946cdc 100644
--- a/tests/tui/test_create_profile.py
+++ b/tests/tui/test_create_profile.py
@@ -5,8 +5,8 @@ from typing import TYPE_CHECKING, Final
 import pytest
 
 from clive.__private.ui.app import Clive
-from clive.__private.ui.forms.create_profile.create_profile_form_screen import CreateProfileFormScreen
 from clive.__private.ui.forms.create_profile.new_key_alias_form_screen import NewKeyAliasFormScreen
+from clive.__private.ui.forms.create_profile.profile_credentials_form_screen import ProfileCredentialsFormScreen
 from clive.__private.ui.forms.create_profile.set_account_form_screen import SetAccountFormScreen, WorkingAccountCheckbox
 from clive.__private.ui.forms.create_profile.welcome_form_screen import CreateProfileWelcomeFormScreen
 from clive.__private.ui.screens.config import Config
@@ -61,7 +61,7 @@ async def create_profile_until_set_account(
 ) -> None:
     assert_is_screen_active(pilot, CreateProfileWelcomeFormScreen)
     assert_is_new_profile(pilot)
-    await press_and_wait_for_screen(pilot, "enter", CreateProfileFormScreen)
+    await press_and_wait_for_screen(pilot, "enter", ProfileCredentialsFormScreen)
     assert_is_clive_composed_input_focused(
         pilot, SetProfileNameInput, context="CreateProfileForm should have initial focus"
     )
-- 
GitLab