web using penguin-ui
This commit is contained in:
@@ -202,8 +202,10 @@ mod tests {
|
||||
for path in ["/", "/login", "/register"] {
|
||||
let (status, body) = get(path).await;
|
||||
assert!(status.is_success(), "{path} returned {status}");
|
||||
// Penguin UI's navbar, so what identifies it is its Alpine
|
||||
// state rather than a class this app wrote.
|
||||
assert!(
|
||||
body.contains("<header class=\"topbar\">"),
|
||||
body.contains(r#"x-data="{ mobileMenuIsOpen: false }""#),
|
||||
"{path} is missing the shared navbar"
|
||||
);
|
||||
assert!(
|
||||
@@ -312,6 +314,8 @@ mod tests {
|
||||
async fn stylesheet_is_served_once_for_every_page() {
|
||||
let (status, body) = get("/static/app.css").await;
|
||||
assert!(status.is_success());
|
||||
assert!(body.contains(".topbar"));
|
||||
// The navbar and the alerts are Penguin UI's own Tailwind classes now,
|
||||
// so what is left in this file is the site's layout.
|
||||
assert!(body.contains(".form-card"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,6 +331,7 @@ impl TableDraft {
|
||||
.map(|link| ProtoTableLink {
|
||||
linked_table_name: link.linked_table_name.clone(),
|
||||
required: link.mode.is_required(),
|
||||
name: link.linked_table_name.clone(),
|
||||
})
|
||||
.collect(),
|
||||
accounting_currency: if self.creating_new_profile {
|
||||
|
||||
@@ -183,7 +183,7 @@ mod tests {
|
||||
state.error = Some("That column already exists.".to_string());
|
||||
let html = render_builder(&state);
|
||||
assert!(html.contains(r#"role="dialog""#));
|
||||
assert!(html.contains("x-data=\"{ modalIsOpen: true }\""));
|
||||
assert!(html.contains("x-data=\"{ dangerModalIsOpen: true }\""));
|
||||
assert_eq!(html.matches("That column already exists.").count(), 2);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user