Skip to content

Commit

Permalink
chore: update test snapshots and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Decipher committed Aug 30, 2024
1 parent ca0b957 commit dea5658
Show file tree
Hide file tree
Showing 18 changed files with 1,904 additions and 2,775 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"eslint-plugin-vue": "7.20.0",
"husky": "8.0.3",
"jest": "29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-junit": "16.0.0",
"jest-mock-axios": "4.7.3",
"regenerator-runtime": "0.14.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`DruxtBreadcrumb 404 route 1`] = `
"<div>
<druxtwrapper-stub crumbs=\\"[object Object]\\" value=\\"[object Object]\\">
<druxtwrapper-stub crumbs="[object Object]" value="[object Object]">
<ul>
<li>
<nuxtlink>Home</nuxtlink>
Expand All @@ -14,7 +14,7 @@ exports[`DruxtBreadcrumb 404 route 1`] = `

exports[`DruxtBreadcrumb level 1 1`] = `
"<div>
<druxtwrapper-stub crumbs=\\"[object Object],[object Object]\\" value=\\"[object Object],[object Object]\\">
<druxtwrapper-stub crumbs="[object Object],[object Object]" value="[object Object],[object Object]">
<ul>
<li>
<nuxtlink>Home</nuxtlink>
Expand All @@ -27,7 +27,7 @@ exports[`DruxtBreadcrumb level 1 1`] = `

exports[`DruxtBreadcrumb level 2 1`] = `
"<div>
<druxtwrapper-stub crumbs=\\"[object Object],[object Object],[object Object]\\" value=\\"[object Object],[object Object],[object Object]\\">
<druxtwrapper-stub crumbs="[object Object],[object Object],[object Object]" value="[object Object],[object Object],[object Object]">
<ul>
<li>
<nuxtlink>Home</nuxtlink>
Expand All @@ -43,7 +43,7 @@ exports[`DruxtBreadcrumb level 2 1`] = `

exports[`DruxtBreadcrumb manual path 1`] = `
"<div>
<druxtwrapper-stub crumbs=\\"[object Object],[object Object],[object Object]\\" value=\\"[object Object],[object Object],[object Object]\\">
<druxtwrapper-stub crumbs="[object Object],[object Object],[object Object]" value="[object Object],[object Object],[object Object]">
<ul>
<li>
<nuxtlink>Home</nuxtlink>
Expand All @@ -59,7 +59,7 @@ exports[`DruxtBreadcrumb manual path 1`] = `

exports[`DruxtBreadcrumb missing parent 1`] = `
"<div>
<druxtwrapper-stub crumbs=\\"[object Object],[object Object]\\" value=\\"[object Object],[object Object]\\">
<druxtwrapper-stub crumbs="[object Object],[object Object]" value="[object Object],[object Object]">
<ul>
<li>
<nuxtlink>Home</nuxtlink>
Expand All @@ -80,7 +80,7 @@ exports[`DruxtBreadcrumb no home 1`] = `

exports[`DruxtBreadcrumb root 1`] = `
"<div>
<druxtwrapper-stub crumbs=\\"[object Object]\\" value=\\"[object Object]\\">
<druxtwrapper-stub crumbs="[object Object]" value="[object Object]">
<ul>
<li>/</li>
</ul>
Expand Down
18 changes: 9 additions & 9 deletions packages/druxt/test/__snapshots__/client.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`DruxtClient checkPermissions 1`] = `
Object {
{
"detail": "Required permissions:
- administer node fields",
}
`;

exports[`DruxtClient createResource 1`] = `
Object {
{
"detail": "subject: This value should not be null.",
"source": Object {
"source": {
"pointer": "/data/attributes/subject",
},
"status": "422",
Expand All @@ -35,19 +35,19 @@ Test error details."
`;

exports[`DruxtClient getIndex 1`] = `
Object {
{
"statusText": "Invalid JSON:API endpoint",
}
`;

exports[`DruxtClient getResource 1`] = `
Object {
"detail": "The \\"entity\\" parameter was not converted for the path \\"/jsonapi/node/article/{entity}\\" (route name: \\"jsonapi.node--article.individual\\")",
"links": Object {
"info": Object {
{
"detail": "The "entity" parameter was not converted for the path "/jsonapi/node/article/{entity}" (route name: "jsonapi.node--article.individual")",
"links": {
"info": {
"href": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5",
},
"via": Object {
"via": {
"href": "https://demo-api.druxtjs.org/en/jsonapi/node/article/missing",
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`DruxtModule component custom module - no wrapper 1`] = `
"<div>
<druxtwrapper-stub foo=\\"bar\\">
<druxtwrapper-stub foo="bar">
<div>test</div>
</druxtwrapper-stub>
</div>"
Expand All @@ -17,10 +17,10 @@ exports[`DruxtModule component custom module - wrapper 1`] = `
exports[`DruxtModule component defaults 1`] = `"<div></div>"`;

exports[`DruxtModule component error 1`] = `
Object {
"json": Object {
"errors": Array [
Object {
{
"json": {
"errors": [
{
"details": "Test error",
},
],
Expand All @@ -31,8 +31,8 @@ Object {
`;

exports[`DruxtModule component error 2`] = `
Object {
"json": Object {
{
"json": {
"errors": undefined,
"url": undefined,
},
Expand All @@ -41,8 +41,8 @@ Object {
`;

exports[`DruxtModule component error 3`] = `
Object {
"json": Object {
{
"json": {
"errors": undefined,
"url": undefined,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`DruxtEntity component defaults 1`] = `
Array [
[
"DruxtEntityNodePageDefaultView",
"DruxtEntityNodeDefaultView",
"DruxtEntityNodePageDefault",
Expand All @@ -14,20 +14,20 @@ Array [

exports[`DruxtEntity component defaults 2`] = `
"<div>
<druxtentitynodepage-stub entity=\\"[object Object]\\" fields=\\"[object Object]\\" schema=\\"[object Object]\\" value=\\"[object Object]\\">
<druxtentitynodepage-stub entity="[object Object]" fields="[object Object]" schema="[object Object]" value="[object Object]">
<div>
<div>
<div>
<p>Umami is a fictional food magazine that has been created to demonstrate how you might build a Drupal site using functionality provided 'out of the box'.</p>
<p>For more information visit <a href=\\"https://www.drupal.org/docs/8/umami-drupal-8-demonstration-installation-profile\\">https://www.drupal.org/docs/8/umami-drupal-8-demonstration-installation-profile</a>.</p>
<p>For more information visit <a href="https://www.drupal.org/docs/8/umami-drupal-8-demonstration-installation-profile">https://www.drupal.org/docs/8/umami-drupal-8-demonstration-installation-profile</a>.</p>
</div>
</div>
</div>
<div>
<div>
<div>
<p>Umami is a fictional food magazine that has been created to demonstrate how you might build a Drupal site using functionality provided 'out of the box'.</p>
<p>For more information visit <a href=\\"https://www.drupal.org/docs/8/umami-drupal-8-demonstration-installation-profile\\">https://www.drupal.org/docs/8/umami-drupal-8-demonstration-installation-profile</a>.</p>
<p>For more information visit <a href="https://www.drupal.org/docs/8/umami-drupal-8-demonstration-installation-profile">https://www.drupal.org/docs/8/umami-drupal-8-demonstration-installation-profile</a>.</p>
</div>
</div>
</div>
Expand All @@ -37,8 +37,8 @@ exports[`DruxtEntity component defaults 2`] = `

exports[`DruxtEntity missing schema 1`] = `
"<div>
<div entity=\\"[object Object]\\" value=\\"[object Object]\\">
<druxtdebug-stub summary=\\"Missing display settings for resource type: 'file--file--default'\\">
<div entity="[object Object]" value="[object Object]">
<druxtdebug-stub summary="Missing display settings for resource type: 'file--file--default'">
<div>
<p>Create a Druxt theme component to render the entity.</p>
</div>
Expand All @@ -55,36 +55,36 @@ exports[`DruxtEntity missing schema 1`] = `
</button></div>
<details>
<summary>JSON:API resource</summary><pre><code>{
\\"type\\": \\"file--file\\",
\\"id\\": \\"7adbf02c-6e41-40ae-9124-8b4781f9c160\\",
\\"links\\": {
\\"self\\": {
\\"href\\": \\"https://demo-api.druxtjs.org/en/jsonapi/file/file/7adbf02c-6e41-40ae-9124-8b4781f9c160\\"
"type": "file--file",
"id": "7adbf02c-6e41-40ae-9124-8b4781f9c160",
"links": {
"self": {
"href": "https://demo-api.druxtjs.org/en/jsonapi/file/file/7adbf02c-6e41-40ae-9124-8b4781f9c160"
}
},
\\"attributes\\": {
\\"drupal_internal__fid\\": 3,
\\"langcode\\": \\"en\\",
\\"filename\\": \\"vegan-chocolate-nut-brownies.jpg\\",
\\"uri\\": {
\\"value\\": \\"public://vegan-chocolate-nut-brownies.jpg\\",
\\"url\\": \\"/sites/default/files/vegan-chocolate-nut-brownies.jpg\\"
"attributes": {
"drupal_internal__fid": 3,
"langcode": "en",
"filename": "vegan-chocolate-nut-brownies.jpg",
"uri": {
"value": "public://vegan-chocolate-nut-brownies.jpg",
"url": "/sites/default/files/vegan-chocolate-nut-brownies.jpg"
},
\\"filemime\\": \\"image/jpeg\\",
\\"filesize\\": 109982,
\\"status\\": true,
\\"created\\": \\"2021-05-01T06:24:09+00:00\\",
\\"changed\\": \\"2021-05-01T06:24:09+00:00\\"
"filemime": "image/jpeg",
"filesize": 109982,
"status": true,
"created": "2021-05-01T06:24:09+00:00",
"changed": "2021-05-01T06:24:09+00:00"
},
\\"relationships\\": {
\\"uid\\": {
\\"data\\": null,
\\"links\\": {
\\"related\\": {
\\"href\\": \\"https://demo-api.druxtjs.org/en/jsonapi/file/file/7adbf02c-6e41-40ae-9124-8b4781f9c160/uid\\"
"relationships": {
"uid": {
"data": null,
"links": {
"related": {
"href": "https://demo-api.druxtjs.org/en/jsonapi/file/file/7adbf02c-6e41-40ae-9124-8b4781f9c160/uid"
},
\\"self\\": {
\\"href\\": \\"https://demo-api.druxtjs.org/en/jsonapi/file/file/7adbf02c-6e41-40ae-9124-8b4781f9c160/relationships/uid\\"
"self": {
"href": "https://demo-api.druxtjs.org/en/jsonapi/file/file/7adbf02c-6e41-40ae-9124-8b4781f9c160/relationships/uid"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`DruxtField boolean - form 1`] = `
"<div data=\\"true\\">
<div data=\\"true\\" errors=\\"\\" schema=\\"[object Object]\\" value=\\"true\\"><label><strong data=\\"true\\">Status:</strong><br>
<div><input data=\\"true\\" type=\\"checkbox\\"></div></label></div>
"<div data="true">
<div data="true" errors="" schema="[object Object]" value="true"><label><strong data="true">Status:</strong><br>
<div><input data="true" type="checkbox"></div></label></div>
</div>"
`;
exports[`DruxtField datetime - form 1`] = `
"<div data=\\"2021-10-25T00:48:44+00:00\\">
<div data=\\"2021-10-25T00:48:44+00:00\\" errors=\\"\\" schema=\\"[object Object]\\" value=\\"2021-10-25T00:48:44+00:00\\"><label><strong data=\\"2021-10-25T00:48:44+00:00\\">Created:</strong><br>
<div><input data=\\"2021-10-25T00:48:44+00:00\\" type=\\"datetime-local\\"></div></label></div>
"<div data="2021-10-25T00:48:44+00:00">
<div data="2021-10-25T00:48:44+00:00" errors="" schema="[object Object]" value="2021-10-25T00:48:44+00:00"><label><strong data="2021-10-25T00:48:44+00:00">Created:</strong><br>
<div><input data="2021-10-25T00:48:44+00:00" type="datetime-local"></div></label></div>
</div>"
`;
exports[`DruxtField fallback - form 1`] = `
"<div data=\\"[object Object]\\">
<div data=\\"[object Object]\\" errors=\\"\\" schema=\\"[object Object]\\" value=\\"[object Object]\\"><label><strong data=\\"[object Object]\\">Path:</strong><br>
<div><textarea data=\\"[object Object]\\"></textarea></div></label></div>
"<div data="[object Object]">
<div data="[object Object]" errors="" schema="[object Object]" value="[object Object]"><label><strong data="[object Object]">Path:</strong><br>
<div><textarea data="[object Object]"></textarea></div></label></div>
</div>"
`;
exports[`DruxtField file - view 1`] = `
"<div data=\\"[object Object]\\">
<div data=\\"[object Object]\\" errors=\\"\\" relationship=\\"true\\" schema=\\"[object Object]\\" value=\\"[object Object]\\">
<div data=\\"[object Object]\\">
<div data=\\"[object Object]\\" entity=\\"[object Object]\\" value=\\"[object Object]\\"><a target=\\"_blank\\" href=\\"/sites/default/files/mediterranean-quiche-umami.jpg\\">mediterranean-quiche-umami.jpg</a></div>
"<div data="[object Object]">
<div data="[object Object]" errors="" relationship="true" schema="[object Object]" value="[object Object]">
<div data="[object Object]">
<div data="[object Object]" entity="[object Object]" value="[object Object]"><a target="_blank" href="/sites/default/files/mediterranean-quiche-umami.jpg">mediterranean-quiche-umami.jpg</a></div>
</div>
</div>
</div>"
`;
exports[`DruxtField image - view 1`] = `
"<div data=\\"[object Object]\\">
<div data=\\"[object Object]\\" errors=\\"\\" relationship=\\"true\\" schema=\\"[object Object]\\" value=\\"[object Object]\\">
<div data=\\"[object Object]\\">
<div data=\\"[object Object]\\" entity=\\"[object Object]\\" value=\\"[object Object]\\"><img src=\\"/sites/default/files/mediterranean-quiche-umami.jpg\\"></div>
"<div data="[object Object]">
<div data="[object Object]" errors="" relationship="true" schema="[object Object]" value="[object Object]">
<div data="[object Object]">
<div data="[object Object]" entity="[object Object]" value="[object Object]"><img src="/sites/default/files/mediterranean-quiche-umami.jpg"></div>
</div>
</div>
</div>"
`;
exports[`DruxtField link - view 1`] = `
"<div data=\\"[object Object]\\">
<div data=\\"[object Object]\\" errors=\\"\\" schema=\\"[object Object]\\" value=\\"[object Object]\\"><a data=\\"[object Object]\\" href=\\"https://druxtjs.org\\" target=\\"_blank\\">DruxtJS</a></div>
"<div data="[object Object]">
<div data="[object Object]" errors="" schema="[object Object]" value="[object Object]"><a data="[object Object]" href="https://druxtjs.org" target="_blank">DruxtJS</a></div>
</div>"
`;
exports[`DruxtField text - form 1`] = `
"<div data=\\"About Umami\\">
<div data=\\"About Umami\\" errors=\\"\\" schema=\\"[object Object]\\" value=\\"About Umami\\"><label><strong data=\\"About Umami\\">Title:</strong><br>
<div><input data=\\"About Umami\\"></div></label></div>
"<div data="About Umami">
<div data="About Umami" errors="" schema="[object Object]" value="About Umami"><label><strong data="About Umami">Title:</strong><br>
<div><input data="About Umami"></div></label></div>
</div>"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ exports[`Component - DruxtFieldEntityReferenceEntityView default 1`] = `
"<div>
<!---->
<!---->
<druxtentity-stub wrapper=\\"[object Object]\\" mode=\\"default\\" settings=\\"[object Object]\\" type=\\"pages\\" uuid=\\"fe00c55d-0335-49d6-964e-a868c0c68f9c\\"></druxtentity-stub>
<druxtentity-stub wrapper="[object Object]" mode="default" settings="[object Object]" type="pages" uuid="fe00c55d-0335-49d6-964e-a868c0c68f9c"></druxtentity-stub>
</div>"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`Component - DruxtFieldFileDefault default 1`] = `
"<div>
<!---->
<!---->
<nuxt-link-stub to=\\"/sites/default/files/test/file.ext\\">
<nuxt-link-stub to="/sites/default/files/test/file.ext">
file.ext
</nuxt-link-stub>
</div>"
Expand Down
Loading

0 comments on commit dea5658

Please sign in to comment.