Skip to content

Commit

Permalink
Add additional wording to tests (ampproject#34334)
Browse files Browse the repository at this point in the history
Closes ampproject#34260


Adds additional language around using `_top` in swipe up links (opening the link in the parent window for viewers).

(Follow up for ampproject#34030)
  • Loading branch information
Enriqe authored and rochapablo committed Aug 30, 2021
1 parent d9ac189 commit 0a8a623
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/amp-story/1.0/test/test-amp-story-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ describes.realWin('amp-story-page', {amp: {extensions}}, (env) => {
expect(openAttachmentEl).to.exist;
});

it('should build the open attachment UI with target="_top" to navigate in top window', async () => {
it('should build the open attachment UI with target="_top" to navigate in top window. For viewers, this ensures the link will open in the parent window.', async () => {
const attachmentEl = win.document.createElement(
'amp-story-page-attachment'
);
Expand All @@ -695,7 +695,7 @@ describes.realWin('amp-story-page', {amp: {extensions}}, (env) => {
expect(openAttachmentEl.getAttribute('target')).to.eql('_top');
});

it('should build the new outlink page attachment UI with target="_top" to navigate in top level browsing context', async () => {
it('should build the new outlink page attachment UI with target="_top" to navigate in top level browsing context. For viewers, this ensures the link will open in the parent window.', async () => {
toggleExperiment(win, 'amp-story-page-attachment-ui-v2', true);

const attachmentEl = win.document.createElement(
Expand Down

0 comments on commit 0a8a623

Please sign in to comment.