Skip to content

Commit

Permalink
do rtl in same test, remove rtl file, remove behavior logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Enriqe committed Jun 13, 2019
1 parent edd6e8c commit f974b91
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 76 deletions.
10 changes: 2 additions & 8 deletions examples/visual-tests/amp-story/amp-story-live-story.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<script async custom-element="amp-story"
src="https://cdn.ampproject.org/v0/amp-story-1.0.js"></script>
<script async custom-element="amp-live-list" src="https://cdn.ampproject.org/v0/amp-live-list-0.1.js"></script>
<title>amp-story tooltip diff</title>
<title>amp-story live story diff</title>
<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>
Expand All @@ -30,13 +30,7 @@

<amp-story-page id="cover" data-sort-time="1552330790">
<amp-story-grid-layer template="vertical">
<p>Page one of two</p>
</amp-story-grid-layer>
</amp-story-page>

<amp-story-page id="page-1" data-sort-time="1552330791">
<amp-story-grid-layer template="vertical">
<p>Page two of two</p>
<p>Page one of one</p>
</amp-story-grid-layer>
</amp-story-page>
</amp-story>
Expand Down
12 changes: 7 additions & 5 deletions examples/visual-tests/amp-story/amp-story-live-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@
'use strict';

module.exports = {
'Inserting a new page should show a notification in the last page.': async (page, name) => {
await page.tap('amp-story-page#cover');
await page.waitFor('amp-story-page#page-1[active]');
'should show the notification.': async page => {
await page.waitFor('amp-story-page#cover[active]');
await page.$eval('.i-amphtml-story-system-layer', e => e.setAttribute('i-amphtml-story-has-new-page', 'show'));
await page.waitFor(2000); // For animations to finish.
await page.waitForSelector('.i-amphtml-story-has-new-page-notification-container', {opacity: 1});
},
'Inserting a new page should not show a notification if not in the last page.': async (page, name) => {
'[RTL] should show the notification.': async page => {
await page.$eval('body', e => e.setAttribute('dir', 'rtl'));
await page.waitFor('amp-story-page#cover[active]');
await page.$eval('.i-amphtml-story-system-layer', e => e.setAttribute('i-amphtml-story-has-new-page', 'show'));
await page.waitForSelector('.i-amphtml-story-has-new-page-notification-container', {opacity: 0});
await page.waitFor(2000); // For animations to finish.
await page.waitForSelector('.i-amphtml-story-has-new-page-notification-container', {opacity: 1});
},
};
45 changes: 0 additions & 45 deletions examples/visual-tests/amp-story/amp-story-live-story.rtl.html

This file was deleted.

18 changes: 0 additions & 18 deletions test/visual-diff/visual-tests
Original file line number Diff line number Diff line change
Expand Up @@ -671,24 +671,6 @@
],
"interactive_tests": "examples/visual-tests/amp-story/amp-story-live-story.js"
},
{
"url": "examples/visual-tests/amp-story/amp-story-live-story.rtl.html",
"name": "amp-story: live story (rtl)",
"viewport": {"width": 320, "height": 480},
"loading_complete_selectors": [
".i-amphtml-story-loaded"
],
"interactive_tests": "examples/visual-tests/amp-story/amp-story-live-story.js"
},
{
"url": "examples/visual-tests/amp-story/amp-story-live-story.rtl.html",
"name": "amp-story: live story desktop (rtl)",
"viewport": {"width": 1440, "height": 900},
"loading_complete_selectors": [
".i-amphtml-story-loaded",
],
"interactive_tests": "examples/visual-tests/amp-story/amp-story-live-story.js"
},
{
"flaky": true,
// See https://percy.io/ampproject/amphtml/builds/1434487/view/95137509/375?browser=firefox&mode=diff
Expand Down

0 comments on commit f974b91

Please sign in to comment.