Add option for coloured edges on progress page

This commit is contained in:
2021-10-03 17:43:22 +01:00
parent aec4c8efcf
commit 4c2f1613ff
9 changed files with 83 additions and 23 deletions

View File

@@ -51,20 +51,20 @@ describe("Parandum Firestore database", () => {
it("Can update current user's user collection", async () => {
const admin = getAdminFirestore();
await admin.collection("users").doc(myId).set({ sound: true });
await admin.collection("users").doc(myId).set({ sound: true, theme: "default", coloredEdges: false });
const db = getFirestore(myAuth);
const myTestDoc = db.collection("users").doc(myId);
await firebase.assertSucceeds(myTestDoc.update({ sound: false }));
await firebase.assertSucceeds(myTestDoc.update({ sound: false, theme: "pink", coloredEdges: true }));
});
it("Can't update current user's user collection with invalid data types", async () => {
const admin = getAdminFirestore();
await admin.collection("users").doc(myId).set({ sound: true, theme: "default" });
await admin.collection("users").doc(myId).set({ sound: true, theme: "default", coloredEdges: false });
const db = getFirestore(myAuth);
const myTestDoc = db.collection("users").doc(myId);
await firebase.assertFails(myTestDoc.update({ sound: 0, theme: 0 }));
await firebase.assertFails(myTestDoc.update({ sound: 0, theme: 0, coloredEdges: 0 }));
});
it("Can't update current user's user collection with invalid fields", async () => {