mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 07:13:29 +00:00
release: v1.32.0 — hardening and scalability (#580)
* release: prepare v1.32.0 * test: stabilize water capture re-entry
This commit is contained in:
1 parent
b01822be48
commit
62eb431d66
372 files changed
+25178
-8561
No files matched your search
@@ -40,6 +40,7 @@ interface Messages {
|
||||
* Hinzufügen, Hinzufügen, Hinzufügen" with no way to discriminate.
|
||||
*/
|
||||
quickAddMedicationIntake: string;
|
||||
quickAddWater: string;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -61,25 +62,30 @@ describe("dashboard quick-add submenu labels", () => {
|
||||
["it", IT_PATH],
|
||||
["pl", PL_PATH],
|
||||
])(
|
||||
"%s: measurement and mood entries have distinct labels and neither equals the trigger label",
|
||||
"%s: every quick-add entry has a distinct accessible label",
|
||||
(_locale, path) => {
|
||||
const messages = load(path);
|
||||
|
||||
const measurement = messages.dashboard.quickAddMeasurement;
|
||||
const mood = messages.dashboard.quickAddMood;
|
||||
const medicationIntake = messages.dashboard.quickAddMedicationIntake;
|
||||
const water = messages.dashboard.quickAddWater;
|
||||
const trigger = messages.common.add;
|
||||
|
||||
// Non-empty
|
||||
expect(measurement.trim().length).toBeGreaterThan(0);
|
||||
expect(mood.trim().length).toBeGreaterThan(0);
|
||||
expect(medicationIntake.trim().length).toBeGreaterThan(0);
|
||||
expect(water.trim().length).toBeGreaterThan(0);
|
||||
|
||||
// Distinct from each other — the icon is decorative (aria-hidden),
|
||||
// so the only thing distinguishing the rows is the visible text.
|
||||
expect(measurement).not.toBe(mood);
|
||||
expect(measurement).not.toBe(medicationIntake);
|
||||
expect(mood).not.toBe(medicationIntake);
|
||||
expect(measurement).not.toBe(water);
|
||||
expect(mood).not.toBe(water);
|
||||
expect(medicationIntake).not.toBe(water);
|
||||
|
||||
// Distinct from the trigger label. The trigger sits ABOVE the menu
|
||||
// and announces itself first; if a menu item then repeats the same
|
||||
@@ -87,6 +93,7 @@ describe("dashboard quick-add submenu labels", () => {
|
||||
expect(measurement).not.toBe(trigger);
|
||||
expect(mood).not.toBe(trigger);
|
||||
expect(medicationIntake).not.toBe(trigger);
|
||||
expect(water).not.toBe(trigger);
|
||||
},
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user