From 5096f13db3241b5a099bdf95420c50ac0a3be784 Mon Sep 17 00:00:00 2001 From: Paul Kaplan <pkaplan@media.mit.edu> Date: Wed, 23 May 2018 10:32:12 -0400 Subject: [PATCH] Test changing monitor mode, prevent a regression we saw last week. --- test/helpers/selenium-helper.js | 3 ++- test/integration/blocks.test.js | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/test/helpers/selenium-helper.js b/test/helpers/selenium-helper.js index 8ed17e2f7..70e3bfed8 100644 --- a/test/helpers/selenium-helper.js +++ b/test/helpers/selenium-helper.js @@ -31,7 +31,8 @@ class SeleniumHelper { modal: '*[@class="ReactModalPortal"]', reportedValue: '*[@class="blocklyDropDownContent"]', soundsTab: "*[@id='react-tabs-5']", - spriteTile: '*[starts-with(@class,"react-contextmenu-wrapper")]' + spriteTile: '*[starts-with(@class,"react-contextmenu-wrapper")]', + monitors: '*[starts-with(@class,"stage_monitor-wrapper")]' }; } diff --git a/test/integration/blocks.test.js b/test/integration/blocks.test.js index 2e0466d3b..4963c5e44 100644 --- a/test/integration/blocks.test.js +++ b/test/integration/blocks.test.js @@ -10,6 +10,7 @@ const { getDriver, getLogs, loadUri, + rightClickText, scope } = new SeleniumHelper(); @@ -81,6 +82,10 @@ describe('Working with the blocks', () => { await clickText('score', scope.blocksTab); await findByText('0', scope.reportedValue); // Tooltip with result + // And there should be a monitor visible + await rightClickText('score', scope.monitors); + await clickText('slider'); + const logs = await getLogs(); await expect(logs).toEqual([]); }); -- GitLab