Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✅ [AMP Story] [Page attachments] Update visual tests for new UIs #34223

Merged
merged 33 commits into from
May 24, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
53dc024
visual tests
raxsha May 5, 2021
9cfb203
make pages look same
raxsha May 5, 2021
f935691
nit
raxsha May 5, 2021
13a3a19
revert nit
raxsha May 5, 2021
c062ad1
remove references to inline-dark-theme visual test
raxsha May 5, 2021
4104720
adding images and extra tests
raxsha May 5, 2021
6dd1b20
moving tests for v2 to a diff file
raxsha May 5, 2021
45a8ff9
documenting v2 tests
raxsha May 5, 2021
45f7bfb
adding cover id
raxsha May 5, 2021
ff2fa16
Merge branch 'main' into visual-tests
raxsha May 7, 2021
e2d288a
adding snapshots and experiment
raxsha May 7, 2021
a99ed8a
change IDs
raxsha May 7, 2021
37d4f51
Merge branch 'main' into visual-tests
raxsha May 7, 2021
7068568
merge main
raxsha May 18, 2021
19d5ef8
adding js test navigation
raxsha May 18, 2021
00ef392
adding js test navigation
raxsha May 18, 2021
bcaa096
formatting
raxsha May 18, 2021
14db090
edit tests
raxsha May 18, 2021
af52940
format
raxsha May 18, 2021
9eb4c20
format
raxsha May 18, 2021
3651c33
format
raxsha May 18, 2021
748b74a
adding next page
raxsha May 18, 2021
493b52b
adding next page
raxsha May 18, 2021
0e41dc7
adding rest of pages
raxsha May 18, 2021
f8876b4
lint
raxsha May 18, 2021
f583670
testing adding active on openAttachmentEl
raxsha May 18, 2021
0208ccd
changing selector
raxsha May 18, 2021
8e84f29
typo
raxsha May 18, 2021
5f6fab5
adding important
raxsha May 19, 2021
f1cfe36
Improve targeting of img in remote-content.
processprocess May 21, 2021
84c0e2f
Refactor go to page
processprocess May 24, 2021
06ada9e
Use same interactive tests for desktop.
processprocess May 24, 2021
92793f2
Remove desktop.js
processprocess May 24, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion build-system/test-configs/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ const htmlFixtureGlobs = [
'!examples/visual-tests/amp-story/amp-story-grid-layer-template-horizontal.html',
'!examples/visual-tests/amp-story/amp-story-grid-layer-template-thirds.html',
'!examples/visual-tests/amp-story/amp-story-grid-layer-template-vertical.html',
'!examples/visual-tests/amp-story/amp-story-inline-page-attachment-dark-theme.html',
'!examples/visual-tests/amp-story/amp-story-interactive-quiz-sizing-positioning.html',
'!examples/visual-tests/amp-story/amp-story-landscape-templates.html',
'!examples/visual-tests/amp-story/amp-story-page-attachment.html',
raxsha marked this conversation as resolved.
Show resolved Hide resolved
Expand Down

This file was deleted.

103 changes: 97 additions & 6 deletions examples/visual-tests/amp-story/amp-story-page-attachment.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,114 @@
poster-landscape-src="/examples/visual-tests/picsum.photos/image981_1600x900.jpg"
poster-square-src="/examples/visual-tests/picsum.photos/image981_1600x1600.jpg"
supports-landscape>
<amp-story-page id="cover">
<amp-story-page id="inline-default">
<amp-story-page-attachment layout="nodisplay">
<h1>Some really cool video</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</p>
<amp-video width="auto" height="270" autoplay src="/examples/visual-tests/video/tokyo.mp4" controls>
raxsha marked this conversation as resolved.
Show resolved Hide resolved
</amp-video>
</amp-story-page-attachment>
</amp-story-page>

<amp-story-page id="inline-custom-text">
<amp-story-page-attachment
layout="nodisplay"
cta-text="Custom text">
<h1>Some really cool video</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</p>
</amp-story-page-attachment>
</amp-story-page>

<amp-story-page id="inline-dark-theme">
<amp-story-page-attachment
layout="nodisplay"
theme="dark">
<h1>Some really cool video</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</p>
</amp-story-page-attachment>
</amp-story-page>

<amp-story-page id="inline-dark-theme-1-image">
<amp-story-page-attachment
title="Lorem ipsum"
layout="nodisplay"
cta-image="noimage"
raxsha marked this conversation as resolved.
Show resolved Hide resolved
theme="dark"
>
<h1>Some really cool video</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</p>
</amp-story-page-attachment>
</amp-story-page>

<amp-story-page id="inline-dark-theme-2-images">
raxsha marked this conversation as resolved.
Show resolved Hide resolved
<amp-story-page-attachment
title="Lorem ipsum"
layout="nodisplay"
cta-image="noimage"
cta-image-2="noimage"
raxsha marked this conversation as resolved.
Show resolved Hide resolved
theme="dark"
>
<h1>Some really cool video</h1>
<p>
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</p>
</amp-story-page-attachment>
</amp-story-page>
<amp-story-page id="page-2">

<amp-story-page id="outlink-default">
<amp-story-page-attachment layout="nodisplay" href="https://google.com">
</amp-story-page-attachment>
</amp-story-page>

<amp-story-page id="outlink-custom-text">
raxsha marked this conversation as resolved.
Show resolved Hide resolved
<amp-story-page-attachment
layout="nodisplay"
href="https://google.com"
cta-text="Custom text">
</amp-story-page-attachment>
</amp-story-page>

<amp-story-page id="outlink-no-image">
<amp-story-page-attachment
layout="nodisplay"
href="https://google.com"
cta-image="none">
</amp-story-page-attachment>
</amp-story-page>

<amp-story-page id="outlink-dark-theme">
<amp-story-page-attachment
layout="nodisplay"
href="https://google.com"
theme="dark">
</amp-story-page-attachment>
</amp-story-page>

<amp-story-page id="outlink-custom-background">
raxsha marked this conversation as resolved.
Show resolved Hide resolved
<amp-story-page-attachment
layout="nodisplay"
href="https://google.com"
theme="custom"
cta-accent-color="pink"
cta-accent-element="background">
</amp-story-page-attachment>
</amp-story-page>

<amp-story-page id="outlink-custom-background">
raxsha marked this conversation as resolved.
Show resolved Hide resolved
<amp-story-page-attachment
layout="nodisplay"
href="https://google.com"
theme="custom"
cta-accent-color="pink"
cta-accent-element="text">
</amp-story-page-attachment>
</amp-story-page>
</amp-story>
</body>
</html>
11 changes: 0 additions & 11 deletions test/visual-diff/visual-tests
Original file line number Diff line number Diff line change
Expand Up @@ -878,17 +878,6 @@
"name": "amp-story-360: 360 image rendering",
"viewport": {"width": 320, "height": 480},
"loading_complete_selectors": [".i-amphtml-story-360-loaded"]
},
{
"url": "examples/visual-tests/amp-story/amp-story-inline-page-attachment-dark-theme.html",
"name": "amp-story-inline-page-attachment-dark-theme: displays new inline CTA button with dark theme",
"viewport": {"width": 320, "height": 480},
"loading_complete_selectors": [
".i-amphtml-story-loaded",
"amp-story-page#cover[active]"
],
// for page navigation
"loading_complete_delay_ms": 500
}
]
}