Skip to content

Commit

Permalink
✅ amp-sidebar and amp-image-lightbox tests in FF ampproject#22033
Browse files Browse the repository at this point in the history
  • Loading branch information
aghassemi authored Apr 27, 2019
1 parent 61cf235 commit 0240129
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import {poll} from '../../../../../testing/iframe';

describe.configure().run('amp-image-lightbox', function() {
describe.configure().skipFirefox().run('amp-image-lightbox', function() {
this.timeout(5000);
const extensions = ['amp-image-lightbox'];
const imageLightboxBody = `
Expand Down
32 changes: 17 additions & 15 deletions extensions/amp-sidebar/0.1/test/integration/test-amp-sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,24 @@ describe.configure().skipSafari().skipEdge().run('amp-sidebar', function() {
win = env.win;
});

// TODO (#16157): this tests times out on Chrome Mobile Webview Android
it.configure().skipChrome().run('should focus on opener on close', () => {
const openerButton = win.document.getElementById('sidebarOpener');
const openedPromise = waitForSidebarOpen(win.document);
openerButton.click();
return openedPromise.then(() => {
const closerButton = win.document.getElementById('sidebarCloser');
const closedPromise = waitForSidebarClose(win.document);
closerButton.click();
return closedPromise;
}).then(() => {
expect(win.document.activeElement).to.equal(openerButton);
});
});
// TODO (#16157, #21999): this tests times out on FF and Chrome
it.configure()
.skipChrome().skipFirefox()
.run('should focus on opener on close', () => {
const openerButton = win.document.getElementById('sidebarOpener');
const openedPromise = waitForSidebarOpen(win.document);
openerButton.click();
return openedPromise.then(() => {
const closerButton = win.document.getElementById('sidebarCloser');
const closedPromise = waitForSidebarClose(win.document);
closerButton.click();
return closedPromise;
}).then(() => {
expect(win.document.activeElement).to.equal(openerButton);
});
});

it.configure().skipIfPropertiesObfuscated().run(
it.configure().skipIfPropertiesObfuscated().skipFirefox().run(
'should not change scroll position after close', () => {
const openerButton = win.document.getElementById('sidebarOpener');
const sidebar = win.document.getElementById('sidebar1');
Expand Down

0 comments on commit 0240129

Please sign in to comment.