瀏覽代碼

[ui] Vue 3 - UTs - Fixed DropdownMenu snapshots

sreenaths 4 年之前
父節點
當前提交
5fa0b9bb8f

+ 6 - 2
desktop/core/src/desktop/js/components/dropdown/DropdownMenu.test.ts

@@ -22,7 +22,9 @@ describe('DropdownMenu.vue', () => {
   it('should render empty dropdown', () => {
     const wrapper = shallowMount(DropdownMenu, {
       global: {
-        stubs: { 'dropdown-panel': DropdownPanel }
+        stubs: {
+          DropdownPanel
+        }
       }
     });
     expect(wrapper.element).toMatchSnapshot();
@@ -31,7 +33,9 @@ describe('DropdownMenu.vue', () => {
   it('should render dropdown with slots', () => {
     const wrapper = shallowMount(DropdownMenu, {
       global: {
-        stubs: { 'dropdown-panel': DropdownPanel }
+        stubs: {
+          DropdownPanel
+        }
       },
       slots: {
         default: '<div>Some item</div>'

+ 55 - 2
desktop/core/src/desktop/js/components/dropdown/__snapshots__/DropdownMenu.test.ts.snap

@@ -1,5 +1,58 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
-exports[`DropdownMenu.vue should render dropdown with slots 1`] = `<!--[object Object]-->`;
+exports[`DropdownMenu.vue should render dropdown with slots 1`] = `
+<div
+  class="hue-dropdown-panel hue-dropdown-menu"
+>
+  <hue-button-stub
+    disabled="false"
+  />
+  <div
+    class="hue-dropdown-container"
+  >
+    <div
+      class="hue-dropdown-inner"
+    >
+      
+      <div
+        class="hue-dropdown-menu-inner"
+      >
+        <ul>
+          
+          <stub />
+          
+        </ul>
+      </div>
+      
+    </div>
+  </div>
+</div>
+`;
 
-exports[`DropdownMenu.vue should render empty dropdown 1`] = `<!--[object Object]-->`;
+exports[`DropdownMenu.vue should render empty dropdown 1`] = `
+<div
+  class="hue-dropdown-panel hue-dropdown-menu"
+>
+  <hue-button-stub
+    disabled="false"
+  />
+  <div
+    class="hue-dropdown-container"
+  >
+    <div
+      class="hue-dropdown-inner"
+    >
+      
+      <div
+        class="hue-dropdown-menu-inner"
+      >
+        <ul>
+          
+          
+        </ul>
+      </div>
+      
+    </div>
+  </div>
+</div>
+`;