gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-merchant-backoffice] branch master updated: updated test


From: gnunet
Subject: [taler-merchant-backoffice] branch master updated: updated test
Date: Fri, 23 Apr 2021 16:45:06 +0200

This is an automated email from the git hooks/post-receive script.

sebasjm pushed a commit to branch master
in repository merchant-backoffice.

The following commit(s) were added to refs/heads/master by this push:
     new 497e6be  updated test
497e6be is described below

commit 497e6bea531efe25a8e3f4ea086cc7827a31d3e2
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Fri Apr 23 11:44:32 2021 -0300

    updated test
---
 packages/frontend/tests/header.test.tsx | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/packages/frontend/tests/header.test.tsx 
b/packages/frontend/tests/header.test.tsx
index e510571..9a69adc 100644
--- a/packages/frontend/tests/header.test.tsx
+++ b/packages/frontend/tests/header.test.tsx
@@ -20,7 +20,7 @@
 */
 
 import { h } from 'preact';
-import { Sidebar } from '../src/components/menu/SideBar';
+import { ProductList } from '../src/components/product/ProductList';
 // See: https://github.com/preactjs/enzyme-adapter-preact-pure
 import { shallow } from 'enzyme';
 import * as backend from '../src/context/backend';
@@ -29,10 +29,18 @@ describe('Initial Test of the Sidebar', () => {
     beforeEach(() => {
         jest.spyOn(backend, 'useConfigContext').mockImplementation(() => ({ 
version: '', currency: '' }));
     })
-    test('Sidbar renders anchors with text', () => {
-
-        const context = shallow(<Sidebar instance="default" onLogout={() => 
{}} />);
-
-        expect(context.find('a').map( a => a.text())).toEqual(["Instances", 
"Details", "Orders", "Inventory", "Tipping", "Log out"]);
+    test('Product list renders a table', () => {
+
+        const context = shallow(<ProductList list={[{
+            description: 'description of the product',
+            image: 'asdasda',
+            price: 'USD:10',
+            quantity: 1,
+            taxes: [{name:'VAT',tax:'EUR:1'}],
+            unit:'book',
+        }]} />);
+
+        expect(context.find('table')).toBeDefined();
+        // expect(context.find('table tr td img').map(img => 
img.prop('src'))).toEqual('');
     });
 });

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]