From 3d9e11026314d44da74786d48b510cf382c913f8 Mon Sep 17 00:00:00 2001 From: Mike McAuley Date: Wed, 27 Sep 2017 16:44:54 -0400 Subject: [PATCH 1/2] add mirage to mock an api returning character data --- .eslintrc.js | 3 + .jshintrc | 1 + package.json | 1 + tests/dummy/mirage/config.js | 48 ++ tests/dummy/mirage/fixtures/characters.js | 571 ++++++++++++++++++ tests/dummy/mirage/models/characters.js | 4 + tests/dummy/mirage/scenarios/default.js | 3 + tests/dummy/mirage/serializers/application.js | 4 + tests/helpers/destroy-app.js | 3 + 9 files changed, 638 insertions(+) create mode 100644 tests/dummy/mirage/config.js create mode 100644 tests/dummy/mirage/fixtures/characters.js create mode 100644 tests/dummy/mirage/models/characters.js create mode 100644 tests/dummy/mirage/scenarios/default.js create mode 100644 tests/dummy/mirage/serializers/application.js diff --git a/.eslintrc.js b/.eslintrc.js index fbfc364..243889f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,4 +1,7 @@ module.exports = { + globals: { + server: true, + }, root: true, parserOptions: { ecmaVersion: 6, diff --git a/.jshintrc b/.jshintrc index b936286..62829c9 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,5 +1,6 @@ { "predef": [ + "server", "document", "window", "-Promise", diff --git a/package.json b/package.json index 26eaeef..278618c 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "ember-cli-dependency-checker": "^1.3.0", "ember-cli-eslint": "^3.0.0", "ember-cli-inject-live-reload": "^1.4.1", + "ember-cli-mirage": "^0.3.4", "ember-cli-qunit": "^3.1.0", "ember-cli-sass": "5.6.0", "ember-cli-shims": "^1.0.2", diff --git a/tests/dummy/mirage/config.js b/tests/dummy/mirage/config.js new file mode 100644 index 0000000..08e6e83 --- /dev/null +++ b/tests/dummy/mirage/config.js @@ -0,0 +1,48 @@ +export default function() { + this.namespace = 'api'; + + // handles requests from .findAll and .query on dummy app character model + this.get('/characters', (schema, request) => { + + // start with all characters (loaded via fixture) + let characters = schema.characters.all(); + + // get all filters received via query string + let filters = {}; + let filterParams = ['name', 'address', 'alignment']; + filterParams.forEach(function (filterParam) { + if (request.queryParams[filterParam]) { + filters[filterParam] = request.queryParams[filterParam]; + } + }); + + // loop through filters and apply each + for (let property in filters) { + let value = filters[property]; + characters = characters.filter(function (character) { + let characterValue = character[property]; + if (characterValue) { + return characterValue.toLowerCase().indexOf(value.toLowerCase()) >= 0; + } else { + return false; + } + }); + } + + let total = characters.length; + + // page data, if requested + let pageSize = request.queryParams.pageSize; + let pageNumber = request.queryParams.pageNumber; + if (pageSize && pageNumber) { + let startIndex = (pageNumber - 1) * pageSize; + let endIndex = startIndex + parseInt(pageSize); + characters = characters.slice(startIndex, endIndex); + } + + let json = this.serializerOrRegistry.serialize(characters, request); + json.meta = {total}; + return json; + }); + +} diff --git a/tests/dummy/mirage/fixtures/characters.js b/tests/dummy/mirage/fixtures/characters.js new file mode 100644 index 0000000..81382df --- /dev/null +++ b/tests/dummy/mirage/fixtures/characters.js @@ -0,0 +1,571 @@ +// same array as returned by the data service's getRawData() method +export default [ + { + name: 'Sherlock Holmes', + address: '221B Baker Street', + alignment: 'Good', + extended_details: { + avatar: 'sherlock.jpg', + biography: 'Sherlock Holmes is a fictional private detective created by British author Sir Arthur Conan Doyle. Known as a "consulting detective" in the stories, Holmes is known for his proficiency with observation, forensic science, and logical reasoning that borders on the fantastic, which he employs when investigating cases for a wide variety of clients, including Scotland Yard.' + }, + id: 1 + }, + { + name: 'Dudley Dursley', + address: '4 Privet Drive', + alignment: 'Evil', + id: 2 + }, + { + name: 'Hank Hill', + address: '84 Rainey Street / Arlen, TX', + alignment: 'Good', + id: 3 + }, + { + name: 'Peggy Hill', + address: '84 Rainey Street / Arlen, TX', + alignment: 'Evil', + id: 4 + }, + { + name: 'Bobby Hill', + address: '84 Rainey Street / Arlen, TX', + alignment: 'Good', + id: 5 + }, + { + name: 'Gandalf Stormcrow', + alignment: 'Good', + extended_details: { + avatar: 'gandalf.jpg', + biography: 'Gandalf is a fictional character and one of the protagonists in J. R. R. Tolkien\'s novels The Hobbit and The Lord of the Rings. He is a wizard, member of the Istari order, as well as leader of the Fellowship of the Ring and the army of the West. In The Lord of the Rings, he is initially known as Gandalf the Grey, but returns from death as Gandalf the White.' + }, + id: 6 + }, + { + name: 'Sauron', + address: 'Mordor', + alignment: 'Evil', + id: 7 + }, + { + name: 'Morgoth', + address: 'Thangorodrim', + alignment: 'Evil', + id: 8 + }, + { + name: 'Manwe', + address: 'Valinor', + alignment: 'Good', + id: 9 + }, + { + name: 'Homer Simpson', + address: 'Springfield, Illinois', + alignment: 'Neutral', + extended_details: { + avatar: 'homer.jpg', + biography: 'Homer Jay Simpson is a fictional character and the main protagonist of the American animated television series The Simpsons as the patriarch of the eponymous family. He is voiced by Dan Castellaneta and first appeared on television, along with the rest of his family, in The Tracey Ullman Show short "Good Night" on April 19, 1987. Homer was created and designed by cartoonist Matt Groening while he was waiting in the lobby of James L. Brooks\' office. Groening had been called to pitch a series of shorts based on his comic strip Life in Hell but instead decided to create a new set of characters. He named the character after his father, Homer Groening. After appearing for three seasons on The Tracey Ullman Show, the Simpson family got their own series on Fox that debuted December 17, 1989.' + }, + id: 10 + }, + { + name: 'Marge Simpson', + address: 'Springfield, Illinois', + alignment: 'Good', + id: 11 + }, + { + name: 'Bart Simpson', + address: 'Springfield, Illinois', + alignment: 'Evil', + id: 12 + }, + { + name: 'Lisa Simpson', + address: 'Springfield, Illinois', + alignment: 'Good', + extended_details: { + avatar: 'lisa.jpg', + biography: 'Lisa Marie Simpson is a fictional character in the animated television series The Simpsons. She is the middle child and most intelligent of the Simpson family. Voiced by Yeardley Smith, Lisa first appeared on television in The Tracey Ullman Show short "Good Night" on April 19, 1987. Cartoonist Matt Groening created and designed her while waiting to meet James L. Brooks. Groening had been invited to pitch a series of shorts based on his comic Life in Hell, but instead decided to create a new set of characters. He named the elder Simpson daughter after his younger sister Lisa Groening. After appearing on The Tracey Ullman Show for three years, the Simpson family were moved to their own series on Fox, which debuted on December 17, 1989.' + }, + id: 13 + }, + { + name: 'Maggie Simpson', + address: 'Springfield, Illinois', + alignment: 'Neutral', + id: 14 + }, + { + name: 'Abe Simpson', + address: 'Springfield, Illinois', + alignment: 'Neutral', + id: 15 + }, + { + name: 'Mr. Burns', + address: 'Burns Manor', + alignment: 'Evil', + id: 16 + }, + { + name: 'Waylon Smithers', + address: 'Burns Manor', + alignment: 'Neutral', + id: 17 + }, + { + name: 'Moe Szyslak', + address: 'Moe\'s Tavern', + alignment: 'Neutral', + id: 18 + }, + { + name: 'Darth Revan', + alignment: 'Evil', + id: 19 + }, + { + name: 'Spongebob Squarepants', + address: 'A Pineapple Under the Sea', + alignment: 'Good', + extended_details: { + avatar: 'spongebob.jpg', + biography: 'SpongeBob SquarePants is the titular character and protagonist of the American animated television series of the same name. He is voiced by actor and comedian Tom Kenny and first appeared on television in the series\' pilot episode on May 1, 1999.' + }, + id: 20 + }, + { + name: 'Fitzwilliam Darcy', + address: 'Pemberley', + alignment: 'Good', + id: 21 + }, + { + name: 'Nessie', + address: 'Loch Ness', + alignment: 'Evil', + id: 22 + }, + { + name: 'The Cat in the Hat', + alignment: 'Neutral', + id: 23 + }, + { + name: 'Freyja', + address: 'Folkvangr', + alignment: 'Good', + id: 24 + }, + { + name: 'Odin', + address: 'Valhalla', + alignment: 'Good', + id: 25 + }, + { + name: 'Nidhogg', + address: 'Yggdrasil', + alignment: 'Neutral', + id: 26 + }, + { + name: 'Jormungandr', + address: 'Midgard', + alignment: 'Neutral', + id: 27 + }, + { + name: 'Jor-El', + address: 'Krypton', + alignment: 'Good', + id: 28 + }, + { + name: 'Oliver Twist', + alignment: 'Good', + id: 29 + }, + { + name: 'Artemis Fowl', + address: 'Fowl Manor', + alignment: 'Neutral', + id: 30 + }, + { + name: 'Roland Deschain', + alignment: 'Neutral', + id: 31 + }, + { + name: 'Han Solo', + address: 'Coruscant', + alignment: 'Good', + id: 32 + }, + { + name: 'Chewbacca', + address: 'Kashyyyk', + alignment: 'Good', + id: 33 + }, + { + name: 'Sheev Palpatine', + address: 'Naboo', + alignment: 'Evil', + id: 34 + }, + { + name: 'Luke Skywalker', + address: 'Tatooine', + alignment: 'Good', + id: 35 + }, + { + name: 'Darth Vader', + address: 'Death Star', + alignment: 'Evil', + id: 36 + }, + { + name: 'Owen Lars', + address: 'Tatooine', + alignment: 'Good', + id: 37 + }, + { + name: 'Beru Lars', + address: 'Tatooine', + alignment: 'Good', + id: 38 + }, + { + name: 'Lando Calrissian', + address: 'Cloud City', + alignment: 'Neutral', + id: 39 + }, + { + name: 'Bib Fortuna', + address: 'Jabba\'s Palace', + alignment: 'Evil', + id: 40 + }, + { + name: 'Yoda', + address: 'Dagobah', + alignment: 'Good', + id: 41 + }, + { + name: 'Arthur Pendragon', + address: 'Camelot', + alignment: 'Good', + id: 42 + }, + { + name: 'Myrddin Emrys', + address: 'Sacred Grove of Bel', + alignment: 'Good', + id: 43 + }, + { + name: 'Sir Lancelot', + address: 'Camelot', + alignment: 'Good', + id: 44 + }, + { + name: 'The Ghost of Christmas Past', + alignment: 'Good', + id: 45 + }, + { + name: 'The Ghost of Christmas Present', + alignment: 'Good', + id: 46 + }, + { + name: 'The Ghost of Christmas Future', + alignment: 'Good', + id: 47 + }, + { + name: 'The Grinch', + address: 'Cliff Overlooking Whoville', + alignment: 'Evil', + id: 48 + }, + { + name: 'Tony Stark', + address: 'Stark Tower / Columbus Circle / New York, NY 10019', + alignment: 'Good', + id: 49 + }, + { + name: 'Daredevil', + address: 'Hell\'s Kitchen', + alignment: 'Good', + id: 50 + }, + { + name: 'Dr. Strange', + address: 'Sanctum Santorum', + alignment: 'Good', + id: 51 + }, + { + name: 'Reed Richards', + address: 'The Baxter Building', + alignment: 'Good', + id: 52 + }, + { + name: 'James Tiberius Kirk', + address: 'USS Enterprise', + alignment: 'Good', + id: 53 + }, + { + name: 'Tyrion Lannister', + address: 'House Lannister', + alignment: 'Good', + extended_details: { + avatar: 'tyrion.jpg', + biography: 'Tyrion Lannister (also referred to as "the Imp" or "the Halfman") is a fictional character in A Song of Ice and Fire, a series of fantasy novels by American author George R. R. Martin and its television adaptation Game of Thrones. Based on an idea that came to Martin while writing the 1981 novel Windhaven, Tyrion has been called one of the author\'s finest creations and most popular characters by The New York Times. Martin has named the character as his favorite in the series.' + }, + id: 54 + }, + { + name: 'Jaime Lannister', + address: 'House Lannister', + alignment: 'Good', + id: 55 + }, + { + name: 'Cersei Lannister', + address: 'House Lannister', + alignment: 'Evil', + extended_details: { + avatar: 'cersei.png', + biography: 'Cersei Lannister is a fictional character in the A Song of Ice and Fire series of fantasy novels by American author George R. R. Martin, and its television adaptation Game of Thrones, where she is portrayed by Lena Headey. In the novels, she is a point of view character.' + }, + id: 56 + }, + { + name: 'Daenerys Targaryen', + address: 'House Targaryen', + alignment: 'Neutral', + id: 57 + }, + { + name: 'Jon Snow', + address: 'Nights Watch', + alignment: 'Good', + extended_details: { + avatar: 'jon.jpg', + biography: 'Jon Snow is a fictional character in the A Song of Ice and Fire series of fantasy novels by American author George R. R. Martin, and its television adaptation Game of Thrones. He is a prominent point of view character in the novels, and has been called one of the author\'s "finest creations" and most popular characters by The New York Times. Jon is a main character in the TV series, and his storyline in the 2015 season 5 finale generated a strong reaction among viewers. Speculation about the character\'s parentage has also been a popular topic of discussion among fans of both the books and the TV series.' + }, + id: 58 + }, + { + name: 'Petyr Baelish', + address: 'Kings Landing', + alignment: 'Evil', + id: 59 + }, + { + name: 'Davos Seaworth', + address: 'House Baratheon', + alignment: 'Neutral', + id: 60 + }, + { + name: 'Melisandre', + address: 'House Baratheon', + alignment: 'Evil', + id: 61 + }, + { + name: 'Sansa Stark', + address: 'House Stark', + alignment: 'Good', + extended_details: { + avatar: 'sansa.jpg', + biography: 'Sansa Stark is a fictional character created by American author George R. R. Martin. She is a prominent character in Martin\'s award-winning A Song of Ice and Fire series.' + }, + id: 62 + }, + { + name: 'Arya Stark', + address: 'House Stark', + alignment: 'Good', + id: 63 + }, + { + name: 'Ellaria Sand', + address: 'House Martell', + alignment: 'Evil', + id: 64 + }, + { + name: 'Missandei', + address: 'Meereen', + alignment: 'Good', + id: 65 + }, + { + name: 'Varys', + address: 'Kings Landing', + alignment: 'Neutral', + id: 66 + }, + { + name: 'Sandor Clegane', + address: 'Westeros', + alignment: 'Neutral', + id: 67 + }, + { + name: 'Tormund Giantsbane', + address: 'North of the Wall', + alignment: 'Neutral', + id: 68 + }, + { + name: 'Bran Stark', + address: 'House Stark', + alignment: 'Good', + id: 69 + }, + { + name: 'Samwell Tarly', + address: 'Nights Watch', + alignment: 'Good', + id: 70 + }, + { + name: 'Daario Naharis', + address: 'Slavers Bay', + alignment: 'Neutral', + id: 71 + }, + { + name: 'Theon Greyjoy', + address: 'House Greyjoy', + alignment: 'Neutral', + id: 72 + }, + { + name: 'Bron', + address: 'Kings Landing', + alignment: 'Neutral', + id: 73 + }, + { + name: 'Jaqen Hghar', + address: 'Braavos', + alignment: 'Neutral', + id: 74 + }, + { + name: 'Brienne', + address: 'House Tarth', + alignment: 'Good', + id: 75 + }, + { + name: 'Tommen Baratheon', + address: 'House Baratheon', + alignment: 'Neutral', + id: 76 + }, + { + name: 'Margaery Tyrell', + address: 'House Tyrell', + alignment: 'Good', + id: 77 + }, + { + name: 'The High Sparrow', + address: 'Kings Landing', + alignment: 'Neutral', + id: 78 + }, + { + name: 'Ramsay Bolton', + address: 'House Bolton', + alignment: 'Evil', + id: 79 + }, + { + name: 'Roose Bolton', + address: 'House Bolton', + alignment: 'Evil', + id: 80 + }, + { + name: 'Stannis Baratheon', + address: 'House Baratheon', + alignment: 'Neutral', + id: 81 + }, + { + name: 'Tywin Lannister', + address: 'House Lannister', + alignment: 'Evil', + id: 82 + }, + { + name: 'Joffrey Baratheon', + address: 'House Baratheon', + alignment: 'Evil', + id: 83 + }, + { + name: 'Catelyn Stark', + address: 'House Stark', + alignment: 'Good', + id: 84 + }, + { + name: 'Robb Stark', + address: 'House Stark', + alignment: 'Good', + id: 85 + }, + { + name: 'Talisa Stark', + address: 'House Stark', + alignment: 'Good', + id: 86 + }, + { + name: 'Jeor Mormont', + address: 'Nights Watch', + alignment: 'Good', + id: 87 + }, + { + name: 'Ned Stark', + address: 'House Stark', + alignment: 'Good', + id: 88 + }, + { + name: 'Robert Baratheon', + address: 'House Baratheon', + alignment: 'Neutral', + id: 89 + }, + { + name: 'Khal Drogo', + address: 'Dothraki', + alignment: 'Neutral', + id: 90 + } +] diff --git a/tests/dummy/mirage/models/characters.js b/tests/dummy/mirage/models/characters.js new file mode 100644 index 0000000..1486a72 --- /dev/null +++ b/tests/dummy/mirage/models/characters.js @@ -0,0 +1,4 @@ +import { Model } from 'ember-cli-mirage'; + +export default Model.extend({ +}); diff --git a/tests/dummy/mirage/scenarios/default.js b/tests/dummy/mirage/scenarios/default.js new file mode 100644 index 0000000..4464d6e --- /dev/null +++ b/tests/dummy/mirage/scenarios/default.js @@ -0,0 +1,3 @@ +export default function(server) { + server.loadFixtures('characters'); +} diff --git a/tests/dummy/mirage/serializers/application.js b/tests/dummy/mirage/serializers/application.js new file mode 100644 index 0000000..6d47a36 --- /dev/null +++ b/tests/dummy/mirage/serializers/application.js @@ -0,0 +1,4 @@ +import { JSONAPISerializer } from 'ember-cli-mirage'; + +export default JSONAPISerializer.extend({ +}); diff --git a/tests/helpers/destroy-app.js b/tests/helpers/destroy-app.js index c3d4d1a..1807e21 100644 --- a/tests/helpers/destroy-app.js +++ b/tests/helpers/destroy-app.js @@ -2,4 +2,7 @@ import Ember from 'ember'; export default function destroyApp(application) { Ember.run(application, 'destroy'); + if (window.server) { + window.server.shutdown(); + } } From 3f9076474ca986a118dd47330c51591c975d026f Mon Sep 17 00:00:00 2001 From: Mike McAuley Date: Wed, 27 Sep 2017 16:45:27 -0400 Subject: [PATCH 2/2] add new example page using ember data records --- tests/dummy/app/adapters/character.js | 5 ++ tests/dummy/app/controllers/ember-data.js | 77 +++++++++++++++++++++++ tests/dummy/app/models/character.js | 7 +++ tests/dummy/app/router.js | 1 + tests/dummy/app/routes/ember-data.js | 7 +++ tests/dummy/app/templates/ember-data.hbs | 23 +++++++ tests/dummy/app/templates/index.hbs | 13 +++- 7 files changed, 130 insertions(+), 3 deletions(-) create mode 100644 tests/dummy/app/adapters/character.js create mode 100644 tests/dummy/app/controllers/ember-data.js create mode 100644 tests/dummy/app/models/character.js create mode 100644 tests/dummy/app/routes/ember-data.js create mode 100644 tests/dummy/app/templates/ember-data.hbs diff --git a/tests/dummy/app/adapters/character.js b/tests/dummy/app/adapters/character.js new file mode 100644 index 0000000..f1b1ab1 --- /dev/null +++ b/tests/dummy/app/adapters/character.js @@ -0,0 +1,5 @@ +import DS from 'ember-data'; + +export default DS.JSONAPIAdapter.extend({ + namespace: 'api' +}); diff --git a/tests/dummy/app/controllers/ember-data.js b/tests/dummy/app/controllers/ember-data.js new file mode 100644 index 0000000..49860e6 --- /dev/null +++ b/tests/dummy/app/controllers/ember-data.js @@ -0,0 +1,77 @@ +import Ember from 'ember'; + +export default Ember.Controller.extend({ + + store: Ember.inject.service(), + + columnDefs: [ + { + key: 'id', + header: 'ID', + width: 50, + hideLabel: true + }, + { + key: 'name', + header: 'Name', + width: 200, + cellClass: 'name', + filter: { + type: 'search' + } + }, + { + key: 'address', + header: 'Address', + filter: { + type: 'search' + } + }, + { + key: 'alignment', + header: 'Alignment', + filter: { + type: 'select', + selectOptions: [ + { value: 'Good' }, + { value: 'Evil' }, + { value: 'Neutral' } + ] + } + }, + { + key: 'username', + header: 'Username', + component: 'user-name', + cellClass: 'monospace' + } + ], + + possiblePageSizes: [5, 25, 50, 100], + + selectedNames: null, + + actions: { + updatePage(page, pageSize, filters) { + this.set('isLoading', true); + let query = { + pageNumber: page, + pageSize: pageSize, + name: filters.name || '', + address: filters.address || '', + alignment: filters.alignment || '' + }; + this.get('store').query('character', query) + .then( (data) => { + let meta = data.meta; + delete data.meta; + this.setProperties({isLoading: false, model: data, meta: meta}); + }); + }, + updateSelection(selectedDataRows) { + var selectedNames = selectedDataRows.map(row => row.get('name')); + this.set('selectedNames', selectedNames.join(', ')); + } + } + +}); diff --git a/tests/dummy/app/models/character.js b/tests/dummy/app/models/character.js new file mode 100644 index 0000000..12768fc --- /dev/null +++ b/tests/dummy/app/models/character.js @@ -0,0 +1,7 @@ +import DS from 'ember-data'; + +export default DS.Model.extend({ + name: DS.attr('string'), + address: DS.attr('string'), + alignment: DS.attr('string') +}); diff --git a/tests/dummy/app/router.js b/tests/dummy/app/router.js index ac30a9c..b3cf39b 100644 --- a/tests/dummy/app/router.js +++ b/tests/dummy/app/router.js @@ -9,6 +9,7 @@ const Router = Ember.Router.extend({ Router.map(function() { this.route('index', { path: '/' }); this.route('editable', { path: '/editable' }); + this.route('ember-data', { path: '/ember-data' }); }); export default Router; diff --git a/tests/dummy/app/routes/ember-data.js b/tests/dummy/app/routes/ember-data.js new file mode 100644 index 0000000..b38abfb --- /dev/null +++ b/tests/dummy/app/routes/ember-data.js @@ -0,0 +1,7 @@ +import Ember from 'ember'; + +export default Ember.Route.extend({ + model() { + return []; + } +}); diff --git a/tests/dummy/app/templates/ember-data.hbs b/tests/dummy/app/templates/ember-data.hbs new file mode 100644 index 0000000..980797e --- /dev/null +++ b/tests/dummy/app/templates/ember-data.hbs @@ -0,0 +1,23 @@ +

Ember Data Test

+{{#link-to 'index'}} + Test Basic Grid +{{/link-to}} + +

Server Paging and Filtering + Row Selection

+

This Fixtable implements server-side paging and filtering, via a query to the Ember Data record store. Responses are mocked using Mirage. It also enables row selection with a callback that builds a string listing the names of the selected characters to display above the table.

+

This example exists to help verify functionality and identify any issues when using Ember Data records rather than arrays of plain JavaScript objects.

+

Selected:

+{{#if selectedNames.length}} +

{{selectedNames}}

+{{else}} +

(none)

+{{/if}} +
+
+ {{fixtable-grid columns=columnDefs content=model + fixtableClass='restrict-height' tableClass='table-hover' + isLoading=isLoading serverPaging=true totalRowsOnServer=meta.total + onReloadContent=(action 'updatePage') possiblePageSizes=possiblePageSizes + rowSelection=true onSelectionChanged=(action 'updateSelection')}} +
+
diff --git a/tests/dummy/app/templates/index.hbs b/tests/dummy/app/templates/index.hbs index 26f20e4..532a6d2 100644 --- a/tests/dummy/app/templates/index.hbs +++ b/tests/dummy/app/templates/index.hbs @@ -1,7 +1,14 @@

Basic Grid Test

-{{#link-to 'editable'}} - Test Editable Grid -{{/link-to}} +

+ {{#link-to 'editable'}} + Test Editable Grid + {{/link-to}} +

+

+ {{#link-to 'ember-data'}} + Test Grid Populated via Ember Data + {{/link-to}} +

Total Rows: {{model.dataRows.length}}