about summary refs log tree commit diff
path: root/__tests__/state/models/shell-ui.test.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-01-17 20:40:02 -0600
committerGitHub <noreply@github.com>2023-01-17 20:40:02 -0600
commit065d7ef629c7d991e520fc3dd94cd84b71014902 (patch)
tree89ed72702a5af85eb8508682edc9f2281d23c2e5 /__tests__/state/models/shell-ui.test.ts
parent61682d5846523038d9a28f851d2bd7c16d27a4a9 (diff)
downloadvoidsky-065d7ef629c7d991e520fc3dd94cd84b71014902.tar.zst
Improve lightbox... and update to React Native 0.71.0 (#49)
* Switch to a better lightbox implementation (close #42)

* Upgrade to react-native 0.71.0

* Update (or remove low-value) tests
Diffstat (limited to '__tests__/state/models/shell-ui.test.ts')
-rw-r--r--__tests__/state/models/shell-ui.test.ts12
1 files changed, 7 insertions, 5 deletions
diff --git a/__tests__/state/models/shell-ui.test.ts b/__tests__/state/models/shell-ui.test.ts
index 8324609a1..b6ccd064a 100644
--- a/__tests__/state/models/shell-ui.test.ts
+++ b/__tests__/state/models/shell-ui.test.ts
@@ -1,6 +1,6 @@
 import {
   ConfirmModal,
-  ImageLightbox,
+  ImagesLightbox,
   ShellUiModel,
 } from './../../../src/state/models/shell-ui'
 
@@ -16,9 +16,10 @@ describe('ShellUiModel', () => {
   })
 
   it('should call the openModal & closeModal method', () => {
-    model.openModal(ConfirmModal)
+    const m = new ConfirmModal('Test Modal', 'Look good?', () => {})
+    model.openModal(m)
     expect(model.isModalActive).toEqual(true)
-    expect(model.activeModal).toEqual(ConfirmModal)
+    expect(model.activeModal).toEqual(m)
 
     model.closeModal()
     expect(model.isModalActive).toEqual(false)
@@ -26,9 +27,10 @@ describe('ShellUiModel', () => {
   })
 
   it('should call the openLightbox & closeLightbox method', () => {
-    model.openLightbox(new ImageLightbox('uri'))
+    const lt = new ImagesLightbox(['uri'], 0)
+    model.openLightbox(lt)
     expect(model.isLightboxActive).toEqual(true)
-    expect(model.activeLightbox).toEqual(new ImageLightbox('uri'))
+    expect(model.activeLightbox).toEqual(lt)
 
     model.closeLightbox()
     expect(model.isLightboxActive).toEqual(false)