Compare commits
122
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
38aa76fae8 | ||
|
|
18c7b58a16 | ||
|
|
d7d38109a8 | ||
|
|
2317758df8 | ||
|
|
25c8253138 | ||
|
|
75f9da9f22 | ||
|
|
8c3ab1df78 | ||
|
|
e04c290587 | ||
|
|
527f8dd3e7 | ||
|
|
251db0108d | ||
|
|
5100a1bd8a | ||
|
|
ee5e2324a8 | ||
|
|
624bf7c965 | ||
|
|
3089503ab1 | ||
|
|
8cac1b1bb7 | ||
|
|
67fe5185fb | ||
|
|
9122b26d1a | ||
|
|
efcd2c9ebc | ||
|
|
181c7ea93f | ||
|
|
a8a0bc437a | ||
|
|
c6bc1c3450 | ||
|
|
1ad0f43d23 | ||
|
|
a3400b3b0f | ||
|
|
523667dfaf | ||
|
|
5599626405 | ||
|
|
d31d42cf3c | ||
|
|
11646d4877 | ||
|
|
e53c8ddd85 | ||
|
|
45cb96f2d4 | ||
|
|
ab0d58ed6c | ||
|
|
bdcddf5655 | ||
|
|
0f0219a4b1 | ||
|
|
aa2890a2ca | ||
|
|
43bddbba14 | ||
|
|
e4af27cd40 | ||
|
|
d390e67542 | ||
|
|
a8b7be6197 | ||
|
|
35da6ace36 | ||
|
|
8590ceb4ce | ||
|
|
96e637cfc0 | ||
|
|
f1470feb0a | ||
|
|
7070b19562 | ||
|
|
931a17462a | ||
|
|
859e636d1a | ||
|
|
7ccf9f5bef | ||
|
|
0f589004a1 | ||
|
|
2df4df0791 | ||
|
|
41296a9624 | ||
|
|
3dbfebe923 | ||
|
|
5e0fc58f27 | ||
|
|
5eb8438782 | ||
|
|
4f0bf3c5aa | ||
|
|
abe79b30ff | ||
|
|
5d1b1fb4c0 | ||
|
|
9265ee6323 | ||
|
|
519256c50c | ||
|
|
17324e5340 | ||
|
|
7d01844371 | ||
|
|
745fa360c3 | ||
|
|
51fbae655e | ||
|
|
c3119aae2c | ||
|
|
bc1b787974 | ||
|
|
e3cc730cd7 | ||
|
|
46743c9bf8 | ||
|
|
d573e34501 | ||
|
|
fac69fbcf4 | ||
|
|
99f2ac586d | ||
|
|
33dc1f7095 | ||
|
|
0707527800 | ||
|
|
f71e117e3a | ||
|
|
d011aca301 | ||
|
|
2c3f3349b5 | ||
|
|
10eef7234f | ||
|
|
17154cefec | ||
|
|
e3d4d6e9d7 | ||
|
|
89918a304f | ||
|
|
74b795ada8 | ||
|
|
40a3b857da | ||
|
|
615927f3f2 | ||
|
|
3d1ad740dd | ||
|
|
4c76f654b7 | ||
|
|
bd835adcd4 | ||
|
|
78e4cfce68 | ||
|
|
deb5889a2c | ||
|
|
2030ad54bc | ||
|
|
a95604008d | ||
|
|
bb21288cff | ||
|
|
f31977489f | ||
|
|
f179587c2e | ||
|
|
fa3d9c9e1e | ||
|
|
459eb2b767 | ||
|
|
4e1c6afe02 | ||
|
|
dc69ccea64 | ||
|
|
03d9f8f2c6 | ||
|
|
5d006cf677 | ||
|
|
6c9657e453 | ||
|
|
e82ec50e7b | ||
|
|
09ccbb4c01 | ||
|
|
e3b2ab22a6 | ||
|
|
a2bc04e5d4 | ||
|
|
a4c81e55c0 | ||
|
|
2b571d9d83 | ||
|
|
6caaaf6f36 | ||
|
|
2b9550f3d9 | ||
|
|
94bb677fd8 | ||
|
|
5b6f33e1a4 | ||
|
|
32723a8876 | ||
|
|
a1fc068dd1 | ||
|
|
225fc772f6 | ||
|
|
2a167ba775 | ||
|
|
193717a1a9 | ||
|
|
4fc140ec2c | ||
|
|
2ffac96579 | ||
|
|
bc57adc12c | ||
|
|
2df0c80b30 | ||
|
|
6414985461 | ||
|
|
059d3f709b | ||
|
|
26ca5da725 | ||
|
|
7b9aed73f3 | ||
|
|
280f139ba2 | ||
|
|
79fe377f19 | ||
|
|
b2dd3ed421 |
No files matched your search
@@ -0,0 +1,207 @@
|
||||
version: 2.1
|
||||
aliases:
|
||||
- &save_git_cache
|
||||
save_cache:
|
||||
paths:
|
||||
- .git
|
||||
key: v1-git-{{ .Revision }}
|
||||
- &restore_git_cache
|
||||
restore_cache:
|
||||
keys:
|
||||
- v1-git-{{ .Revision }}
|
||||
- v1-git-
|
||||
- &save_build_cache
|
||||
save_cache:
|
||||
paths:
|
||||
- build
|
||||
key: v1-build-{{ .Revision }}
|
||||
- &restore_build_cache
|
||||
restore_cache:
|
||||
keys:
|
||||
- v1-build-{{ .Revision }}
|
||||
- &save_dist_cache
|
||||
save_cache:
|
||||
paths:
|
||||
- dist
|
||||
key: v1-dist-{{ .Revision }}
|
||||
- &restore_dist_cache
|
||||
restore_cache:
|
||||
keys:
|
||||
- v1-dist-{{ .Revision }}
|
||||
- &save_npm_cache
|
||||
save_cache:
|
||||
paths:
|
||||
- node_modules
|
||||
key: v1-npm-{{ checksum "package-lock.json" }}
|
||||
- &restore_npm_cache
|
||||
restore_cache:
|
||||
keys:
|
||||
- v1-npm-{{ checksum "package-lock.json" }}
|
||||
- v1-npm-
|
||||
- &defaults
|
||||
docker:
|
||||
- image: circleci/node:8.16-browsers
|
||||
working_directory: ~/repo
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- *restore_git_cache
|
||||
- checkout
|
||||
- *restore_npm_cache
|
||||
- run: npm install
|
||||
- *save_git_cache
|
||||
- *save_npm_cache
|
||||
lint:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- *restore_git_cache
|
||||
- checkout
|
||||
- *restore_npm_cache
|
||||
- run:
|
||||
name: Lint
|
||||
command: npm run test:lint -- --quiet --output-file test-results/eslint/results.xml --format junit
|
||||
- store_test_results:
|
||||
path: test-results
|
||||
unit:
|
||||
<<: *defaults
|
||||
environment:
|
||||
JEST_JUNIT_OUTPUT_NAME: results.xml
|
||||
steps:
|
||||
- *restore_git_cache
|
||||
- checkout
|
||||
- *restore_npm_cache
|
||||
- run:
|
||||
name: Unit
|
||||
environment:
|
||||
JEST_JUNIT_OUTPUT_DIR: test-results/unit
|
||||
command: npm run test:unit -- --reporters="default" --reporters="jest-junit" --coverage --coverageReporters=text --coverageReporters=lcov
|
||||
- store_artifacts:
|
||||
path: coverage
|
||||
- store_test_results:
|
||||
path: test-results
|
||||
build:
|
||||
<<: *defaults
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
NODE_OPTIONS: --max-old-space-size=4000
|
||||
steps:
|
||||
- *restore_git_cache
|
||||
- checkout
|
||||
- *restore_npm_cache
|
||||
- run:
|
||||
name: Build
|
||||
command: npm run build
|
||||
- *save_build_cache
|
||||
- *save_dist_cache
|
||||
store_build:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- *restore_build_cache
|
||||
- store_artifacts:
|
||||
path: build
|
||||
store_dist:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- *restore_dist_cache
|
||||
- store_artifacts:
|
||||
path: dist
|
||||
integration:
|
||||
<<: *defaults
|
||||
parallelism: 2
|
||||
environment:
|
||||
JEST_JUNIT_OUTPUT_NAME: results.txt
|
||||
steps:
|
||||
- *restore_git_cache
|
||||
- checkout
|
||||
- *restore_npm_cache
|
||||
- *restore_build_cache
|
||||
- run:
|
||||
name: Integration
|
||||
environment:
|
||||
JEST_JUNIT_OUTPUT_DIR: test-results/integration
|
||||
command: |
|
||||
export TESTFILES=$(circleci tests glob "test/integration/*.test.js" | circleci tests split --split-by=timings)
|
||||
$(npm bin)/jest ${TESTFILES} --reporters="default" --reporters="jest-junit"
|
||||
- store_test_results:
|
||||
path: test-results
|
||||
|
||||
deploy-npm:
|
||||
<<: *defaults
|
||||
environment:
|
||||
NODE_OPTIONS: --max-old-space-size=4000
|
||||
steps:
|
||||
- *restore_git_cache
|
||||
- *restore_dist_cache
|
||||
- checkout
|
||||
- run: |
|
||||
echo export RELEASE_VERSION="0.1.0-prerelease.$(date +'%Y%m%d%H%M%S')" >> $BASH_ENV
|
||||
echo export NPM_TAG=circlelatest >> $BASH_ENV
|
||||
if [ "$CIRCLE_BRANCH" == "master" ]
|
||||
then echo export NPM_TAG=circlestable >> $BASH_ENV
|
||||
fi
|
||||
if [[ "$CIRCLE_BRANCH" == hotfix/* ]] # double brackets are important for matching the wildcard
|
||||
then echo export NPM_TAG=circlehotfix >> $BASH_ENV
|
||||
fi
|
||||
- run: npm version --no-git-tag-version $RELEASE_VERSION
|
||||
- run: |
|
||||
npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN
|
||||
npm publish --tag $NPM_TAG
|
||||
- run: git tag $RELEASE_VERSION
|
||||
- run: git push $CIRCLE_REPOSITORY_URL $RELEASE_VERSION
|
||||
|
||||
deploy-gh-pages:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- *restore_git_cache
|
||||
- checkout
|
||||
- *restore_npm_cache
|
||||
- *restore_build_cache
|
||||
- run: |
|
||||
git config --global user.email $(git log --pretty=format:"%ae" -n1)
|
||||
git config --global user.name $(git log --pretty=format:"%an" -n1)
|
||||
- run: npm run deploy -- -e $CIRCLE_BRANCH
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build-test-deploy:
|
||||
jobs:
|
||||
- setup
|
||||
- lint:
|
||||
requires:
|
||||
- setup
|
||||
- unit:
|
||||
requires:
|
||||
- setup
|
||||
- build:
|
||||
requires:
|
||||
- setup
|
||||
- integration:
|
||||
requires:
|
||||
- build
|
||||
- store_build:
|
||||
requires:
|
||||
- build
|
||||
- store_dist:
|
||||
requires:
|
||||
- build
|
||||
# Disable deployment while running in parallel with Travis
|
||||
# - deploy-npm:
|
||||
# requires:
|
||||
# - lint
|
||||
# - unit
|
||||
# - integration
|
||||
# - build
|
||||
# filters:
|
||||
# branches:
|
||||
# only:
|
||||
# - master
|
||||
# - develop
|
||||
# - /^hotfix\/.*/
|
||||
# - deploy-gh-pages:
|
||||
# requires:
|
||||
# - lint
|
||||
# - unit
|
||||
# - integration
|
||||
# - build
|
||||
+5
-2
@@ -1,16 +1,18 @@
|
||||
language: node_js
|
||||
sudo: required
|
||||
dist: trusty
|
||||
dist: xenial
|
||||
addons:
|
||||
chrome: stable
|
||||
node_js:
|
||||
- 8
|
||||
env:
|
||||
global:
|
||||
- CHROMEDRIVER_VERSION=LATEST
|
||||
- NODE_ENV=production
|
||||
- SMOKE_URL=https://llk.github.io/scratch-gui/$TRAVIS_PULL_REQUEST_BRANCH
|
||||
- NODE_OPTIONS=--max-old-space-size=7250
|
||||
- NPM_TAG=latest
|
||||
- RELEASE_VERSION="0.1.0-prerelease.$(date +'%Y%m%d%H%M%S')"
|
||||
- SMOKE_URL=https://llk.github.io/scratch-gui/$TRAVIS_PULL_REQUEST_BRANCH
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
@@ -74,6 +76,7 @@ deploy:
|
||||
on:
|
||||
all_branches: true
|
||||
condition: $TRAVIS_EVENT_TYPE != cron && ! $TRAVIS_BRANCH =~ ^greenkeeper/
|
||||
tags: false # Don't push tags to gh-pages
|
||||
skip_cleanup: true
|
||||
script: npm run deploy -- -x -e $TRAVIS_BRANCH -r https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
|
||||
- provider: script
|
||||
|
||||
Generated
+588
-522
File diff suppressed because it is too large.
Load diff
+8
-7
@@ -44,7 +44,7 @@
|
||||
"babel-loader": "^8.0.4",
|
||||
"base64-loader": "1.0.0",
|
||||
"bowser": "1.9.4",
|
||||
"chromedriver": "76.0.0",
|
||||
"chromedriver": "77.0.0",
|
||||
"classnames": "2.2.6",
|
||||
"computed-style-to-inline-style": "3.0.0",
|
||||
"copy-webpack-plugin": "^4.5.1",
|
||||
@@ -67,6 +67,7 @@
|
||||
"immutable": "3.8.2",
|
||||
"intl": "1.2.5",
|
||||
"jest": "^21.0.0",
|
||||
"jest-junit": "^7.0.0",
|
||||
"js-base64": "2.4.9",
|
||||
"keymirror": "0.1.1",
|
||||
"lodash.bindall": "4.4.0",
|
||||
@@ -106,14 +107,14 @@
|
||||
"redux-mock-store": "^1.2.3",
|
||||
"redux-throttle": "0.1.1",
|
||||
"rimraf": "^2.6.1",
|
||||
"scratch-audio": "0.1.0-prerelease.20190114210212",
|
||||
"scratch-l10n": "3.5.20190910223701",
|
||||
"scratch-blocks": "0.1.0-prerelease.1568071968",
|
||||
"scratch-paint": "0.2.0-prerelease.20190822205009",
|
||||
"scratch-render": "0.1.0-prerelease.20190905011937",
|
||||
"scratch-audio": "0.1.0-prerelease.20190925183642",
|
||||
"scratch-l10n": "3.6.20191008224547",
|
||||
"scratch-blocks": "0.1.0-prerelease.1570730963",
|
||||
"scratch-paint": "0.2.0-prerelease.20191010161144",
|
||||
"scratch-render": "0.1.0-prerelease.20191001200908",
|
||||
"scratch-storage": "1.3.2",
|
||||
"scratch-svg-renderer": "0.2.0-prerelease.20190822202608",
|
||||
"scratch-vm": "0.2.0-prerelease.20190904154449",
|
||||
"scratch-vm": "0.2.0-prerelease.20191001145300",
|
||||
"selenium-webdriver": "3.6.0",
|
||||
"startaudiocontext": "1.2.1",
|
||||
"style-loader": "^0.23.0",
|
||||
|
||||
@@ -20,8 +20,10 @@
|
||||
border: 1px solid $ui-black-transparent;
|
||||
border-radius: 5px;
|
||||
padding: 3px;
|
||||
|
||||
/* Force these to be on their own render layer because they update often */
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
.meter-container {
|
||||
margin-right: 5px;
|
||||
height: 180px;
|
||||
|
||||
@@ -265,6 +265,7 @@ const SoundEditor = props => (
|
||||
onClick={props.onSlower}
|
||||
/>
|
||||
<IconButton
|
||||
disabled={props.tooLoud}
|
||||
className={classNames(styles.effectButton, styles.flipInRtl)}
|
||||
img={louderIcon}
|
||||
title={<FormattedMessage {...messages.louder} />}
|
||||
@@ -340,6 +341,7 @@ SoundEditor.propTypes = {
|
||||
onUndo: PropTypes.func.isRequired,
|
||||
playhead: PropTypes.number,
|
||||
setRef: PropTypes.func,
|
||||
tooLoud: PropTypes.bool.isRequired,
|
||||
trimEnd: PropTypes.number,
|
||||
trimStart: PropTypes.number
|
||||
};
|
||||
|
||||
@@ -340,9 +340,9 @@ class Blocks extends React.Component {
|
||||
const targetSounds = target.getSounds();
|
||||
const dynamicBlocksXML = this.props.vm.runtime.getBlocksXML();
|
||||
return makeToolboxXML(target.isStage, target.id, dynamicBlocksXML,
|
||||
targetCostumes[0].name,
|
||||
stageCostumes[0].name,
|
||||
targetSounds.length > 0 ? targetSounds[0].name : ''
|
||||
targetCostumes[targetCostumes.length - 1].name,
|
||||
stageCostumes[stageCostumes.length - 1].name,
|
||||
targetSounds.length > 0 ? targetSounds[targetSounds.length - 1].name : ''
|
||||
);
|
||||
} catch {
|
||||
return null;
|
||||
|
||||
@@ -44,10 +44,10 @@ class RecordingStep extends React.Component {
|
||||
alert(this.props.intl.formatMessage(messages.alertMsg)); // eslint-disable-line no-alert
|
||||
}
|
||||
handleLevelUpdate (level) {
|
||||
this.setState({level});
|
||||
if (this.props.recording) {
|
||||
this.setState({levels: (this.state.levels || []).concat([level])});
|
||||
}
|
||||
this.setState({
|
||||
level: level,
|
||||
levels: this.props.recording ? (this.state.levels || []).concat([level]) : this.state.levels
|
||||
});
|
||||
}
|
||||
handleRecord () {
|
||||
this.audioRecorder.startRecording();
|
||||
|
||||
@@ -14,6 +14,8 @@ import log from '../lib/log.js';
|
||||
|
||||
const UNDO_STACK_SIZE = 99;
|
||||
|
||||
const MAX_RMS = 1.2;
|
||||
|
||||
class SoundEditor extends React.Component {
|
||||
constructor (props) {
|
||||
super(props);
|
||||
@@ -265,6 +267,15 @@ class SoundEditor extends React.Component {
|
||||
}
|
||||
});
|
||||
}
|
||||
tooLoud () {
|
||||
const numChunks = this.state.chunkLevels.length;
|
||||
const startIndex = this.state.trimStart === null ?
|
||||
0 : Math.floor(this.state.trimStart * numChunks);
|
||||
const endIndex = this.state.trimEnd === null ?
|
||||
numChunks - 1 : Math.ceil(this.state.trimEnd * numChunks);
|
||||
const trimChunks = this.state.chunkLevels.slice(startIndex, endIndex);
|
||||
return Math.max(...trimChunks) > MAX_RMS;
|
||||
}
|
||||
getUndoItem () {
|
||||
return {
|
||||
...this.copyCurrentBuffer(),
|
||||
@@ -399,6 +410,7 @@ class SoundEditor extends React.Component {
|
||||
name={this.props.name}
|
||||
playhead={this.state.playhead}
|
||||
setRef={this.setRef}
|
||||
tooLoud={this.tooLoud()}
|
||||
trimEnd={this.state.trimEnd}
|
||||
trimStart={this.state.trimStart}
|
||||
onChangeName={this.handleChangeName}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import 'get-float-time-domain-data';
|
||||
import getUserMedia from 'get-user-media-promise';
|
||||
import SharedAudioContext from './shared-audio-context.js';
|
||||
import {computeRMS} from './audio-util.js';
|
||||
import {computeRMS, computeChunkedRMS} from './audio-util.js';
|
||||
|
||||
class AudioRecorder {
|
||||
constructor () {
|
||||
this.audioContext = new SharedAudioContext();
|
||||
this.bufferLength = 1024;
|
||||
this.bufferLength = 8192;
|
||||
|
||||
this.userMediaStream = null;
|
||||
this.mediaStreamSource = null;
|
||||
@@ -51,7 +51,7 @@ class AudioRecorder {
|
||||
this.userMediaStream = userMediaStream;
|
||||
this.mediaStreamSource = this.audioContext.createMediaStreamSource(userMediaStream);
|
||||
this.sourceNode = this.audioContext.createGain();
|
||||
this.scriptProcessorNode = this.audioContext.createScriptProcessor(this.bufferLength, 2, 2);
|
||||
this.scriptProcessorNode = this.audioContext.createScriptProcessor(this.bufferLength, 1, 1);
|
||||
|
||||
this.scriptProcessorNode.onaudioprocess = processEvent => {
|
||||
if (this.recording && !this.disposed) {
|
||||
@@ -68,9 +68,9 @@ class AudioRecorder {
|
||||
|
||||
const update = () => {
|
||||
if (this.disposed) return;
|
||||
requestAnimationFrame(update);
|
||||
this.analyserNode.getFloatTimeDomainData(dataArray);
|
||||
onUpdate(computeRMS(dataArray));
|
||||
requestAnimationFrame(update);
|
||||
};
|
||||
|
||||
requestAnimationFrame(update);
|
||||
@@ -83,7 +83,16 @@ class AudioRecorder {
|
||||
}
|
||||
|
||||
stop () {
|
||||
const chunkLevels = this.buffers.map(buffer => computeRMS(buffer));
|
||||
const buffer = new Float32Array(this.buffers.length * this.bufferLength);
|
||||
|
||||
let offset = 0;
|
||||
for (let i = 0; i < this.buffers.length; i++) {
|
||||
const bufferChunk = this.buffers[i];
|
||||
buffer.set(bufferChunk, offset);
|
||||
offset += bufferChunk.length;
|
||||
}
|
||||
|
||||
const chunkLevels = computeChunkedRMS(buffer);
|
||||
const maxRMS = Math.max.apply(null, chunkLevels);
|
||||
const threshold = maxRMS / 8;
|
||||
|
||||
@@ -105,15 +114,6 @@ class AudioRecorder {
|
||||
trimEnd = 1;
|
||||
}
|
||||
|
||||
const buffer = new Float32Array(this.buffers.length * this.bufferLength);
|
||||
|
||||
let offset = 0;
|
||||
for (let i = 0; i < this.buffers.length; i++) {
|
||||
const bufferChunk = this.buffers[i];
|
||||
buffer.set(bufferChunk, offset);
|
||||
offset += bufferChunk.length;
|
||||
}
|
||||
|
||||
return {
|
||||
levels: chunkLevels,
|
||||
samples: buffer,
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
},
|
||||
{
|
||||
"name": "Basketball 1",
|
||||
"md5": "e494c4f44897d94e0541f7036a302449.svg",
|
||||
"md5": "ae21eac3d1814aee1d37ae82ea287816.svg",
|
||||
"type": "backdrop",
|
||||
"tags": [
|
||||
"sports",
|
||||
|
||||
@@ -2563,7 +2563,7 @@
|
||||
},
|
||||
{
|
||||
"name": "Dinosaur1-c",
|
||||
"md5": "a2bb28d5ba55ba997bec63772437cecf.svg",
|
||||
"md5": "78f7e20f0e187fdca81195e4cc134175.svg",
|
||||
"type": "costume",
|
||||
"tags": [
|
||||
"animals",
|
||||
@@ -10493,7 +10493,7 @@
|
||||
},
|
||||
{
|
||||
"name": "Watermelon-a",
|
||||
"md5": "26fecef75cf3b6e0d98bff5c06475036.svg",
|
||||
"md5": "8736ecc2524895733534c888cd91fa1f.svg",
|
||||
"type": "costume",
|
||||
"tags": [
|
||||
"food",
|
||||
@@ -10511,7 +10511,7 @@
|
||||
},
|
||||
{
|
||||
"name": "Watermelon-b",
|
||||
"md5": "fbdaf4d1d349edd3ddf3a1c4528aa9ec.svg",
|
||||
"md5": "1ed1c8b78eae2ee7422074d7f883031d.svg",
|
||||
"type": "costume",
|
||||
"tags": [
|
||||
"food",
|
||||
@@ -10528,7 +10528,7 @@
|
||||
},
|
||||
{
|
||||
"name": "Watermelon-c",
|
||||
"md5": "5976c10412306fc093c1d1930fa05119.svg",
|
||||
"md5": "677738282686d2dcce35d731c3ddc043.svg",
|
||||
"type": "costume",
|
||||
"tags": [
|
||||
"food",
|
||||
|
||||
@@ -119,7 +119,7 @@ import pongResetScore from './steps/pong-reset-score.en.png';
|
||||
import pongAddLineSprite from './steps/pong-add-line.en.gif';
|
||||
import pongGameOver from './steps/pong-game-over.en.png';
|
||||
|
||||
// Imagine If
|
||||
// Imagine a World
|
||||
import imagineTypeWhatYouWant from './steps/imagine-type-what-you-want.en.png';
|
||||
import imagineClickGreenFlag from './steps/imagine-click-green-flag.en.png';
|
||||
import imagineChooseBackdrop from './steps/imagine-choose-backdrop.en.png';
|
||||
@@ -292,7 +292,7 @@ const enImages = {
|
||||
pongAddLineSprite: pongAddLineSprite,
|
||||
pongGameOver: pongGameOver,
|
||||
|
||||
// Imagine If
|
||||
// Imagine a World
|
||||
imagineTypeWhatYouWant: imagineTypeWhatYouWant,
|
||||
imagineClickGreenFlag: imagineClickGreenFlag,
|
||||
imagineChooseBackdrop: imagineChooseBackdrop,
|
||||
|
||||
@@ -42,8 +42,8 @@ import libraryMakeFly from './thumbnails/make-it-fly.jpg';
|
||||
// Pong
|
||||
import libraryPong from './thumbnails/pong.jpg';
|
||||
|
||||
// Imagine If
|
||||
import libraryImagineIf from './thumbnails/imagine-if.jpg';
|
||||
// Imagine a World
|
||||
import libraryImagine from './thumbnails/imagine.jpg';
|
||||
|
||||
// Videos
|
||||
import recordASound from './thumbnails/record-a-sound.jpg';
|
||||
@@ -174,24 +174,24 @@ export default {
|
||||
urlId: 'name'
|
||||
},
|
||||
|
||||
'imagine-if': {
|
||||
'imagine': {
|
||||
name: (
|
||||
<FormattedMessage
|
||||
defaultMessage="Imagine If"
|
||||
description="Name for the 'Imagine If' how-to"
|
||||
id="gui.howtos.imagine-if"
|
||||
defaultMessage="Imagine a World"
|
||||
description="Name for the 'Imagine a World' how-to"
|
||||
id="gui.howtos.imagine"
|
||||
/>
|
||||
),
|
||||
tags: ['imagine-if'],
|
||||
img: libraryImagineIf,
|
||||
tags: ['imagine'],
|
||||
img: libraryImagine,
|
||||
steps: [{
|
||||
video: 'imagine-if'
|
||||
video: 'imagine'
|
||||
}, {
|
||||
title: (
|
||||
<FormattedMessage
|
||||
defaultMessage="Type What You Want to Say"
|
||||
description="Step name for 'Type What You Want to Say' step"
|
||||
id="gui.howtos.imagine-if.step_imagineTypeWhatYouWant"
|
||||
id="gui.howtos.imagine.step_imagineTypeWhatYouWant"
|
||||
/>
|
||||
),
|
||||
image: 'imagineTypeWhatYouWant'
|
||||
@@ -200,7 +200,7 @@ export default {
|
||||
<FormattedMessage
|
||||
defaultMessage="Click the Green Flag to Start"
|
||||
description="Step name for 'Click the Green Flag to Start' step"
|
||||
id="gui.howtos.imagine-if.step_imagineClickGreenFlag"
|
||||
id="gui.howtos.imagine.step_imagineClickGreenFlag"
|
||||
/>
|
||||
),
|
||||
image: 'imagineClickGreenFlag'
|
||||
@@ -209,7 +209,7 @@ export default {
|
||||
<FormattedMessage
|
||||
defaultMessage="Choose Any Backdrop"
|
||||
description="Step name for 'Choose Any Backdrop' step"
|
||||
id="gui.howtos.imagine-if.step_imagineChooseBackdrop"
|
||||
id="gui.howtos.imagine.step_imagineChooseBackdrop"
|
||||
/>
|
||||
),
|
||||
image: 'imagineChooseBackdrop'
|
||||
@@ -218,7 +218,7 @@ export default {
|
||||
<FormattedMessage
|
||||
defaultMessage="Choose Any Sprite"
|
||||
description="Step name for 'Choose Any Sprite' step"
|
||||
id="gui.howtos.imagine-if.step_imagineChooseSprite"
|
||||
id="gui.howtos.imagine.step_imagineChooseSprite"
|
||||
/>
|
||||
),
|
||||
image: 'imagineChooseSprite'
|
||||
@@ -227,7 +227,7 @@ export default {
|
||||
<FormattedMessage
|
||||
defaultMessage="Press the Space Key to Glide"
|
||||
description="Step name for 'Press the Space Key to Glide' step"
|
||||
id="gui.howtos.imagine-if.step_imagineFlyAround"
|
||||
id="gui.howtos.imagine.step_imagineFlyAround"
|
||||
/>
|
||||
),
|
||||
image: 'imagineFlyAround'
|
||||
@@ -236,7 +236,7 @@ export default {
|
||||
<FormattedMessage
|
||||
defaultMessage="Choose Another Sprite"
|
||||
description="Step name for 'Choose Another Sprite' step"
|
||||
id="gui.howtos.imagine-if.step_imagineChooseAnotherSprite"
|
||||
id="gui.howtos.imagine.step_imagineChooseAnotherSprite"
|
||||
/>
|
||||
),
|
||||
image: 'imagineChooseAnotherSprite'
|
||||
@@ -245,7 +245,7 @@ export default {
|
||||
<FormattedMessage
|
||||
defaultMessage="Move Left-Right"
|
||||
description="Step name for 'Move Left-Right' step"
|
||||
id="gui.howtos.imagine-if.step_imagineLeftRight"
|
||||
id="gui.howtos.imagine.step_imagineLeftRight"
|
||||
/>
|
||||
),
|
||||
image: 'imagineLeftRight'
|
||||
@@ -254,7 +254,7 @@ export default {
|
||||
<FormattedMessage
|
||||
defaultMessage="Move Up-Down"
|
||||
description="Step name for 'Move Up-Down' step"
|
||||
id="gui.howtos.imagine-if.step_imagineUpDown"
|
||||
id="gui.howtos.imagine.step_imagineUpDown"
|
||||
/>
|
||||
),
|
||||
image: 'imagineUpDown'
|
||||
@@ -263,7 +263,7 @@ export default {
|
||||
<FormattedMessage
|
||||
defaultMessage="Change Costumes"
|
||||
description="Step name for 'Change Costumes' step"
|
||||
id="gui.howtos.imagine-if.step_imagineChangeCostumes"
|
||||
id="gui.howtos.imagine.step_imagineChangeCostumes"
|
||||
/>
|
||||
),
|
||||
image: 'imagineChangeCostumes'
|
||||
@@ -272,7 +272,7 @@ export default {
|
||||
<FormattedMessage
|
||||
defaultMessage="Glide to a Point"
|
||||
description="Step name for 'Glide to a Point' step"
|
||||
id="gui.howtos.imagine-if.step_imagineGlideToPoint"
|
||||
id="gui.howtos.imagine.step_imagineGlideToPoint"
|
||||
/>
|
||||
),
|
||||
image: 'imagineGlideToPoint'
|
||||
@@ -281,7 +281,7 @@ export default {
|
||||
<FormattedMessage
|
||||
defaultMessage="Grow and Shrink"
|
||||
description="Step name for 'Grow and Shrink' step"
|
||||
id="gui.howtos.imagine-if.step_imagineGrowShrink"
|
||||
id="gui.howtos.imagine.step_imagineGrowShrink"
|
||||
/>
|
||||
),
|
||||
image: 'imagineGrowShrink'
|
||||
@@ -290,7 +290,7 @@ export default {
|
||||
<FormattedMessage
|
||||
defaultMessage="Choose Another Backdrop"
|
||||
description="Step name for 'Choose Another Backdrop' step"
|
||||
id="gui.howtos.imagine-if.step_imagineChooseAnotherBackdrop"
|
||||
id="gui.howtos.imagine.step_imagineChooseAnotherBackdrop"
|
||||
/>
|
||||
),
|
||||
image: 'imagineChooseAnotherBackdrop'
|
||||
@@ -299,7 +299,7 @@ export default {
|
||||
<FormattedMessage
|
||||
defaultMessage="Switch Backdrops"
|
||||
description="Step name for 'Switch Backdrops' step"
|
||||
id="gui.howtos.imagine-if.step_imagineSwitchBackdrops"
|
||||
id="gui.howtos.imagine.step_imagineSwitchBackdrops"
|
||||
/>
|
||||
),
|
||||
image: 'imagineSwitchBackdrops'
|
||||
@@ -308,7 +308,7 @@ export default {
|
||||
<FormattedMessage
|
||||
defaultMessage="Add a Sound"
|
||||
description="Step name for 'Add a Sound' step"
|
||||
id="gui.howtos.imagine-if.step_imagineRecordASound"
|
||||
id="gui.howtos.imagine.step_imagineRecordASound"
|
||||
/>
|
||||
),
|
||||
image: 'imagineRecordASound'
|
||||
@@ -317,7 +317,7 @@ export default {
|
||||
<FormattedMessage
|
||||
defaultMessage="Choose Your Sound"
|
||||
description="Step name for 'Choose Your Sound' step"
|
||||
id="gui.howtos.imagine-if.step_imagineChooseSound"
|
||||
id="gui.howtos.imagine.step_imagineChooseSound"
|
||||
/>
|
||||
),
|
||||
image: 'imagineChooseSound'
|
||||
@@ -328,7 +328,7 @@ export default {
|
||||
]
|
||||
}
|
||||
],
|
||||
urlId: 'imagine-if'
|
||||
urlId: 'imagine'
|
||||
},
|
||||
|
||||
'Make-Music': {
|
||||
|
||||
File renamed without changes.
@@ -121,7 +121,7 @@ const videos = {
|
||||
'pong-game': {
|
||||
en: '8m48dv0ens'
|
||||
},
|
||||
'imagine-if': {
|
||||
'imagine': {
|
||||
en: '1ndh08yiso'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -3845,7 +3845,7 @@
|
||||
{
|
||||
"costumeName": "dinosaur1-c",
|
||||
"baseLayerID": -1,
|
||||
"baseLayerMD5": "a2bb28d5ba55ba997bec63772437cecf.svg",
|
||||
"baseLayerMD5": "78f7e20f0e187fdca81195e4cc134175.svg",
|
||||
"bitmapResolution": 1,
|
||||
"rotationCenterX": 81,
|
||||
"rotationCenterY": 91
|
||||
@@ -15612,7 +15612,7 @@
|
||||
},
|
||||
{
|
||||
"name": "Watermelon",
|
||||
"md5": "26fecef75cf3b6e0d98bff5c06475036.svg",
|
||||
"md5": "8736ecc2524895733534c888cd91fa1f.svg",
|
||||
"type": "sprite",
|
||||
"tags": [
|
||||
"food",
|
||||
@@ -15643,7 +15643,7 @@
|
||||
{
|
||||
"costumeName": "watermelon-a",
|
||||
"baseLayerID": -1,
|
||||
"baseLayerMD5": "26fecef75cf3b6e0d98bff5c06475036.svg",
|
||||
"baseLayerMD5": "8736ecc2524895733534c888cd91fa1f.svg",
|
||||
"bitmapResolution": 1,
|
||||
"rotationCenterX": 40,
|
||||
"rotationCenterY": 27
|
||||
@@ -15651,7 +15651,7 @@
|
||||
{
|
||||
"costumeName": "watermelon-b",
|
||||
"baseLayerID": -1,
|
||||
"baseLayerMD5": "fbdaf4d1d349edd3ddf3a1c4528aa9ec.svg",
|
||||
"baseLayerMD5": "1ed1c8b78eae2ee7422074d7f883031d.svg",
|
||||
"bitmapResolution": 1,
|
||||
"rotationCenterX": 22,
|
||||
"rotationCenterY": 27
|
||||
@@ -15659,7 +15659,7 @@
|
||||
{
|
||||
"costumeName": "watermelon-c",
|
||||
"baseLayerID": -1,
|
||||
"baseLayerMD5": "5976c10412306fc093c1d1930fa05119.svg",
|
||||
"baseLayerMD5": "677738282686d2dcce35d731c3ddc043.svg",
|
||||
"bitmapResolution": 1,
|
||||
"rotationCenterX": 21,
|
||||
"rotationCenterY": 15
|
||||
|
||||
@@ -182,7 +182,8 @@ describe('Working with the blocks', () => {
|
||||
|
||||
// Rename the costume
|
||||
await clickText('Costumes');
|
||||
const el = await findByXpath("//input[@value='costume1']");
|
||||
await clickText('costume2', scope.costumesTab);
|
||||
const el = await findByXpath("//input[@value='costume2']");
|
||||
await el.sendKeys('newname');
|
||||
|
||||
// Make sure it is updated in the block menu
|
||||
@@ -197,7 +198,8 @@ describe('Working with the blocks', () => {
|
||||
|
||||
// Rename the costume
|
||||
await clickText('Costumes');
|
||||
const el = await findByXpath("//input[@value='costume1']");
|
||||
await clickText('costume2', scope.costumesTab);
|
||||
const el = await findByXpath("//input[@value='costume2']");
|
||||
await el.sendKeys('<NewCostume>');
|
||||
|
||||
// Make sure it is updated in the block menu
|
||||
@@ -209,17 +211,15 @@ describe('Working with the blocks', () => {
|
||||
await clickText('Sound', scope.blocksTab);
|
||||
});
|
||||
|
||||
// NOTE: This test describes the current behavior so that changes are not
|
||||
// introduced inadvertly, but I know this is not the desired behavior
|
||||
test('Adding costumes DOES NOT update the default costume name in the toolbox', async () => {
|
||||
test('Adding costumes DOES update the default costume name in the toolbox', async () => {
|
||||
await loadUri(uri);
|
||||
|
||||
// By default, costume1 is in the costume tab
|
||||
// By default, costume2 is in the costume tab
|
||||
await clickText('Looks', scope.blocksTab);
|
||||
await driver.sleep(500); // Wait for scroll to finish
|
||||
await clickText('costume1', scope.blocksTab);
|
||||
await clickText('costume2', scope.blocksTab);
|
||||
|
||||
// Also check that adding a new costume does not update the list
|
||||
// Also check that adding a new costume does update the list
|
||||
await clickText('Costumes');
|
||||
const el = await findByXpath('//button[@aria-label="Choose a Costume"]');
|
||||
await driver.actions().mouseMove(el)
|
||||
@@ -227,14 +227,13 @@ describe('Working with the blocks', () => {
|
||||
await driver.sleep(500); // Wait for thermometer menu to come up
|
||||
await clickXpath('//button[@aria-label="Paint"]');
|
||||
await clickText('costume3', scope.costumesTab);
|
||||
// Check that the menu has not been updated
|
||||
// Check that the menu has been updated
|
||||
await clickText('Code');
|
||||
await clickText('costume1', scope.blocksTab);
|
||||
await clickText('costume3', scope.blocksTab);
|
||||
});
|
||||
|
||||
// NOTE: This test describes the current behavior so that changes are not
|
||||
// introduced inadvertly, but I know this is not the desired behavior
|
||||
test('Adding a sound DOES NOT update the default sound name in the toolbox', async () => {
|
||||
// Skipped because it was flakey on travis, but seems to run locally ok
|
||||
test.skip('Adding a sound DOES update the default sound name in the toolbox', async () => {
|
||||
await loadUri(uri);
|
||||
await clickText('Sounds');
|
||||
await clickXpath('//button[@aria-label="Choose a Sound"]');
|
||||
@@ -242,7 +241,7 @@ describe('Working with the blocks', () => {
|
||||
await clickText('Code');
|
||||
await clickText('Sound', scope.blocksTab);
|
||||
await driver.sleep(500); // Wait for scroll to finish
|
||||
await clickText('Meow', scope.blocksTab); // Meow, not A Bass
|
||||
await clickText('A\u00A0Bass', scope.blocksTab); // Need for block text
|
||||
});
|
||||
|
||||
// Regression test for switching between editor/player causing toolbox to stop updating
|
||||
|
||||
Reference in new issue
Block a user