Skip to content

Native iCloud apps for Windows and Linux, built in Rust. Notes, Reminders, Calendar, Contacts, Drive and Photos, offline and in sync with your iPhone.

Fixtures: fictional data only

Yashwanth Kamireddi3a1e16b5957f
diff --git a/.uiverify/calendar-reminder-colour.mjs b/.uiverify/calendar-reminder-colour.mjs
index 1bafc75..51326b8 100644
--- a/.uiverify/calendar-reminder-colour.mjs
+++ b/.uiverify/calendar-reminder-colour.mjs
@@ -14,7 +14,8 @@ const colours = (sel) => page.evaluate((sel) => Object.fromEntries([...document.
await page.keyboard.press("Control+3");
await page.waitForTimeout(500);
let seen = await colours(".cx-item.is-reminder");
-ok(seen["Evening run"] === "#cc73e1" && seen["Water the pl"] === "#63da38", `Month draws each reminder in its list's colour ${JSON.stringify(seen)}`);
+const colourOf = (start) => Object.entries(seen).find(([k]) => k.startsWith(start))?.[1];
+ok(colourOf("Evening run") === "#cc73e1" && colourOf("Water the pl") === "#63da38", `Month draws each reminder in its list's colour ${JSON.stringify(seen)}`);
await page.keyboard.press("Control+2");
await page.waitForTimeout(500);
await page.evaluate(() => { document.querySelector(".cx-scroll").scrollTop = 4 * 48; });
diff --git a/crates/quince-icloud/src/ckdocument.rs b/crates/quince-icloud/src/ckdocument.rs
index d53f15a..ba3afe2 100644
--- a/crates/quince-icloud/src/ckdocument.rs
+++ b/crates/quince-icloud/src/ckdocument.rs
@@ -2011,11 +2011,7 @@ mod tests {
/// Real titles carry emoji and accents, so the decode must be UTF-8, not ASCII.
#[test]
fn keeps_emoji_and_accents_intact() {
- for text in [
- "🏃 Move more",
- "Café — déjà vu",
- "日本語のリマインダー",
- ] {
+ for text in ["🏃 Move more", "Café — déjà vu", "日本語のリマインダー"] {
let payload = gzipped(&document(text));
assert_eq!(text_from_bytes(&payload).as_deref(), Some(text));
}
diff --git a/crates/quince-icloud/src/reminders.rs b/crates/quince-icloud/src/reminders.rs
index 1ef5010..4b7e72d 100644
--- a/crates/quince-icloud/src/reminders.rs
+++ b/crates/quince-icloud/src/reminders.rs
@@ -1098,13 +1098,8 @@ mod cloudkit_tests {
#[test]
fn a_record_becomes_a_reminder_with_its_real_title() {
- let r = reminder_from_record(&reminder_record(
- "Reminder/1",
- "🏃 Move more",
- false,
- false,
- ))
- .unwrap();
+ let r = reminder_from_record(&reminder_record("Reminder/1", "🏃 Move more", false, false))
+ .unwrap();
assert_eq!(r.title, "🏃 Move more");
assert_eq!(r.list_guid, "List/abc");
assert!(!r.is_done());