Skip to content

Commit

Permalink
Block fixtures: Change port to 8889 to placate KSES (#37100)
Browse files Browse the repository at this point in the history
Unit tests are currently failing on `trunk` (when used with a current snapshot of the WordPress svn or git repo).

Specifically: `Block_Fixture_Test::test_kses_doesnt_change_fixtures` fails for datasets #54 and #55.

Reading WordPress/wordpress-develop#1998, I believe that the reason might be that our KSES routines are verifying that the specified port matches the one of the local install. And since our tests normally run `localhost:8889`, I'm updating the relevant test fixtures (from previously `8888`) to reflect that.
  • Loading branch information
ockham authored and noisysocks committed Dec 6, 2021
1 parent 83f866a commit b515644
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions test/integration/fixtures/blocks/core__file__pdf-preview.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<!-- wp:file {"href":"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf","displayPreview":true,"previewHeight":370} -->
<div class="wp-block-file"><object class="wp-block-file__embed" data="http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf" type="application/pdf" style="width:100%;height:370px" aria-label="Embed of yolo."></object><a id="wp-block-file--media-_clientId_0" href="http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf">yolo</a><a href="http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf" class="wp-block-file__button" download aria-describedby="wp-block-file--media-_clientId_0">Download</a></div>
<!-- wp:file {"href":"http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf","displayPreview":true,"previewHeight":370} -->
<div class="wp-block-file"><object class="wp-block-file__embed" data="http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf" type="application/pdf" style="width:100%;height:370px" aria-label="Embed of yolo."></object><a id="wp-block-file--media-_clientId_0" href="http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf">yolo</a><a href="http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf" class="wp-block-file__button" download aria-describedby="wp-block-file--media-_clientId_0">Download</a></div>
<!-- /wp:file -->
6 changes: 3 additions & 3 deletions test/integration/fixtures/blocks/core__file__pdf-preview.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
"name": "core/file",
"isValid": true,
"attributes": {
"href": "http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf",
"href": "http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf",
"fileId": "wp-block-file--media-_clientId_0",
"fileName": "yolo",
"textLinkHref": "http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf",
"textLinkHref": "http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf",
"showDownloadButton": true,
"downloadButtonText": "Download",
"displayPreview": true,
"previewHeight": 370
},
"innerBlocks": [],
"originalContent": "<div class=\"wp-block-file\"><object class=\"wp-block-file__embed\" data=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\" type=\"application/pdf\" style=\"width:100%;height:370px\" aria-label=\"Embed of yolo.\"></object><a id=\"wp-block-file--media-_clientId_0\" href=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\">yolo</a><a href=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\" class=\"wp-block-file__button\" download aria-describedby=\"wp-block-file--media-_clientId_0\">Download</a></div>"
"originalContent": "<div class=\"wp-block-file\"><object class=\"wp-block-file__embed\" data=\"http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf\" type=\"application/pdf\" style=\"width:100%;height:370px\" aria-label=\"Embed of yolo.\"></object><a id=\"wp-block-file--media-_clientId_0\" href=\"http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf\">yolo</a><a href=\"http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf\" class=\"wp-block-file__button\" download aria-describedby=\"wp-block-file--media-_clientId_0\">Download</a></div>"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
{
"blockName": "core/file",
"attrs": {
"href": "http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf",
"href": "http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf",
"displayPreview": true,
"previewHeight": 370
},
"innerBlocks": [],
"innerHTML": "\n<div class=\"wp-block-file\"><object class=\"wp-block-file__embed\" data=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\" type=\"application/pdf\" style=\"width:100%;height:370px\" aria-label=\"Embed of yolo.\"></object><a id=\"wp-block-file--media-_clientId_0\" href=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\">yolo</a><a href=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\" class=\"wp-block-file__button\" download aria-describedby=\"wp-block-file--media-_clientId_0\">Download</a></div>\n",
"innerHTML": "\n<div class=\"wp-block-file\"><object class=\"wp-block-file__embed\" data=\"http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf\" type=\"application/pdf\" style=\"width:100%;height:370px\" aria-label=\"Embed of yolo.\"></object><a id=\"wp-block-file--media-_clientId_0\" href=\"http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf\">yolo</a><a href=\"http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf\" class=\"wp-block-file__button\" download aria-describedby=\"wp-block-file--media-_clientId_0\">Download</a></div>\n",
"innerContent": [
"\n<div class=\"wp-block-file\"><object class=\"wp-block-file__embed\" data=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\" type=\"application/pdf\" style=\"width:100%;height:370px\" aria-label=\"Embed of yolo.\"></object><a id=\"wp-block-file--media-_clientId_0\" href=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\">yolo</a><a href=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\" class=\"wp-block-file__button\" download aria-describedby=\"wp-block-file--media-_clientId_0\">Download</a></div>\n"
"\n<div class=\"wp-block-file\"><object class=\"wp-block-file__embed\" data=\"http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf\" type=\"application/pdf\" style=\"width:100%;height:370px\" aria-label=\"Embed of yolo.\"></object><a id=\"wp-block-file--media-_clientId_0\" href=\"http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf\">yolo</a><a href=\"http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf\" class=\"wp-block-file__button\" download aria-describedby=\"wp-block-file--media-_clientId_0\">Download</a></div>\n"
]
}
]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<!-- wp:file {"href":"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf","displayPreview":true,"previewHeight":370} -->
<div class="wp-block-file"><object class="wp-block-file__embed" data="http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf" type="application/pdf" style="width:100%;height:370px" aria-label="Embed of yolo."></object><a id="wp-block-file--media-_clientId_0" href="http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf">yolo</a><a href="http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf" class="wp-block-file__button" download aria-describedby="wp-block-file--media-_clientId_0">Download</a></div>
<!-- wp:file {"href":"http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf","displayPreview":true,"previewHeight":370} -->
<div class="wp-block-file"><object class="wp-block-file__embed" data="http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf" type="application/pdf" style="width:100%;height:370px" aria-label="Embed of yolo."></object><a id="wp-block-file--media-_clientId_0" href="http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf">yolo</a><a href="http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf" class="wp-block-file__button" download aria-describedby="wp-block-file--media-_clientId_0">Download</a></div>
<!-- /wp:file -->
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<!-- wp:file {"href":"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf","displayPreview":true,"previewHeight":370} -->
<div class="wp-block-file"><object class="wp-block-file__embed" data="http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf" type="application/pdf" style="width:100%;height:370px" aria-label="Embed of yolo."></object><a href="http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf">yolo</a><a href="http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf" class="wp-block-file__button" download>Download</a></div>
<!-- wp:file {"href":"http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf","displayPreview":true,"previewHeight":370} -->
<div class="wp-block-file"><object class="wp-block-file__embed" data="http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf" type="application/pdf" style="width:100%;height:370px" aria-label="Embed of yolo."></object><a href="http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf">yolo</a><a href="http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf" class="wp-block-file__button" download>Download</a></div>
<!-- /wp:file -->
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{
"clientId": "_clientId_0",
"name": "core/file",
"isValid": true,
"isValid": false,
"attributes": {
"href": "http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf",
"href": "http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf",
"fileName": "yolo",
"textLinkHref": "http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf",
"showDownloadButton": true,
Expand All @@ -13,6 +13,6 @@
"previewHeight": 370
},
"innerBlocks": [],
"originalContent": "<div class=\"wp-block-file\"><object class=\"wp-block-file__embed\" data=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\" type=\"application/pdf\" style=\"width:100%;height:370px\" aria-label=\"Embed of yolo.\"></object><a href=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\">yolo</a><a href=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\" class=\"wp-block-file__button\" download>Download</a></div>"
"originalContent": "<div class=\"wp-block-file\"><object class=\"wp-block-file__embed\" data=\"http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf\" type=\"application/pdf\" style=\"width:100%;height:370px\" aria-label=\"Embed of yolo.\"></object><a href=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\">yolo</a><a href=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\" class=\"wp-block-file__button\" download>Download</a></div>"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
{
"blockName": "core/file",
"attrs": {
"href": "http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf",
"href": "http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf",
"displayPreview": true,
"previewHeight": 370
},
"innerBlocks": [],
"innerHTML": "\n<div class=\"wp-block-file\"><object class=\"wp-block-file__embed\" data=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\" type=\"application/pdf\" style=\"width:100%;height:370px\" aria-label=\"Embed of yolo.\"></object><a href=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\">yolo</a><a href=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\" class=\"wp-block-file__button\" download>Download</a></div>\n",
"innerHTML": "\n<div class=\"wp-block-file\"><object class=\"wp-block-file__embed\" data=\"http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf\" type=\"application/pdf\" style=\"width:100%;height:370px\" aria-label=\"Embed of yolo.\"></object><a href=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\">yolo</a><a href=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\" class=\"wp-block-file__button\" download>Download</a></div>\n",
"innerContent": [
"\n<div class=\"wp-block-file\"><object class=\"wp-block-file__embed\" data=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\" type=\"application/pdf\" style=\"width:100%;height:370px\" aria-label=\"Embed of yolo.\"></object><a href=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\">yolo</a><a href=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\" class=\"wp-block-file__button\" download>Download</a></div>\n"
"\n<div class=\"wp-block-file\"><object class=\"wp-block-file__embed\" data=\"http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf\" type=\"application/pdf\" style=\"width:100%;height:370px\" aria-label=\"Embed of yolo.\"></object><a href=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\">yolo</a><a href=\"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf\" class=\"wp-block-file__button\" download>Download</a></div>\n"
]
}
]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<!-- wp:file {"href":"http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf","displayPreview":true,"previewHeight":370} -->
<div class="wp-block-file"><object class="wp-block-file__embed" data="http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf" type="application/pdf" style="width:100%;height:370px" aria-label="Embed of yolo."></object><a href="http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf">yolo</a><a href="http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf" class="wp-block-file__button" download>Download</a></div>
<!-- wp:file {"href":"http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf","displayPreview":true,"previewHeight":370} -->
<div class="wp-block-file"><object class="wp-block-file__embed" data="http://localhost:8889/wp-content/uploads/2021/04/yolo.pdf" type="application/pdf" style="width:100%;height:370px" aria-label="Embed of yolo."></object><a href="http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf">yolo</a><a href="http://localhost:8888/wp-content/uploads/2021/04/yolo.pdf" class="wp-block-file__button" download>Download</a></div>
<!-- /wp:file -->

0 comments on commit b515644

Please sign in to comment.