From 6aabe915e891bbbac5cc52658136d87ef21eddfd Mon Sep 17 00:00:00 2001 From: Matias Szylkowski Date: Tue, 21 Dec 2021 14:45:09 -0500 Subject: [PATCH 1/3] Added tasts --- .vscode/tasks.json | 70 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .vscode/tasks.json diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 000000000000..ea550d21e7a9 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,70 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "amp: Run unit test in this file", + "detail": "amp unit --files=${file} --headless --verbose", + "type": "shell", + "command": "amp", + "args": ["unit", "--files=${file}", "--headless", "--verbose"], + "group": "test", + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "shared", + "showReuseMessage": true, + "clear": true + } + }, + { + "label": "amp: Watch unit test in this file", + "detail": "amp unit --files=${file} --headless --verbose --watch", + "type": "shell", + "command": "amp", + "args": ["unit", "--files=${file}", "--headless", "--verbose", "--watch"], + "group": "test", + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "shared", + "showReuseMessage": true, + "clear": true + }, + "isBackground": true + }, + { + "label": "amp: Run unit tests in all changed files", + "detail": "amp unit --local_changes --headless --verbose", + "type": "shell", + "command": "amp", + "args": ["unit", "--local_changes", "--headless", "--verbose"], + "group": "test", + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "shared", + "showReuseMessage": true, + "clear": true + } + }, + { + "label": "amp: Check PR", + "detail": "amp pr-check --nobuild", + "type": "shell", + "command": "amp", + "args": ["pr-check", "--nobuild"], + "group": "test", + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "shared", + "showReuseMessage": true, + "clear": true + } + }, + ] +} \ No newline at end of file From dc1fa876f8e029a54a7cfd4bf2f70795da071102 Mon Sep 17 00:00:00 2001 From: Matias Szylkowski Date: Tue, 21 Dec 2021 14:47:32 -0500 Subject: [PATCH 2/3] Undo --- .vscode/tasks.json | 70 ---------------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 .vscode/tasks.json diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index ea550d21e7a9..000000000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "label": "amp: Run unit test in this file", - "detail": "amp unit --files=${file} --headless --verbose", - "type": "shell", - "command": "amp", - "args": ["unit", "--files=${file}", "--headless", "--verbose"], - "group": "test", - "presentation": { - "echo": true, - "reveal": "always", - "focus": false, - "panel": "shared", - "showReuseMessage": true, - "clear": true - } - }, - { - "label": "amp: Watch unit test in this file", - "detail": "amp unit --files=${file} --headless --verbose --watch", - "type": "shell", - "command": "amp", - "args": ["unit", "--files=${file}", "--headless", "--verbose", "--watch"], - "group": "test", - "presentation": { - "echo": true, - "reveal": "always", - "focus": false, - "panel": "shared", - "showReuseMessage": true, - "clear": true - }, - "isBackground": true - }, - { - "label": "amp: Run unit tests in all changed files", - "detail": "amp unit --local_changes --headless --verbose", - "type": "shell", - "command": "amp", - "args": ["unit", "--local_changes", "--headless", "--verbose"], - "group": "test", - "presentation": { - "echo": true, - "reveal": "always", - "focus": false, - "panel": "shared", - "showReuseMessage": true, - "clear": true - } - }, - { - "label": "amp: Check PR", - "detail": "amp pr-check --nobuild", - "type": "shell", - "command": "amp", - "args": ["pr-check", "--nobuild"], - "group": "test", - "presentation": { - "echo": true, - "reveal": "always", - "focus": false, - "panel": "shared", - "showReuseMessage": true, - "clear": true - } - }, - ] -} \ No newline at end of file From 98628ef869f440e84aace1486f65a168bcac4d9f Mon Sep 17 00:00:00 2001 From: Matias Szylkowski Date: Wed, 29 Dec 2021 10:46:54 -0500 Subject: [PATCH 3/3] Removed all affiliate link code from amp-story --- examples/amp-story/affiliate-link.html | 118 ------------- examples/amp-story/analytics.html | 29 +-- examples/amp-story/auto-analytics.html | 29 +-- .../1.0/amp-story-affiliate-link.css | 167 ------------------ .../amp-story/1.0/amp-story-affiliate-link.js | 164 ----------------- .../1.0/amp-story-embedded-component.js | 2 +- extensions/amp-story/1.0/amp-story-page.js | 17 -- .../amp-story/1.0/amp-story-store-service.js | 10 -- extensions/amp-story/1.0/amp-story.css | 1 - extensions/amp-story/1.0/page-advancement.js | 34 ---- .../test-amp-story-affiliate-link.js | 70 -------- 11 files changed, 3 insertions(+), 638 deletions(-) delete mode 100644 examples/amp-story/affiliate-link.html delete mode 100644 extensions/amp-story/1.0/amp-story-affiliate-link.css delete mode 100644 extensions/amp-story/1.0/amp-story-affiliate-link.js delete mode 100644 extensions/amp-story/1.0/test/integration/test-amp-story-affiliate-link.js diff --git a/examples/amp-story/affiliate-link.html b/examples/amp-story/affiliate-link.html deleted file mode 100644 index 1e1407348fa8..000000000000 --- a/examples/amp-story/affiliate-link.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - My Story - - - - - - - - - - - -

Hello World

-

This is the cover page of this story.

-
-
- - - -

First Page

-

This is the first page of this story.

-
-
- - - -

Second Page

-

This is the second page of this story.

-
- - - - - amp.devamp.devamp.devamp.devamp.devamp.dev - - - - - amp.devamp.devamp.devamp.devamp.devamp.dev - - -
- - - -

Third Page

- - amp.devamp.devamp.devamp.devamp.devamp.dev - - - amp.devamp.devamp.devamp.devamp.devamp.dev - - - amp.devamp.devamp.devamp.devamp.devamp.dev - - - amp.devamp.devamp.devamp.devamp.devamp.dev - - - amp.devamp.devamp.devamp.devamp.devamp.dev - - - amp.devamp.devamp.devamp.devamp.devamp.dev - - - amp.devamp.devamp.devamp.devamp.devamp.dev - -
-
-
- - - - - diff --git a/examples/amp-story/analytics.html b/examples/amp-story/analytics.html index f4597626d4aa..43aeeb61c60e 100644 --- a/examples/amp-story/analytics.html +++ b/examples/amp-story/analytics.html @@ -135,34 +135,7 @@

Page Three

- - -

Page Four

- - amp.devamp.devamp.devamp.devamp.devamp.dev - - - amp.devamp.devamp.devamp.devamp.devamp.dev - - - amp.devamp.devamp.devamp.devamp.devamp.dev - - - amp.devamp.devamp.devamp.devamp.devamp.dev - - - amp.devamp.devamp.devamp.devamp.devamp.dev - - - amp.devamp.devamp.devamp.devamp.devamp.dev - - - amp.devamp.devamp.devamp.devamp.devamp.dev - -
-
- - +

Page Five

Page Three
- - -

Page Four

- - amp.devamp.devamp.devamp.devamp.devamp.dev - - - amp.devamp.devamp.devamp.devamp.devamp.dev - - - amp.devamp.devamp.devamp.devamp.devamp.dev - - - amp.devamp.devamp.devamp.devamp.devamp.dev - - - amp.devamp.devamp.devamp.devamp.devamp.dev - - - amp.devamp.devamp.devamp.devamp.devamp.dev - - - amp.devamp.devamp.devamp.devamp.devamp.dev - -
-
- - +

Page Five

-
- - - - `, - extensions: ['amp-story', 'amp-analytics'], - }, - (env) => { - let browser; - - beforeEach(function () { - browser = new BrowserController(env.win); - return browser.waitForElementLayout('amp-analytics'); - }); - - afterEach(() => { - return RequestBank.tearDown(); - }); - - it.skip('should not send any analytics event on expand', async () => { - browser.click('#blink-1'); - browser.click('h1'); - await expect(RequestBank.withdraw()).to.be.rejected; - }); - - it.skip('should not send any analytics event on collapse', async () => { - browser.click('#blink-1'); - browser.click('h1'); - await expect(RequestBank.withdraw()).to.be.rejected; - }); - - it.skip('should send analytics event on external click', async () => { - browser.click('#blink-1'); - browser.click('#blink-1'); - const req = await RequestBank.withdraw(); - expect(req.url).to.equal('/'); - }); - } - ); -});