add UI tests for welcome and unlock flows

This commit is contained in:
jfmonty2 committed 2026-11-18 14:31:00 -05:00
1 parent 5999aba0a5
commit b2a7e5759a
9 files changed
+1003 -59

No files matched your search

+5 -5
View File
@@ -2,9 +2,9 @@ use gpui_kit::{
AppContext, Context, Entity, FontWeight, IntoElement, ParentElement, Render, SharedString,
Styled, Subscription, Task,Window, div, rems,
};
use gpui_omarchy::{ActiveTheme, ButtonVariant, Status, alert, button, focus_scope};
use gpui_omarchy::{ActiveTheme, ButtonVariant, button, focus_scope};
use crate::components::{PassphraseInput, PassphraseInputEvent};
use crate::components::{PassphraseInput, PassphraseInputEvent, error_alert};
use crate::config::AppConfig;
use crate::db::Db;
use crate::session::AppSession;
@@ -26,8 +26,8 @@ pub struct WelcomeScreen {
impl WelcomeScreen {
pub fn new(window: &mut Window, cx: &mut Context<Self>) -> Self {
let show = cx.new(|_| false);
let passphrase = cx.new(|cx| PassphraseInput::new(show.clone(), window, cx));
let confirm = cx.new(|cx| PassphraseInput::new(show, window, cx));
let passphrase = cx.new(|cx| PassphraseInput::new("passphrase", show.clone(), window, cx));
let confirm = cx.new(|cx| PassphraseInput::new("confirm", show, window, cx));
passphrase.update(cx, |input, cx| input.focus(window, cx));
let mut _subscriptions = Vec::new();
@@ -162,7 +162,7 @@ impl Render for WelcomeScreen {
.flex()
.flex_col()
.gap(rems(1.))
.children(self.error.clone().map(|e| alert(e, Status::Error, cx)))
.children(self.error.clone().map(|e| error_alert(e, cx)))
.child(field("Passphrase", &self.passphrase))
.child(field("Re-enter passphrase", &self.confirm))
.child(