diff --git a/.eslintrc.json b/.eslintrc.json
index d34030c0..23562c0c 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -44,10 +44,13 @@
"globals": {
"Polymer": false,
"MealOrderApp": true,
+ "MealOrderAppTest": true,
"assert": false,
"test": false,
"suite": false,
"fixture": false,
- "setup": false
+ "setup": false,
+ "flush": false,
+ "sinon": false
}
}
diff --git a/client/user/bower.json b/client/user/bower.json
index f4c026ef..0f7d1b39 100644
--- a/client/user/bower.json
+++ b/client/user/bower.json
@@ -6,8 +6,11 @@
"polymer": "Polymer/polymer#^2.0.0",
"app-layout": "PolymerElements/app-layout#^2.0.0",
"app-route": "PolymerElements/app-route#^2.0.0",
- "iron-form": "PolymerElements/iron-form#^2.0.0",
- "polymer-redux": "^1.0.5"
+ "polymer-redux": "^1.0.5",
+ "iron-pages": "PolymerElements/iron-pages#^2.1.0",
+ "paper-tabs": "PolymerElements/paper-tabs#^2.1.0",
+ "iron-icons": "PolymerElements/iron-icons#^2.1.1",
+ "app-datepicker": "motss/app-datepicker#^2.12.0"
},
"devDependencies": {
"web-component-tester": "Polymer/web-component-tester#^6.0.0",
diff --git a/client/user/index.html b/client/user/index.html
index e756040a..f3bd02d2 100644
--- a/client/user/index.html
+++ b/client/user/index.html
@@ -1,4 +1,3 @@
-
-
-
-
-
-
-
-
+ href="../../bower_components/app-layout/app-scroll-effects/effects/waterfall.html">
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
-
-
+
+
+
-
-
diff --git a/client/user/src/mealorder/meal-order-toolbar.html b/client/user/src/mealorder/meal-order-toolbar.html
new file mode 100644
index 00000000..26c0ee63
--- /dev/null
+++ b/client/user/src/mealorder/meal-order-toolbar.html
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/client/user/src/mealorder/menu/meal-order-drawer.html b/client/user/src/mealorder/menu/meal-order-drawer.html
new file mode 100644
index 00000000..31d0e64f
--- /dev/null
+++ b/client/user/src/mealorder/menu/meal-order-drawer.html
@@ -0,0 +1,188 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/client/user/src/mealorder/menu/meal-order-menu-container.html b/client/user/src/mealorder/menu/meal-order-menu-container.html
new file mode 100644
index 00000000..edfdb12c
--- /dev/null
+++ b/client/user/src/mealorder/menu/meal-order-menu-container.html
@@ -0,0 +1,234 @@
+
+
+
+
+
+
+
+
diff --git a/client/user/src/mealorder/shell/actions/user-actions.html b/client/user/src/mealorder/shell/actions/user-actions.html
new file mode 100644
index 00000000..73c583b4
--- /dev/null
+++ b/client/user/src/mealorder/shell/actions/user-actions.html
@@ -0,0 +1,22 @@
+
+
diff --git a/client/user/src/mealorder/shell/reducers/reducers.html b/client/user/src/mealorder/shell/reducers/reducers.html
index 5a8a7729..90c48dee 100644
--- a/client/user/src/mealorder/shell/reducers/reducers.html
+++ b/client/user/src/mealorder/shell/reducers/reducers.html
@@ -18,19 +18,124 @@
~ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
-
diff --git a/client/user/src/mealorder/shell/redux-store.html b/client/user/src/mealorder/shell/redux-store.html
index ef87ca10..bad13dc4 100644
--- a/client/user/src/mealorder/shell/redux-store.html
+++ b/client/user/src/mealorder/shell/redux-store.html
@@ -17,9 +17,8 @@
~ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
~ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
-
-
+
-
-
+
@@ -51,16 +48,45 @@
let component;
setup(() => {
- component = fixture('BasicClientApp');
+ component = fixture('MealOrderClientApp');
});
- test('should parse url correctly', function () {
+
+ test('should parse `routeData.page` correctly', function () {
setLocation('/#/history/');
assert.equal('history', component.routeData.page);
setLocation('/#/menu/');
assert.equal('menu', component.routeData.page);
});
+
+ test('should parse `routeData.date` correctly', function () {
+ setLocation('/#/history/2018-03-21');
+ assert.equal('2018-03-21', component.routeData.date);
+ setLocation('/#/menu/2018-03-21');
+ assert.equal('2018-03-21', component.routeData.date);
+ });
+
+ test('should instantiate the `meal-order-toolbar` component', function (done) {
+ const elementShadowRoot = component.shadowRoot;
+ const drawer = elementShadowRoot.querySelector("meal-order-toolbar");
+ assert.equal(drawer.tagName.toLocaleLowerCase(), MealOrderApp.MealOrderToolbar.is);
+ done();
+ });
+
+ test('should instantiate the `meal-order-drawer` component', function (done) {
+ const elementShadowRoot = component.shadowRoot;
+ const drawer = elementShadowRoot.querySelector("meal-order-drawer");
+ assert.equal(drawer.tagName.toLocaleLowerCase(), MealOrderApp.MealOrderDrawer.is);
+ done();
+ });
+
+ test('should instantiate the `meal-order-menu-container` component ' +
+ 'with data-page `menu`', function () {
+ setLocation('/#/menu/2018-03-23');
+ const pages = component.shadowRoot.querySelector('#app-header-layout-iron');
+ pages.forceSynchronousItemUpdate();
+ assert.equal(pages.selectedItem.tagName.toLocaleLowerCase(), MealOrderApp.MealOrderMenuContainer.is);
+ });
});
-