From d54320b20ba7831de1bfda1d0ea108806c51a078 Mon Sep 17 00:00:00 2001 From: Ray Schamp <ray@scratch.mit.edu> Date: Thu, 17 Aug 2017 10:30:26 -0400 Subject: [PATCH] Test that blocks-only can use the blocks palette --- test/integration/examples.test.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/test/integration/examples.test.js b/test/integration/examples.test.js index 377413c50..3299fb27c 100644 --- a/test/integration/examples.test.js +++ b/test/integration/examples.test.js @@ -4,7 +4,10 @@ import path from 'path'; import SeleniumHelper from '../helpers/selenium-helper'; const { + clickButton, + clickText, clickXpath, + findByXpath, getDriver, getLogs } = new SeleniumHelper(); @@ -59,4 +62,26 @@ describe('blocks example', () => { const logs = await getLogs(errorWhitelist); await expect(logs).toEqual([]); }); + + test('Change categories', async () => { + await driver.get(`file://${uri}`); + await clickText('Looks'); + await clickText('Sound'); + await clickText('Pen'); + await clickText('Events'); + await clickText('Control'); + await clickText('Sensing'); + await clickText('Operators'); + await clickText('Data'); + await clickText('Create variable...'); + let el = await findByXpath("//input[@placeholder='']"); + await el.sendKeys('score'); + await clickButton('OK'); + await clickText('Create variable...'); + el = await findByXpath("//input[@placeholder='']"); + await el.sendKeys('second variable'); + await clickButton('OK'); + const logs = await getLogs(errorWhitelist); + await expect(logs).toEqual([]); + }); }); -- GitLab