From 1b0d584817b8bcb15490225265e12c13e70f6703 Mon Sep 17 00:00:00 2001 From: Isa Herico Velasco <7840857+iisa@users.noreply.github.com> Date: Fri, 3 Jan 2025 15:37:31 -0800 Subject: [PATCH] main unit test --- demo/index.html | 6 -- src/monthly-giving-circle.ts | 5 +- test/monthly-giving-circle.test.ts | 122 ++++++++++++++++++++++++++--- 3 files changed, 114 insertions(+), 19 deletions(-) diff --git a/demo/index.html b/demo/index.html index 34833e8..3695d1b 100644 --- a/demo/index.html +++ b/demo/index.html @@ -38,7 +38,6 @@
-

@@ -136,11 +135,6 @@ showReceipts = true; }); - document.getElementById('clear-updates').addEventListener('click', async () => { - updateNotices = []; - mgcComponent.updates = updateNotices; - await mgcComponent.updateComplete; - }); diff --git a/src/monthly-giving-circle.ts b/src/monthly-giving-circle.ts index 42b1e27..44974ad 100644 --- a/src/monthly-giving-circle.ts +++ b/src/monthly-giving-circle.ts @@ -22,7 +22,9 @@ export class MonthlyGivingCircle extends LitElement { @property({ type: Array }) updates: anUpdate[] = []; - @property({ type: String }) viewToDisplay: 'welcome' | 'receipts' = 'welcome'; + @property({ type: String, reflect: true }) viewToDisplay: + | 'welcome' + | 'receipts' = 'welcome'; protected createRenderRoot() { return this; @@ -68,6 +70,7 @@ export class MonthlyGivingCircle extends LitElement {