From 062c0744073e843197b425de34417a96ddce0c60 Mon Sep 17 00:00:00 2001 From: chrisgarrity Date: Mon, 5 Nov 2018 14:57:57 -0500 Subject: [PATCH 1/2] allow query parameters on the preview route Preview needs to be able to handle query parameters for tutorials. --- src/routes.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes.json b/src/routes.json index 3a4ab8904..66cdd36e0 100644 --- a/src/routes.json +++ b/src/routes.json @@ -199,7 +199,7 @@ }, { "name": "preview", - "pattern": "^/preview(/editor|(/\\d+(/editor|/fullscreen)?)?)?/?$", + "pattern": "^/preview(/editor|(/\\d+(/editor|/fullscreen)?)?)?/?(\\?.*)?$", "routeAlias": "/preview/?$", "view": "preview/preview", "title": "Scratch 3.0 Preview" From 13b3e5738120b5ff80eafc494fa6856c1d9beb1d Mon Sep 17 00:00:00 2001 From: chrisgarrity Date: Mon, 12 Nov 2018 12:58:59 -0500 Subject: [PATCH 2/2] open getting started tutorial for logged out users - `create` on the navbar opens the getting started tutorial if the user is not logged in - replaced any other use of `tip_bar=getStarted` with `tutorial=getStarted` (with the exception of Tips page) - did not replace other uses of `tip_bar=home` as those should probably go to the new tips/ideas page. --- src/components/intro/intro.jsx | 2 +- src/components/navigation/www/navigation.jsx | 2 +- src/components/welcome/welcome.jsx | 4 ++-- src/views/faq/l10n.json | 2 +- src/views/messages/message-rows/user-join.jsx | 2 +- .../cypress/smoke-tests/test-navbar-links.js | 2 +- test/integration/smoke-testing/test_navbar_links.js | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/intro/intro.jsx b/src/components/intro/intro.jsx index 243cc4bef..72abb6fa5 100644 --- a/src/components/intro/intro.jsx +++ b/src/components/intro/intro.jsx @@ -39,7 +39,7 @@ class Intro extends React.Component {
Scratch Cat ( >

- + {props.messages['welcome.learn']}

- + Get StartedAbout Scratch page.", "faq.makeGameTitle":"How do I make a game or animation with Scratch?", - "faq.makeGameBody":"Check out the tips page to see lots of ways to get started with Scratch. Or just dive in to the project editor.", + "faq.makeGameBody":"Check out the tips page to see lots of ways to get started with Scratch. Or just dive in to the project editor.", "faq.requirementsTitle":"What are the system requirements for Scratch?", "faq.requirementsBody":"To run Scratch 2.0, you need to be using (1) a Windows, ChromeOS, Mac, or Linux computer; (2) a version of Adobe Flash Player released on or after June 15, 2016; (3) a relatively recent web browser: one of the latest two versions of Chrome (Windows, ChromeOS, Mac or Linux), Firefox (Windows or Mac only), Safari (Mac only), Edge (Windows only), or Internet Explorer 11 (Windows only). If your computer doesn’t meet these requirements, you can try downloading and installing Scratch 1.4, which you can still use to share projects to the Scratch 2.0 website.", "faq.offlineTitle":"Do you have a downloadable version so I can create and view projects offline?", diff --git a/src/views/messages/message-rows/user-join.jsx b/src/views/messages/message-rows/user-join.jsx index 31b88644b..308779937 100644 --- a/src/views/messages/message-rows/user-join.jsx +++ b/src/views/messages/message-rows/user-join.jsx @@ -24,7 +24,7 @@ const UserJoinMessage = props => ( ), makeProjectLink: ( - + {props.intl.formatMessage({id: 'messages.userJoinMakeProject'})} ) diff --git a/test/integration-cypress/cypress/smoke-tests/test-navbar-links.js b/test/integration-cypress/cypress/smoke-tests/test-navbar-links.js index 452cb4d07..bf4f3731a 100644 --- a/test/integration-cypress/cypress/smoke-tests/test-navbar-links.js +++ b/test/integration-cypress/cypress/smoke-tests/test-navbar-links.js @@ -22,7 +22,7 @@ describe('test links in nav bar while signed out', function (){ .click(); cy .url() - .should('eq', baseUrl + '/projects/editor/?tip_bar=home'); + .should('eq', baseUrl + '/projects/editor/?tutorial=getStarted'); }); it('click Explore', function (){ diff --git a/test/integration/smoke-testing/test_navbar_links.js b/test/integration/smoke-testing/test_navbar_links.js index 3f1eac308..e2683fcb8 100644 --- a/test/integration/smoke-testing/test_navbar_links.js +++ b/test/integration/smoke-testing/test_navbar_links.js @@ -33,7 +33,7 @@ tap.beforeEach(function () { // the create link changes depending on whether the user is signed in or not (tips window opens) tap.test('checkCreateLinkWhenSignedOut', function (t) { var xPathLink = '//li[contains(@class, "link") and contains(@class, "create")]/a'; - var expectedHref = '/projects/editor/?tip_bar=home'; + var expectedHref = '/projects/editor/?tutorial=getStarted'; driver.findElement(webdriver.By.xpath(xPathLink)) .then(function (element) { return element.getAttribute('href');