Merge pull request #4485 from LLK/develop

Merge develop to release/2020-10-07
This commit is contained in:
Paul Kaplan 2020-10-07 09:37:03 -04:00 committed by GitHub
commit 657d08fc37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 101 additions and 41 deletions

View file

@ -141,6 +141,6 @@ stages:
- name: test
if: type != cron
- name: smoke
if: type NOT IN (cron, pull_request)
if: type NOT IN (cron, pull_request) AND (branch =~ /^(develop|master|release\/|hotfix\/)/)
- name: update translations
if: branch == develop AND type == cron

12
package-lock.json generated
View file

@ -4128,9 +4128,9 @@
"dev": true
},
"caniuse-lite": {
"version": "1.0.30001140",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001140.tgz",
"integrity": "sha512-xFtvBtfGrpjTOxTpjP5F2LmN04/ZGfYV8EQzUIC/RmKpdrmzJrjqlJ4ho7sGuAMPko2/Jl08h7x9uObCfBFaAA==",
"version": "1.0.30001142",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001142.tgz",
"integrity": "sha512-pDPpn9ankEpBFZXyCv2I4lh1v/ju+bqb78QfKf+w9XgDAFWBwSYPswXqprRdrgQWK0wQnpIbfwRjNHO1HWqvoQ==",
"dev": true
},
"canvas-toBlob": {
@ -17617,9 +17617,9 @@
}
},
"scratch-gui": {
"version": "0.1.0-prerelease.20200929205858",
"resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20200929205858.tgz",
"integrity": "sha512-6WBNI8BmSa+i136EL0MKH0CgVDxaUZXYiJyXJJVla7Tfq+wfdq4Sj31Bl0QmaHJaxxSXmZxos0W7n5qRUCVzfg==",
"version": "0.1.0-prerelease.20201001151313",
"resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20201001151313.tgz",
"integrity": "sha512-Di17Da5r3/qo3vzLuNgXl1KzXM/igEUoV6uwCk8qTPsMyyogNrebAolsQb1JxQXGcthVViK/v86J3DYbZcx+LA==",
"dev": true,
"requires": {
"arraybuffer-loader": "^1.0.6",

View file

@ -128,7 +128,7 @@
"redux-mock-store": "^1.2.3",
"redux-thunk": "2.0.1",
"sass-loader": "6.0.6",
"scratch-gui": "0.1.0-prerelease.20200929205858",
"scratch-gui": "0.1.0-prerelease.20201001151313",
"scratch-l10n": "latest",
"selenium-webdriver": "3.6.0",
"slick-carousel": "1.6.0",

View file

@ -114,7 +114,7 @@ const InstallScratch = ({
<span className="step-description">
{currentOS === OS_ENUM.WINDOWS ?
<FormattedMessage id="download.winMoveToApplications" /> :
<FormattedMessage id="download.macMoveToApplications" />
<FormattedMessage id="download.macMoveAppToApplications" />
}
</span>

View file

@ -18,6 +18,7 @@
"download.scratch2Desktop" : "Scratch 2.0 Offline Editor",
"download.cannotAccessMacStore" : "What if I can't access the Mac App Store?",
"download.cannotAccessWindowsStore" : "What if I can't access the Microsoft Store?",
"download.macMoveAppToApplications": "Open the .dmg file. Move Scratch 3 into Applications.",
"download.macMoveToApplications" : "Open the .dmg file. Move Scratch Desktop into Applications.",
"download.winMoveToApplications" : "Run the .exe file.",
"download.doIHaveToDownload" : "Do I have to download an app to use Scratch?",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 148 KiB

View file

@ -1,32 +0,0 @@
const SeleniumHelper = require('../selenium-helpers.js');
const helper = new SeleniumHelper();
var tap = require('tap');
const test = tap.test;
const driver = helper.buildDriver('www-smoke test-login-failures');
const {
clickText,
findByXpath
} = helper;
var rootUrl = process.env.ROOT_URL || 'https://scratch.ly';
tap.plan(1);
tap.tearDown(function () {
driver.quit();
});
tap.beforeEach(function () {
return driver.get(rootUrl);
});
// Skipping this test while launching new join flow.
// TODO: Add new smoke tests for the new Join flow!
test('Clicking Join Scratch opens scratchr2 iframe', {skip: true}, t => {
clickText('Join Scratch')
.then(() => findByXpath('//iframe[contains(@class, "mod-registration")]'))
.then(() => t.end());
});

View file

@ -0,0 +1,91 @@
const SeleniumHelper = require('./selenium-helpers.js');
const {
findByXpath,
clickXpath,
buildDriver
} = new SeleniumHelper();
let remote = process.env.SMOKE_REMOTE || false;
let rootUrl = process.env.ROOT_URL || 'https://scratch.ly';
let takenUsername = process.env.SMOKE_USERNAME;
if (remote){
jest.setTimeout(60000);
} else {
jest.setTimeout(10000);
}
let driver;
describe('www-integration join flow', () => {
beforeAll(async () => {
driver = await buildDriver('www-integration join flow');
await driver.get(rootUrl);
});
afterAll(async () => await driver.quit());
beforeEach(async () => {
driver.get(rootUrl);
await clickXpath('//a[@class="registrationLink"]');
});
test('click Join opens join modal', async () => {
let joinModal = await findByXpath('//div[@class = "join-flow-outer-content"]');
let modalVisible = await joinModal.isDisplayed();
await expect(modalVisible).toBe(true);
});
test('username validation message appears', async () => {
await clickXpath('//input[contains(@name, "username")]');
let message = await findByXpath('//div[contains(@class, "validation-message")]');
let messageText = await message.getText();
await expect(messageText).toEqual('Don\'t use your real name');
});
test('password validation message appears', async () => {
await clickXpath('//input[contains(@name, "password")]');
let message = await findByXpath('//div[contains(@class, "validation-message")]');
let messageText = await message.getText();
await expect(messageText).toContain('Write it down so you remember.');
});
test('password validation message appears', async () => {
await clickXpath('//input[contains(@name, "passwordConfirm")]');
let message = await findByXpath('//div[contains(@class, "validation-message")]');
let messageText = await message.getText();
await expect(messageText).toEqual('Type password again');
});
test('username validation: too short', async () => {
let textInput = await findByXpath('//input[contains(@name, "username")]');
await textInput.click();
await textInput.sendKeys('ab');
await clickXpath('//div[@class = "join-flow-outer-content"]');
let message = await findByXpath('//div[contains(@class, "validation-error")]');
let messageText = await message.getText();
await expect(messageText).toContain('Must be 3 letters or longer');
});
test('username validation: username taken', async () => {
let textInput = await findByXpath('//input[contains(@name, "username")]');
await textInput.click();
await textInput.sendKeys(takenUsername);
await clickXpath('//div[@class = "join-flow-outer-content"]');
let message = await findByXpath('//div[contains(@class, "validation-error")]');
let messageText = await message.getText();
await expect(messageText).toContain('Username taken.');
});
test('username validation: bad word', async () => {
let textInput = await findByXpath('//input[contains(@name, "username")]');
await textInput.click();
await textInput.sendKeys('qnb02mclepghwic9');
await clickXpath('//div[@class = "join-flow-outer-content"]');
let message = await findByXpath('//div[contains(@class, "validation-error")]');
let messageText = await message.getText();
await expect(messageText).toContain('Username not allowed');
});
});