Merge pull request #1831 from apple502j/stop-ask

Clear ask bubble when stopForTarget
This commit is contained in:
Karishma Chadha authored and GitHub committed 2018-12-26 10:29:23 -05:00
commit c5284469d3
2 files changed
+4 -3

No files matched your search

+1
View File
@@ -143,6 +143,7 @@ class Scratch3SensingBlocks {
));
if (currentlyAsking) {
this.runtime.emit('SAY', stopTarget, 'say', '');
if (this._questionList.length > 0) {
this._askNextQuestion();
} else {
+3 -3
View File
@@ -67,7 +67,7 @@ test('ask and stop all dismisses question', t => {
test('ask and stop other scripts dismisses if it is the last question', t => {
const rt = new Runtime();
const s = new Sensing(rt);
const util = {target: {visible: false, sprite: {}}, thread: {}};
const util = {target: {visible: false, sprite: {}, getCustomState: () => ({})}, thread: {}};
const expectedQuestion = 'a question';
@@ -94,8 +94,8 @@ test('ask and stop other scripts dismisses if it is the last question', t => {
test('ask and stop other scripts asks next question', t => {
const rt = new Runtime();
const s = new Sensing(rt);
const util = {target: {visible: false, sprite: {}}, thread: {}};
const util2 = {target: {visible: false, sprite: {}}, thread: {}};
const util = {target: {visible: false, sprite: {}, getCustomState: () => ({})}, thread: {}};
const util2 = {target: {visible: false, sprite: {}, getCustomState: () => ({})}, thread: {}};
const expectedQuestion = 'a question';
const nextQuestion = 'a followup';