فهرست منبع

Add test for title panel.

Brian E. Granger 4 سال پیش
والد
کامیت
69069c91f6
1فایلهای تغییر یافته به همراه12 افزوده شده و 0 حذف شده
  1. 12 0
      packages/application/test/shell.spec.ts

+ 12 - 0
packages/application/test/shell.spec.ts

@@ -406,4 +406,16 @@ describe('LabShell', () => {
       expect(state.mainArea?.mode).toBe('multiple-document');
     });
   });
+
+  describe('#titlePanel', () => {
+    it('should be hidden in multiple document mode and visible in single document mode', () => {
+      const widget = new Widget();
+      widget.id = 'foo';
+      shell.add(widget, 'right', { rank: 10 });
+      shell.mode = 'multiple-document';
+      expect(widget.isVisible).toBe(false);
+      shell.mode = 'single-document';
+      expect(widget.isVisible).toBe(false);
+    });
+  });
 });