From f9c9148babd189707e179e05646a40d88abe7a34 Mon Sep 17 00:00:00 2001
From: Nikhil Jha <hi@nikhiljha.com>
Date: Fri, 25 Jan 2019 23:16:23 -0800
Subject: [PATCH] rg "Try It" -l | xargs gsed -i "/Try It/d"

---
 test/integration/backdrops.test.js        |  1 -
 test/integration/backpack.test.js         |  2 -
 test/integration/blocks.test.js           |  7 ----
 test/integration/connection-modal.test.js |  2 -
 test/integration/costumes.test.js         |  9 -----
 test/integration/how-tos.test.js          |  1 -
 test/integration/localization.test.js     |  1 -
 test/integration/menu-bar.test.js         |  6 ---
 test/integration/project-loading.test.js  | 48 -----------------------
 test/integration/sounds.test.js           |  4 --
 test/integration/sprites.test.js          |  9 -----
 test/integration/stage-size.test.js       |  1 -
 12 files changed, 91 deletions(-)

diff --git a/test/integration/backdrops.test.js b/test/integration/backdrops.test.js
index 9a527b2c9..09d398bd1 100644
--- a/test/integration/backdrops.test.js
+++ b/test/integration/backdrops.test.js
@@ -26,7 +26,6 @@ describe('Working with backdrops', () => {
 
     test('Adding a backdrop from the library', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
 
         // Start on the sounds tab of sprite1 to test switching behavior
         await clickText('Sounds');
diff --git a/test/integration/backpack.test.js b/test/integration/backpack.test.js
index cfc78613c..a47722c66 100644
--- a/test/integration/backpack.test.js
+++ b/test/integration/backpack.test.js
@@ -24,7 +24,6 @@ describe('Working with the how-to library', () => {
 
     test('Backpack is "Coming Soon" without backpack host param', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         // Check that the backpack header is visible and wrapped in a coming soon tooltip
         await clickText('Backpack', '*[@data-for="backpack-tooltip"]');
         const logs = await getLogs();
@@ -33,7 +32,6 @@ describe('Working with the how-to library', () => {
 
     test('Backpack can be expanded with backpack host param', async () => {
         await loadUri(`${uri}?backpack_host=some-value`);
-        await clickXpath('//button[@title="Try It"]');
 
         // Try activating the backpack from the costumes tab to make sure it isn't pushed off
         await clickText('Costumes');
diff --git a/test/integration/blocks.test.js b/test/integration/blocks.test.js
index 950d28587..ed2b89eb4 100644
--- a/test/integration/blocks.test.js
+++ b/test/integration/blocks.test.js
@@ -29,7 +29,6 @@ describe('Working with the blocks', () => {
 
     test('Blocks report when clicked in the toolbox', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Code');
         await clickText('Operators', scope.blocksTab);
         await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for scroll animation
@@ -41,7 +40,6 @@ describe('Working with the blocks', () => {
 
     test('Switching sprites updates the block menus', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Sound', scope.blocksTab);
         await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for scroll animation
         // "Meow" sound block should be visible
@@ -58,7 +56,6 @@ describe('Working with the blocks', () => {
 
     test('Creating variables', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Code');
         await clickText('Variables', scope.blocksTab);
         await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for scroll animation
@@ -92,7 +89,6 @@ describe('Working with the blocks', () => {
 
     test('Creating a list', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Code');
         await clickText('Variables', scope.blocksTab);
         await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for scroll animation
@@ -127,7 +123,6 @@ describe('Working with the blocks', () => {
 
     test('Custom procedures', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickText('My Blocks');
         await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for scroll animation
         await clickText('Make a Block');
@@ -146,7 +141,6 @@ describe('Working with the blocks', () => {
 
     test('Adding an extension', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickXpath('//button[@title="Add Extension"]');
 
         await clickText('Pen');
@@ -160,7 +154,6 @@ describe('Working with the blocks', () => {
 
     test.only('Record option from sound block menu opens sound recorder', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Code');
         await clickText('Sound', scope.blocksTab);
         await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for scroll animation
diff --git a/test/integration/connection-modal.test.js b/test/integration/connection-modal.test.js
index 117be5ce5..68ff893f5 100644
--- a/test/integration/connection-modal.test.js
+++ b/test/integration/connection-modal.test.js
@@ -34,7 +34,6 @@ describe('Hardware extension connection modal', () => {
 
     test('Message saying Scratch Link is unavailable (BLE)', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
 
         await driver.executeScript(websocketFakeoutJs);
 
@@ -50,7 +49,6 @@ describe('Hardware extension connection modal', () => {
 
     test('Message saying Scratch Link is unavailable (BT)', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
 
         await driver.executeScript(websocketFakeoutJs);
 
diff --git a/test/integration/costumes.test.js b/test/integration/costumes.test.js
index d46e1a4b0..62e9b4ef1 100644
--- a/test/integration/costumes.test.js
+++ b/test/integration/costumes.test.js
@@ -27,7 +27,6 @@ describe('Working with costumes', () => {
 
     test('Adding a costume through the library', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Costumes');
         await clickXpath('//button[@aria-label="Choose a Costume"]');
         const el = await findByXpath("//input[@placeholder='Search']");
@@ -40,7 +39,6 @@ describe('Working with costumes', () => {
 
     test('Adding a costume by surprise button', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Costumes');
         const el = await findByXpath('//button[@aria-label="Choose a Costume"]');
         await driver.actions().mouseMove(el)
@@ -53,7 +51,6 @@ describe('Working with costumes', () => {
 
     test('Adding a costume by paint button', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Costumes');
         const el = await findByXpath('//button[@aria-label="Choose a Costume"]');
         await driver.actions().mouseMove(el)
@@ -66,7 +63,6 @@ describe('Working with costumes', () => {
 
     test('Duplicating a costume', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Costumes');
 
         await rightClickText('costume1', scope.costumesTab);
@@ -82,7 +78,6 @@ describe('Working with costumes', () => {
 
     test('Converting bitmap/vector in paint editor', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Costumes');
 
         // Convert the first costume to bitmap.
@@ -106,7 +101,6 @@ describe('Working with costumes', () => {
 
     test('Undo/redo in the paint editor', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Costumes');
         await clickText('costume1', scope.costumesTab);
         await clickText('Convert to Bitmap', scope.costumesTab);
@@ -121,7 +115,6 @@ describe('Working with costumes', () => {
 
     test('Adding an svg from file', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Costumes');
         const el = await findByXpath('//button[@aria-label="Choose a Costume"]');
         await driver.actions().mouseMove(el)
@@ -137,7 +130,6 @@ describe('Working with costumes', () => {
 
     test('Adding a png from file (gh-3582)', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Costumes');
         const el = await findByXpath('//button[@aria-label="Choose a Costume"]');
         await driver.actions().mouseMove(el)
@@ -155,7 +147,6 @@ describe('Working with costumes', () => {
         await driver.manage()
             .window()
             .setSize(1244, 768); // Letters filter not visible at 1024 width
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Costumes');
         await clickXpath('//button[@aria-label="Choose a Costume"]');
         await clickText('Letters');
diff --git a/test/integration/how-tos.test.js b/test/integration/how-tos.test.js
index dcdccb499..577031f37 100644
--- a/test/integration/how-tos.test.js
+++ b/test/integration/how-tos.test.js
@@ -25,7 +25,6 @@ describe('Working with the how-to library', () => {
 
     test('Choosing a how-to', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Costumes');
         await clickXpath('//*[@aria-label="Tutorials"]');
         await clickText('Getting Started'); // Modal should close
diff --git a/test/integration/localization.test.js b/test/integration/localization.test.js
index 4fb1e8d59..e96dd059e 100644
--- a/test/integration/localization.test.js
+++ b/test/integration/localization.test.js
@@ -26,7 +26,6 @@ describe('Localization', () => {
 
     test('Localization', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
 
         // Add a sprite to make sure it stays when switching languages
         await clickText('Costumes');
diff --git a/test/integration/menu-bar.test.js b/test/integration/menu-bar.test.js
index 6529b7bc4..b5f0d7eae 100644
--- a/test/integration/menu-bar.test.js
+++ b/test/integration/menu-bar.test.js
@@ -24,7 +24,6 @@ describe('Menu bar settings', () => {
 
     test('File->New should be enabled', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickXpath(
             '//div[contains(@class, "menu-bar_menu-bar-item") and ' +
             'contains(@class, "menu-bar_hoverable")][span[text()="File"]]'
@@ -34,7 +33,6 @@ describe('Menu bar settings', () => {
 
     test('File->Load should be enabled', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickXpath(
             '//div[contains(@class, "menu-bar_menu-bar-item") and ' +
             'contains(@class, "menu-bar_hoverable")][span[text()="File"]]'
@@ -44,7 +42,6 @@ describe('Menu bar settings', () => {
 
     test('File->Save should be enabled', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickXpath(
             '//div[contains(@class, "menu-bar_menu-bar-item") and ' +
             'contains(@class, "menu-bar_hoverable")][span[text()="File"]]'
@@ -54,13 +51,11 @@ describe('Menu bar settings', () => {
 
     test('Share button should NOT be enabled', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await findByXpath('//div[span[div[span[text()="Share"]]] and @data-tip="tooltip"]');
     });
 
     test('Logo should be clickable', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickXpath('//img[@alt="Scratch"]');
         const currentUrl = await driver.getCurrentUrl();
         await expect(currentUrl).toEqual('https://scratch.mit.edu/');
@@ -68,7 +63,6 @@ describe('Menu bar settings', () => {
 
     test('(GH#4064) Project name should be editable', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         const el = await findByXpath('//input[@value="Scratch Project"]');
         await el.sendKeys(' - Personalized');
         await clickText('Costumes'); // just to blur the input
diff --git a/test/integration/project-loading.test.js b/test/integration/project-loading.test.js
index bd305c4aa..0bf85fb4a 100644
--- a/test/integration/project-loading.test.js
+++ b/test/integration/project-loading.test.js
@@ -26,44 +26,11 @@ describe('Loading scratch gui', () => {
 
     describe('Loading projects by ID', () => {
 
-        test('Load 2.0 project using import modal', async () => {
-            await loadUri(uri);
-            await clickText('View 2.0 Project');
-            const el = await findByXpath("//input[@placeholder='scratch.mit.edu/projects/123456789']");
-            const projectId = '96708228';
-            await el.sendKeys(`scratch.mit.edu/projects/${projectId}`);
-            await clickXpath('//button[@title="View Project"]');
-            await new Promise(resolve => setTimeout(resolve, 2000));
-            await clickXpath('//img[@title="Go"]');
-            await new Promise(resolve => setTimeout(resolve, 2000));
-            await clickXpath('//img[@title="Stop"]');
-            const logs = await getLogs();
-            await expect(logs).toEqual([]);
-        });
-
         test('Nonexistent projects show error screen', async () => {
             await loadUri(`${uri}#999999999999999999999`);
             await clickText('Oops! Something went wrong.');
         });
 
-        test('Invalid url when loading project through modal lets you try again', async () => {
-            await loadUri(uri);
-            await clickText('View 2.0 Project');
-            let el = await findByXpath("//input[@placeholder='scratch.mit.edu/projects/123456789']");
-            await el.sendKeys('thisisnotaurl');
-            await clickXpath('//button[@title="View Project"]');
-            el = await findByXpath("//input[@placeholder='scratch.mit.edu/projects/123456789']");
-            await el.clear();
-            await el.sendKeys('scratch.mit.edu/projects/96708228');
-            await clickXpath('//button[@title="View Project"]');
-            await new Promise(resolve => setTimeout(resolve, 2000));
-            await clickXpath('//img[@title="Go"]');
-            await new Promise(resolve => setTimeout(resolve, 2000));
-            await clickXpath('//img[@title="Stop"]');
-            const logs = await getLogs();
-            await expect(logs).toEqual([]);
-        });
-
         test('Load a project by ID directly through url', async () => {
             await driver.quit(); // Reset driver to test hitting # url directly
             driver = getDriver();
@@ -107,11 +74,6 @@ describe('Loading scratch gui', () => {
 
         test('Creating new project resets active tab to Code tab', async () => {
             await loadUri(uri);
-            await clickText('View 2.0 Project');
-            const inputElement = await findByXpath("//input[@placeholder='scratch.mit.edu/projects/123456789']");
-            const projectId = '96708228';
-            await inputElement.sendKeys(`scratch.mit.edu/projects/${projectId}`);
-            await clickXpath('//button[@title="View Project"]');
             await new Promise(resolve => setTimeout(resolve, 2000));
             await findByXpath('//*[span[text()="Costumes"]]');
             await clickText('Costumes');
@@ -126,11 +88,6 @@ describe('Loading scratch gui', () => {
 
         test('Not logged in->made no changes to project->create new project should not show alert', async () => {
             await loadUri(uri);
-            await clickText('View 2.0 Project');
-            const inputElement = await findByXpath("//input[@placeholder='scratch.mit.edu/projects/123456789']");
-            const projectId = '96708228';
-            await inputElement.sendKeys(`scratch.mit.edu/projects/${projectId}`);
-            await clickXpath('//button[@title="View Project"]');
             await new Promise(resolve => setTimeout(resolve, 2000));
             await clickXpath(
                 '//div[contains(@class, "menu-bar_menu-bar-item") and ' +
@@ -143,11 +100,6 @@ describe('Loading scratch gui', () => {
 
         test('Not logged in->made a change to project->create new project should show alert', async () => {
             await loadUri(uri);
-            await clickText('View 2.0 Project');
-            const inputElement = await findByXpath("//input[@placeholder='scratch.mit.edu/projects/123456789']");
-            const projectId = '96708228';
-            await inputElement.sendKeys(`scratch.mit.edu/projects/${projectId}`);
-            await clickXpath('//button[@title="View Project"]');
             await new Promise(resolve => setTimeout(resolve, 2000));
             await clickText('move');
             await clickXpath(
diff --git a/test/integration/sounds.test.js b/test/integration/sounds.test.js
index 3877ada3f..09bfdc5f1 100644
--- a/test/integration/sounds.test.js
+++ b/test/integration/sounds.test.js
@@ -27,7 +27,6 @@ describe('Working with sounds', () => {
 
     test('Adding a sound through the library', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Sounds');
 
         // Delete the sound
@@ -64,7 +63,6 @@ describe('Working with sounds', () => {
 
     test('Adding a sound by surprise button', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Sounds');
         const el = await findByXpath('//button[@aria-label="Choose a Sound"]');
         await driver.actions().mouseMove(el)
@@ -77,7 +75,6 @@ describe('Working with sounds', () => {
 
     test('Duplicating a sound', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Sounds');
 
         await rightClickText('Meow', scope.soundsTab);
@@ -94,7 +91,6 @@ describe('Working with sounds', () => {
     // Regression test for gui issue #1320
     test('Switching sprites with different numbers of sounds', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
 
         // Add a sound so this sprite has 2 sounds.
         await clickText('Sounds');
diff --git a/test/integration/sprites.test.js b/test/integration/sprites.test.js
index a3dd48cf4..76cfae121 100644
--- a/test/integration/sprites.test.js
+++ b/test/integration/sprites.test.js
@@ -29,7 +29,6 @@ describe('Working with sprites', () => {
 
     test('Adding a sprite through the library', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Costumes');
         await clickXpath('//button[@aria-label="Choose a Sprite"]');
         await clickText('Apple', scope.modal); // Closes modal
@@ -41,7 +40,6 @@ describe('Working with sprites', () => {
 
     test('Adding a sprite by surprise button', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         const el = await findByXpath('//button[@aria-label="Choose a Sprite"]');
         await driver.actions().mouseMove(el)
             .perform();
@@ -53,7 +51,6 @@ describe('Working with sprites', () => {
 
     test('Adding a sprite by paint button', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         const el = await findByXpath('//button[@aria-label="Choose a Sprite"]');
         await driver.actions().mouseMove(el)
             .perform();
@@ -66,7 +63,6 @@ describe('Working with sprites', () => {
 
     test('Deleting only sprite does not crash', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for scroll animation
         await rightClickText('Sprite1', scope.spriteTile);
         await clickText('delete', scope.spriteTile);
@@ -78,7 +74,6 @@ describe('Working with sprites', () => {
 
     test('Deleting by x button on sprite tile', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for scroll animation
         await clickXpath('//*[@aria-label="Close"]'); // Only visible close button is on the sprite
         // Confirm that the stage has been switched to
@@ -89,7 +84,6 @@ describe('Working with sprites', () => {
 
     test('Adding a sprite by uploading a png', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         const el = await findByXpath('//button[@aria-label="Choose a Sprite"]');
         await driver.actions().mouseMove(el)
             .perform();
@@ -105,7 +99,6 @@ describe('Working with sprites', () => {
     // Enable when this is fixed issues/3608
     test('Adding a sprite by uploading an svg (gh-3608)', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         const el = await findByXpath('//button[@aria-label="Choose a Sprite"]');
         await driver.actions().mouseMove(el)
             .perform();
@@ -127,7 +120,6 @@ describe('Working with sprites', () => {
         await driver.manage()
             .window()
             .setSize(1244, 768); // Letters filter not visible at 1024 width
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Costumes');
         await clickXpath('//button[@aria-label="Choose a Sprite"]');
         await clickText('Letters');
@@ -140,7 +132,6 @@ describe('Working with sprites', () => {
     test('Use browser back button to close library', async () => {
         await driver.get('https://www.google.com');
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
         await clickText('Costumes');
         await clickXpath('//button[@aria-label="Choose a Sprite"]');
         const abbyElement = await findByText('Abby'); // Should show editor for new costume
diff --git a/test/integration/stage-size.test.js b/test/integration/stage-size.test.js
index ada2e5b16..72de9c5bb 100644
--- a/test/integration/stage-size.test.js
+++ b/test/integration/stage-size.test.js
@@ -26,7 +26,6 @@ describe('Loading scratch gui', () => {
 
     test('Switching small/large stage after highlighting and deleting sprite', async () => {
         await loadUri(uri);
-        await clickXpath('//button[@title="Try It"]');
 
         // Highlight the sprite
         await clickText('Sprite1', scope.spriteTile);
-- 
GitLab