UNPKG

js-data-jsonapi

Version:
504 lines (362 loc) 19.6 kB
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>unit_test_results</title> <style> body { background-color: #eeeeee; padding: 0; margin: 5px; overflow-y: scroll; } #HTMLReporter h1 { font-size: 12px; font-weight: normal; text-align: right; margin: 10px 0 10px 0 !important; } #HTMLReporter { font-size: 11px; font-family: Monaco, "Lucida Console", monospace; line-height: 14px; color: #333333; } #HTMLReporter a { text-decoration: none; } #HTMLReporter a:hover { text-decoration: underline; } #HTMLReporter p, #HTMLReporter h1, #HTMLReporter h2, #HTMLReporter h3, #HTMLReporter h4, #HTMLReporter h5, #HTMLReporter h6 { margin: 0; line-height: 14px; } #HTMLReporter .banner, #HTMLReporter .symbolSummary, #HTMLReporter .summary, #HTMLReporter .resultMessage, #HTMLReporter .specDetail .description, #HTMLReporter .alert .bar, #HTMLReporter .stackTrace { padding-left: 9px; padding-right: 9px; } #HTMLReporter #jasmine_content { position: fixed; right: 100%; } #HTMLReporter .version { color: #aaaaaa; } #HTMLReporter .banner { margin-top: 14px; } #HTMLReporter .duration { color: #aaaaaa; float: right; } #HTMLReporter .exceptions { color: #fff; float: right; margin-top: 5px; margin-right: 5px; } #HTMLReporter .bar { line-height: 28px; font-size: 14px; display: block; color: #eee; } #HTMLReporter .runningAlert { background-color: #666666; } #HTMLReporter .skippedAlert { background-color: #aaaaaa; } #HTMLReporter .skippedAlert:first-child { background-color: #333333; } #HTMLReporter .skippedAlert:hover { text-decoration: none; color: white; text-decoration: underline; } #HTMLReporter .passingAlert { background-color: #a6b779; } #HTMLReporter .passingAlert:first-child { background-color: #5e7d00; } #HTMLReporter .failingAlert { background-color: #cf867e; } #HTMLReporter .failingAlert:first-child { background-color: #b03911; } #HTMLReporter .results { margin-top: 14px; } #HTMLReporter #details { display: none; } #HTMLReporter .resultsMenu { color: #999; background-color: #fff; } #HTMLReporter .summaryMenuItem { font-weight: normal; text-decoration: none; margin-right: 5px; color: #333; } #HTMLReporter .detailsMenuItem { font-weight: normal; text-decoration: none; margin-left: 5px; color: #999; } #HTMLReporter.showDetails .summaryMenuItem { color: #999; } #HTMLReporter.showDetails .detailsMenuItem { color: #333; } #HTMLReporter.showDetails .summaryMenuItem:hover { text-decoration: underline; } #HTMLReporter .detailsMenuItem:hover { text-decoration: underline; } #HTMLReporter.showDetails .summary { display: none; } #HTMLReporter.showDetails #details { display: block; } #HTMLReporter .summary { margin-top: 14px; margin-bottom: 40px; } #HTMLReporter .summary .suite .suite, #HTMLReporter .summary .specSummary { margin-left: 14px; } #HTMLReporter .summary .specSummary.passed { color: #5e7d00; } #HTMLReporter .summary .specSummary.failed { color: #b03911; } #HTMLReporter .summary .specSummary.skipped { color: #ba9d37; } #HTMLReporter .description + .suite { margin-top: 0; } #HTMLReporter .suite { margin-top: 14px; } #HTMLReporter .suite a { color: #333333; } #HTMLReporter #details .specDetail { margin-bottom: 28px; } #HTMLReporter #details .specDetail .description { display: block; color: white; background-color: #b03911; } #HTMLReporter .resultMessage { padding-top: 14px; color: #333333; } #HTMLReporter .resultMessage span.result { display: block; } #HTMLReporter .stackTrace { margin: 5px 0 0 0; max-height: 224px; overflow: auto; line-height: 18px; color: #666666; border: 1px solid #ddd; background: white; white-space: pre; } .fold-buttons { float: right; } .fold-buttons a { color: #fff; font-size: 12px; } .fold-buttons { display: none } #HTMLReporter .br { margin-top: 8px; } #HTMLReporter .section-starter { font-size: 14px; line-height: 18px } #HTMLReporter .summary-section { cursor: -webkit-zoom-out; cursor: -moz-zoom-out; cursor: zoom-out; background: #fafafa; padding: 10px; border-bottom: #eaeaea 1px solid; } #HTMLReporter .summary-section.folded { cursor: -webkit-zoom-in; cursor: -moz-zoom-in; cursor: zoom-in; padding-bottom: 8px; } #HTMLReporter .summary-section.folded div { display: none } #HTMLReporter .summary-section.folded div.section-starter { display: block } /*#HTMLReporter .summary-section:hover { background: #e9e9e9; }*/ #HTMLReporter .summary-section:hover { background: #f5f5f5; } #HTMLReporter .summary-section-totals { font-size: 11px; display: none; margin-left: 11px; overflow: hidden; position: relative; top: -1px; } #HTMLReporter .summary-section.folded .summary-section-totals { display: inline; } #HTMLReporter .summary-section-total { color: #fff; vertical-align: baseline; padding: 1px 8px; } #HTMLReporter .summary-section-total.passed { background: #5e7d00; } #HTMLReporter .summary-section-total.failed { background: #b03911; } #HTMLReporter .summary-section-total.skipped { background: #ba9d37; } #HTMLReporter { font-size: 12px; line-height: 18px; } /*larget font-size*/ </style> </head> <body id="HTMLReporter" class="html-reporter"> <h1>Tested in PhantomJS 2.1.1 (Windows 8 0.0.0) on Mon Feb 13 2017</h1> <div class="alert"> <span class="passingAlert bar"><span class="fold-buttons"><a href="#" onclick="fold();">Fold</a> | <a href="#" onclick="unfold();">Unfold</a></span>53 specs, 0 failed, 1 pending</span> </div> <div class="results"> <div class="summary"> <div class="suite passed"> <span class="description">DSJsonApiAdapter.create(resourceConfig, attrs, options) Adapter CREATE</span> <div class="specSummary passed"> <span class="description">should make a POST request, and NOT include id when not specified by client</span> </div> <div class="specSummary passed"> <span class="description">should make a POST request, and INCLUDE client id when specified by client</span> </div> <div class="specSummary passed"> <span class="description">should make a POST request, to create single object</span> </div> <div class="specSummary passed"> <span class="description">should make a POST request, to create single object and NOT cache response</span> </div> <div class="specSummary passed"> <span class="description">should make a POST request, to create multiple data objects</span> </div> </div> <div class="suite passed"> <span class="description">DSJsonApiAdapter.create(resourceConfig, attrs, options) DS Create:</span> <div class="specSummary passed"> <span class="description">Should make a POST request and send relationship data</span> </div> </div> <div class="suite passed"> <span class="description">DSJsonApiAdapter.destroy(resourceConfig, id, options)</span> <div class="specSummary passed"> <span class="description">should make a DELETE request, with 200 OK response, see : http://jsonapi.org/format/#crud-deleting</span> </div> <div class="specSummary passed"> <span class="description">should make a DELETE request, with 204 OK NoContent response</span> </div> </div> <div class="suite passed"> <span class="description">Test Examples oneToMany Example</span> <div class="specSummary passed"> <span class="description">Should Deserialize the sample oneToMany Json</span> </div> </div> <div class="suite passed"> <span class="description">Test Examples manyToMany Example</span> <div class="specSummary passed"> <span class="description">Should Deserialize the sample manyToMany Json</span> </div> </div> <div class="suite passed"> <span class="description">find DSJsonAdapter.find(resourceConfig, id, options)</span> <div class="specSummary passed"> <span class="description">should make a GET request</span> </div> <div class="specSummary passed"> <span class="description">should allow overriding urlPath</span> </div> <div class="specSummary passed"> <span class="description">should use default configs</span> </div> <div class="specSummary passed"> <span class="description">should log errors</span> </div> <div class="specSummary passed"> <span class="description">should make a GET request and correctly deserialize returned included data</span> </div> <div class="specSummary passed"> <span class="description">should make a GET request and correctly process and inject returned included data</span> </div> <div class="specSummary passed"> <span class="description">should update data store when data is updated on the server after making a GET request</span> </div> <div class="specSummary passed"> <span class="description">should make a GET request and correctly store JsonApi Request links in meta data</span> </div> </div> <div class="suite passed"> <span class="description">find DSJsonAdapter.find(resourceConfig, id, options) Null Result Handling</span> <div class="specSummary passed"> <span class="description">should break relationshiplink when GET request returns a NULL in respose to a request for a &quot;toOne&quot; related object</span> </div> </div> <div class="suite passed"> <span class="description">find DS#find</span> <div class="specSummary passed"> <span class="description">should find data using adapter and CACHE</span> </div> <div class="specSummary passed"> <span class="description">should find data using adapter and NOT CACHE</span> </div> </div> <div class="suite passed"> <span class="description">jsonAPI Serialization, Primay Keys</span> <div class="specSummary passed"> <span class="description">should use a default primary key of &quot;id&quot; when deserializing model, when not specifed in datastore configuration</span> </div> <div class="specSummary passed"> <span class="description">should use a &quot;Named&quot; primary key when specifed in datastore configuration</span> </div> </div> <div class="suite passed"> <span class="description">jsonAPI Serialization, Parent Keys</span> <div class="specSummary passed"> <span class="description">should extract and set ParentId from JsonApi self link and set js-data belongsTo relationship local key</span> </div> <div class="specSummary passed"> <span class="description">should extract and set ParentId from JsonApi self link and set js-data belongsTo relationship local key, when resource endpoint configured</span> </div> </div> <div class="suite passed"> <span class="description">jsonAPI Serialization, Error Response</span> <div class="specSummary passed"> <span class="description">should deserialize Json ErrorResponse</span> </div> </div> <div class="suite passed"> <span class="description">jsonAPI Serialization, Attributes Values</span> <div class="specSummary passed"> <span class="description">should deserialize Json Data when attributes contain null values</span> </div> <div class="specSummary passed"> <span class="description">sould not serialize js-data localKey or LocalKeys into attribute values</span> </div> </div> <div class="suite passed"> <span class="description">jsonAPI Serialization, Attribute Changes</span> <div class="specSummary passed"> <span class="description">should serialize changes to Data correctly include; Updated, Added attributes and removed attributes with a value of null</span> </div> </div> <div class="suite passed"> <span class="description">jsonAPI Serialization, To Many Relationships:</span> <div class="specSummary passed"> <span class="description">should deserialize empty to many relationships and js-data should update to remove previous existing relationship</span> </div> </div> <div class="suite passed"> <span class="description">jsonAPI Serialization, To One Relationships:</span> <div class="specSummary passed"> <span class="description">should break js-data existing relationship, (desired behaviour)</span> </div> <div class="specSummary skipped"> <span class="description">should deserialize empty(null) to one relationships and js-data should update to remove previous existing relationship (TODO Issue #10)</span> </div> </div> <div class="suite passed"> <span class="description">jsonAPI Serialization, Meta Data:</span> <div class="specSummary passed"> <span class="description">should not serialize meta data</span> </div> </div> <div class="suite passed"> <span class="description">jsonAPI Serialization, Fallback behaviour when not JsonApi</span> <div class="specSummary passed"> <span class="description">should fall back to Non-JsonApi serialization when no Json Api content type detected, &quot;Content-Type:application/vnd.api + json&quot;</span> </div> <div class="specSummary passed"> <span class="description">should still use Json Api adapter when, &quot;Content-Type:application/vnd.api + json&quot;</span> </div> </div> <div class="suite passed"> <span class="description">jsonAPI Serialization, Relationships Identified correctly when types contain mixed case and/or no standard java names</span> <div class="specSummary passed"> <span class="description">Should identify and load types that contain nonstandard java characters</span> </div> </div> <div class="suite passed"> <span class="description">Resource.loadRelations(id, [relations],[options]) WITH belongsTo (METHOD#1) loadRelations</span> <div class="specSummary passed"> <span class="description">should make a GET request to load related &quot;oneToMany&quot; data</span> </div> <div class="specSummary passed"> <span class="description">should make a GET request to load related &quot;parent/belongsTo&quot; relation data</span> </div> </div> <div class="suite passed"> <span class="description">Resource.loadRelations(id, [relations],[options]) WITH belongsTo (METHOD#2) findAll</span> <div class="specSummary passed"> <span class="description">should make a GET request to load related data, using findAll</span> </div> </div> <div class="suite passed"> <span class="description">Resource.loadRelations(id, [relations],[options]) WITH belongsTo (METHOD#3) findRelated</span> <div class="specSummary passed"> <span class="description">should make a GET request to load related Post data, using findRelated </span> </div> </div> <div class="suite passed"> <span class="description">Resource.loadRelations(id, [relations],[options]) **WITHOUT** belongsTo (METHOD#1) loadRelations</span> <div class="specSummary passed"> <span class="description">should make a GET request to load related &quot;oneToMany&quot; data</span> </div> <div class="specSummary passed"> <span class="description">should make a GET request to load related &quot;hasOne foreignKey&quot; relation data</span> </div> <div class="specSummary passed"> <span class="description">should make a GET request to load related &quot;hasOne localKey&quot; relation data</span> </div> <div class="specSummary passed"> <span class="description">should make a GET request to load related &quot;hasOne&quot; relation null data</span> </div> </div> <div class="suite passed"> <span class="description">Update Tests DSJsonAdapter.update(resourceConfig, id, attrs, options)</span> <div class="specSummary passed"> <span class="description">should make a PATCH request</span> </div> <div class="specSummary passed"> <span class="description">should make a PUT request</span> </div> <div class="specSummary passed"> <span class="description">should handle server 204 NoContent reponse correctly when PUT (update) data is stored with out any changes on the server. So servers may chose to return no content</span> </div> <div class="specSummary passed"> <span class="description">should handle server 204 NoContent reponse correctly when PATCH (update) data is stored with out any changes on the server. So servers may chose to return no content</span> </div> <div class="specSummary passed"> <span class="description">should fail update when supplied id and object primary key differ</span> </div> </div> <div class="suite passed"> <span class="description">Update Tests DS#Save</span> <div class="specSummary passed"> <span class="description">should save data to adapter, WITHOUT relationships</span> </div> <div class="specSummary passed"> <span class="description">should save data to adapter, WITH relationships</span> </div> </div> <div class="suite passed"> <span class="description">Update Tests DS#updateAll (Create Multiple)</span> <div class="specSummary passed"> <span class="description">should make a POST request with an array</span> </div> <div class="specSummary passed"> <span class="description">should make a PATCH an empty array</span> </div> </div> </div> <div id="details"> </div> <script> var folded = false; document.body.onkeypress = function (e) { if (!e || !e.keyCode) return; switch (e.keyCode) { case 102: toggleFold(); break; case 49: showSummary(); break; } }; function showSummary() { document.body.className = "html-reporter showSummary"; } function showFailures() { document.body.className = "html-reporter showDetails"; } function toggleSection(el) { el.className = el.className === 'summary-section' ? 'summary-section folded' : 'summary-section'; } function toggleFold() { (folded) ? unfold() : fold(); } function fold() { var els = document.querySelectorAll('.summary-section'); for (var i = 0; i < els.length; i++) { els[i].className = 'summary-section folded'; } folded = true; } function unfold() { var els = document.querySelectorAll('.summary-section'); for (var i = 0; i < els.length; i++) { els[i].className = 'summary-section'; } folded = false; } </script> </body> </html>