Skip to content
Snippets Groups Projects
Commit 981f9724 authored by Mateusz Żebrak's avatar Mateusz Żebrak
Browse files

Rename CreateProfileFormScreen -> ProfileCredentialsFormScreen

parent 193bac05
No related branches found
No related tags found
2 merge requests!600v1.27.5.21 Release,!558Remove welcome profile from TUIWorld, set TUIWorld profile during CreateProfile wizard instead
from __future__ import annotations from __future__ import annotations
from clive.__private.core.profile import Profile 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.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.set_account_form_screen import SetAccountFormScreen
from clive.__private.ui.forms.create_profile.welcome_form_screen import CreateProfileWelcomeFormScreen from clive.__private.ui.forms.create_profile.welcome_form_screen import CreateProfileWelcomeFormScreen
from clive.__private.ui.forms.form import ComposeFormResult, Form from clive.__private.ui.forms.form import ComposeFormResult, Form
...@@ -19,7 +19,7 @@ class CreateProfileForm(Form): ...@@ -19,7 +19,7 @@ class CreateProfileForm(Form):
def compose_form(self) -> ComposeFormResult: def compose_form(self) -> ComposeFormResult:
if not Profile.is_any_profile_saved(): if not Profile.is_any_profile_saved():
yield CreateProfileWelcomeFormScreen yield CreateProfileWelcomeFormScreen
yield CreateProfileFormScreen yield ProfileCredentialsFormScreen
yield SetAccountFormScreen yield SetAccountFormScreen
yield NewKeyAliasFormScreen yield NewKeyAliasFormScreen
......
...@@ -21,7 +21,7 @@ if TYPE_CHECKING: ...@@ -21,7 +21,7 @@ if TYPE_CHECKING:
from clive.__private.ui.forms.form import Form from clive.__private.ui.forms.form import Form
class CreateProfileFormScreen(BaseScreen, FormScreen): class ProfileCredentialsFormScreen(BaseScreen, FormScreen):
BINDINGS = [Binding("f1", "help", "Help")] BINDINGS = [Binding("f1", "help", "Help")]
CSS_PATH = [get_relative_css_path(__file__)] CSS_PATH = [get_relative_css_path(__file__)]
BIG_TITLE = "create profile" BIG_TITLE = "create profile"
...@@ -45,7 +45,7 @@ class CreateProfileFormScreen(BaseScreen, FormScreen): ...@@ -45,7 +45,7 @@ class CreateProfileFormScreen(BaseScreen, FormScreen):
# Validate the repeat password input again when password is changed and repeat was already touched. # 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) 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: try:
CliveValidatedInput.validate_many_with_error( CliveValidatedInput.validate_many_with_error(
self._profile_name_input, self._password_input, self._repeat_password_input self._profile_name_input, self._password_input, self._repeat_password_input
......
CreateProfileFormScreen { ProfileCredentialsFormScreen {
SectionScrollable { SectionScrollable {
margin: 1 4 0 4; margin: 1 4 0 4;
......
...@@ -5,8 +5,8 @@ from typing import TYPE_CHECKING, Final ...@@ -5,8 +5,8 @@ from typing import TYPE_CHECKING, Final
import pytest import pytest
from clive.__private.ui.app import Clive 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.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.set_account_form_screen import SetAccountFormScreen, WorkingAccountCheckbox
from clive.__private.ui.forms.create_profile.welcome_form_screen import CreateProfileWelcomeFormScreen from clive.__private.ui.forms.create_profile.welcome_form_screen import CreateProfileWelcomeFormScreen
from clive.__private.ui.screens.config import Config from clive.__private.ui.screens.config import Config
...@@ -61,7 +61,7 @@ async def create_profile_until_set_account( ...@@ -61,7 +61,7 @@ async def create_profile_until_set_account(
) -> None: ) -> None:
assert_is_screen_active(pilot, CreateProfileWelcomeFormScreen) assert_is_screen_active(pilot, CreateProfileWelcomeFormScreen)
assert_is_new_profile(pilot) 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( assert_is_clive_composed_input_focused(
pilot, SetProfileNameInput, context="CreateProfileForm should have initial focus" pilot, SetProfileNameInput, context="CreateProfileForm should have initial focus"
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment