Skip to content

Commit

Permalink
Follow the fix instructions on the failed test
Browse files Browse the repository at this point in the history
  • Loading branch information
amandine-trl committed Jan 8, 2025
1 parent 8558197 commit 43d6e1c
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 100 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ FAIL
>> ^~~~~~~~~
amp-story-audio-sticker/0.1/test/validator-amp-story-audio-sticker-no-grid-layer.html:22:8 The tag 'amp-story-audio-sticker' may only appear as a descendant of tag 'amp-story-grid-layer'. (see https://amp.dev/documentation/components/amp-story-audio-sticker)
>> ^~~~~~~~~
amp-story-audio-sticker/0.1/test/validator-amp-story-audio-sticker-no-grid-layer.html:22:8 Tag 'amp-story-audio-sticker' is disallowed as child of tag 'amp-story-page'. Child tag must be one of ['amp-analytics', 'amp-pixel', 'amp-story-animation', 'amp-story-auto-analytics', 'amp-story-cta-layer', 'amp-story-grid-layer', 'amp-story-page-attachment', 'amp-story-page-outlink', 'amp-story-shopping-attachment']. (see https://amp.dev/documentation/components/amp-story)
amp-story-audio-sticker/0.1/test/validator-amp-story-audio-sticker-no-grid-layer.html:22:8 Tag 'amp-story-audio-sticker' is disallowed as child of tag 'amp-story-page'. Child tag must be one of ['amp-analytics', 'amp-pixel', 'amp-social-share', 'amp-story-animation', 'amp-story-auto-analytics', 'amp-story-cta-layer', 'amp-story-grid-layer', 'amp-story-page-attachment', 'amp-story-page-outlink', 'amp-story-shopping-attachment']. (see https://amp.dev/documentation/components/amp-story)
| </amp-story-page>
| </amp-story>
| </body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ amp-story/1.0/test/validator-amp-story-amp-experiment-error.html:36:8 The parent
| <!-- Invalid: amp-experiment not allowed as a child of amp-story-page -->
| <amp-experiment>
>> ^~~~~~~~~
amp-story/1.0/test/validator-amp-story-amp-experiment-error.html:49:6 Tag 'amp-experiment' is disallowed as child of tag 'amp-story-page'. Child tag must be one of ['amp-analytics', 'amp-pixel', 'amp-story-animation', 'amp-story-auto-analytics', 'amp-story-cta-layer', 'amp-story-grid-layer', 'amp-story-page-attachment', 'amp-story-page-outlink', 'amp-story-shopping-attachment']. (see https://amp.dev/documentation/components/amp-story)
amp-story/1.0/test/validator-amp-story-amp-experiment-error.html:49:6 Tag 'amp-experiment' is disallowed as child of tag 'amp-story-page'. Child tag must be one of ['amp-analytics', 'amp-pixel', 'amp-social-share', 'amp-story-animation', 'amp-story-auto-analytics', 'amp-story-cta-layer', 'amp-story-grid-layer', 'amp-story-page-attachment', 'amp-story-page-outlink', 'amp-story-shopping-attachment']. (see https://amp.dev/documentation/components/amp-story)
| <script type="application/json">
| {
| "background-color-test": {
Expand Down
197 changes: 101 additions & 96 deletions extensions/amp-story/1.0/test/validator-amp-story-amp-social-share.out
Original file line number Diff line number Diff line change
@@ -1,101 +1,106 @@
PASS
FAIL
| <!--
| Test Description:
| Tests for the amp-social-share component inside amp-story.
| -->
| <!doctype html>
<html ⚡ lang="en">
<head>
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-story" src="https://cdn.ampproject.org/v0/amp-story-1.0.js"></script>
<script async custom-element="amp-social-share" src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js"></script>
<title>My Story</title>
<meta name="description" content="Get started with amp-story">
<link rel="canonical" href="validator-amp-social-share.html">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<style amp-boilerplate>
body {
-webkit-animation: -amp-start 8s steps(1, end) 0s 1 normal both;
-moz-animation: -amp-start 8s steps(1, end) 0s 1 normal both;
-ms-animation: -amp-start 8s steps(1, end) 0s 1 normal both;
animation: -amp-start 8s steps(1, end) 0s 1 normal both
}

@-webkit-keyframes -amp-start {
from {
visibility: hidden
}

to {
visibility: visible
}
}

@-moz-keyframes -amp-start {
from {
visibility: hidden
}

to {
visibility: visible
}
}

@-ms-keyframes -amp-start {
from {
visibility: hidden
}

to {
visibility: visible
}
}

@-o-keyframes -amp-start {
from {
visibility: hidden
}

to {
visibility: visible
}
}

@keyframes -amp-start {
from {
visibility: hidden
}

to {
visibility: visible
}
}
</style><noscript>
<style amp-boilerplate>
body {
-webkit-animation: none;
-moz-animation: none;
-ms-animation: none;
animation: none
}
</style>
</noscript>
</head>

<body>
<amp-story standalone title="My Story" publisher="Me" publisher-logo-src="http://me.com/logo.png"
poster-portrait-src="http://me.com/poster.jpg">
<amp-story-page id="fill-template-title">
<amp-social-share
class="i-amphtml-layout-fixed i-amphtml-layout-size-defined amp-social-share-system i-amphtml-built i-amphtml-layout i-amphtml-element"
aria-label="Share" type="system" width="48" height="48" i-amphtml-layout="fixed"
style="width: 48px; height: 48px;" role="button" tabindex="0"></amp-social-share>
<amp-story-grid-layer template="vertical">
<p>Content</p>
</amp-story-grid-layer>
</amp-story-page>
</amp-story>
</body>

</html>
| <html ⚡ lang="en">
|
| <head>
| <meta charset="utf-8">
| <script async src="https://cdn.ampproject.org/v0.js"></script>
| <script async custom-element="amp-story" src="https://cdn.ampproject.org/v0/amp-story-1.0.js"></script>
| <script async custom-element="amp-social-share" src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js"></script>
| <title>My Story</title>
| <meta name="description" content="Get started with amp-story">
| <link rel="canonical" href="validator-amp-social-share.html">
| <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
| <style amp-boilerplate>
| body {
| -webkit-animation: -amp-start 8s steps(1, end) 0s 1 normal both;
| -moz-animation: -amp-start 8s steps(1, end) 0s 1 normal both;
| -ms-animation: -amp-start 8s steps(1, end) 0s 1 normal both;
| animation: -amp-start 8s steps(1, end) 0s 1 normal both
| }
|
| @-webkit-keyframes -amp-start {
| from {
| visibility: hidden
| }
|
| to {
| visibility: visible
| }
| }
|
| @-moz-keyframes -amp-start {
| from {
| visibility: hidden
| }
|
| to {
| visibility: visible
| }
| }
|
| @-ms-keyframes -amp-start {
| from {
| visibility: hidden
| }
|
| to {
| visibility: visible
| }
| }
|
| @-o-keyframes -amp-start {
| from {
| visibility: hidden
| }
|
| to {
| visibility: visible
| }
| }
|
| @keyframes -amp-start {
| from {
| visibility: hidden
| }
|
| to {
| visibility: visible
| }
| }
| </style><noscript>
| <style amp-boilerplate>
| body {
| -webkit-animation: none;
| -moz-animation: none;
| -ms-animation: none;
| animation: none
| }
| </style>
| </noscript>
| </head>
|
| <body>
| <amp-story standalone title="My Story" publisher="Me" publisher-logo-src="http://me.com/logo.png"
| poster-portrait-src="http://me.com/poster.jpg">
| <amp-story-page id="fill-template-title">
| <amp-social-share
>> ^~~~~~~~~
amp-story/1.0/test/validator-amp-story-amp-social-share.html:90:6 The attribute 'class' in tag 'amp-social-share' is set to the invalid value 'i-amphtml-layout-fixed i-amphtml-layout-size-defined amp-social-share-system i-amphtml-built i-amphtml-layout i-amphtml-element'. (see https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/style_pages/#disallowed-styles)
>> ^~~~~~~~~
amp-story/1.0/test/validator-amp-story-amp-social-share.html:90:6 The attribute 'i-amphtml-layout' may not appear in tag 'amp-social-share'. (see https://amp.dev/documentation/components/amp-social-share)
| class="i-amphtml-layout-fixed i-amphtml-layout-size-defined amp-social-share-system i-amphtml-built i-amphtml-layout i-amphtml-element"
| aria-label="Share" type="system" width="48" height="48" i-amphtml-layout="fixed"
| style="width: 48px; height: 48px;" role="button" tabindex="0"></amp-social-share>
| <amp-story-grid-layer template="vertical">
| <p>Content</p>
| </amp-story-grid-layer>
| </amp-story-page>
| </amp-story>
| </body>
|
| </html>
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ FAIL
| <!-- Invalid: is not a descendant of amp-story-grid-layer. -->
| <amp-twitter width="375"
>> ^~~~~~~~~
amp-story/1.0/test/validator-amp-story-amp-twitter-error.html:24:6 Tag 'amp-twitter' is disallowed as child of tag 'amp-story-page'. Child tag must be one of ['amp-analytics', 'amp-pixel', 'amp-story-animation', 'amp-story-auto-analytics', 'amp-story-cta-layer', 'amp-story-grid-layer', 'amp-story-page-attachment', 'amp-story-page-outlink', 'amp-story-shopping-attachment']. (see https://amp.dev/documentation/components/amp-story)
amp-story/1.0/test/validator-amp-story-amp-twitter-error.html:24:6 Tag 'amp-twitter' is disallowed as child of tag 'amp-story-page'. Child tag must be one of ['amp-analytics', 'amp-pixel', 'amp-social-share', 'amp-story-animation', 'amp-story-auto-analytics', 'amp-story-cta-layer', 'amp-story-grid-layer', 'amp-story-page-attachment', 'amp-story-page-outlink', 'amp-story-shopping-attachment']. (see https://amp.dev/documentation/components/amp-story)
>> ^~~~~~~~~
amp-story/1.0/test/validator-amp-story-amp-twitter-error.html:24:6 The tag 'amp-twitter' requires including the 'amp-twitter' extension JavaScript. (see https://amp.dev/documentation/components/amp-twitter)
| height="472"
Expand All @@ -34,4 +34,4 @@ amp-story/1.0/test/validator-amp-story-amp-twitter-error.html:24:6 The tag 'amp-
| </amp-story-page>
| </amp-story>
| </body>
| </html>
| </html>

0 comments on commit 43d6e1c

Please sign in to comment.