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

+4 -4
View File
@@ -2,9 +2,9 @@ use gpui_kit::{
AppContext, BorrowAppContext, Context, Entity, FontWeight, IntoElement, ParentElement, Render, SharedString,
Styled, Subscription, Task, Window, div, rems,
};
use gpui_omarchy::{ButtonVariant, Status, alert, button, focus_scope};
use gpui_omarchy::{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::error::CreddyError;
@@ -24,7 +24,7 @@ impl UnlockScreen {
pub fn new(window: &mut Window, cx: &mut Context<Self>) -> Self {
// nothing else shares the show/hide flag, so it's private to this input
let show = cx.new(|_| false);
let passphrase = cx.new(|cx| PassphraseInput::new(show, window, cx));
let passphrase = cx.new(|cx| PassphraseInput::new("passphrase", show, window, cx));
passphrase.update(cx, |input, cx| input.focus(window, cx));
let submit = cx.subscribe_in(&passphrase, window, |this, _, event, window, cx| {
@@ -125,7 +125,7 @@ impl Render for UnlockScreen {
.font_weight(FontWeight::BOLD)
.child("Please enter your passphrase"),
)
.children(self.error.clone().map(|e| alert(e, Status::Error, cx)))
.children(self.error.clone().map(|e| error_alert(e, cx)))
.child(self.passphrase.clone())
.child(
button("submit", "Submit", ButtonVariant::Primary, cx)