chore: add ability to test block factory and playground locally (#7087)

* feat: Added basic example test for Blockly Playground and Blockly Demo

* feat: Added basic example test for Blockly Playground and Blockly Demo

* feat: Added basic example test for Blockly Playground and Blockly Demo

* feat: Added basic example test for Blockly Playground and Blockly Demo

* feat: Added basic example test for Blockly Playground and Blockly Demo

* feat: Added basic example test for Blockly Playground and Blockly Demo

* feat: Added basic example test for Blockly Playground and Blockly Demo

* feat: Added basic example test for Blockly Playground and Blockly Demo

* feat: Added basic example test for Blockly Playground and Blockly Demo

* feat: Added basic example test for Blockly Playground and Blockly Demo

* feat: Added basic example test for Blockly Playground and Blockly Demo

* feat: Added basic example test for Blockly Playground and Blockly Demo

* feat: Added basic example test for Blockly Playground and Blockly Demo

* feat: Add functionality to run playground and block factory test locally

* feat: Add functionality to run playground and block factory test locally

* feat: Add functionality to run playground and block factory test locally

* feat: Add functionality to run playground and block factory test locally
This commit is contained in:
ericblackmonGoogle
2023-05-12 14:29:42 -04:00
committed by GitHub
parent 794c045691
commit 37940a1876
3 changed files with 19 additions and 3 deletions

View File

@@ -51,7 +51,10 @@ jobs:
if: runner.os == 'macOS'
run: source ./tests/scripts/setup_osx_env.sh
- name: Run
- name: Run Build
run: npm run build
- name: Run Test
run: npm run test:browser
env:

View File

@@ -10,6 +10,8 @@
const webdriverio = require('webdriverio');
const chai = require('chai');
const path = require('path');
const {posixPath} = require('../../../scripts/helpers');
let browser;
suite('Testing Connecting Blocks', function (done) {
@@ -44,7 +46,12 @@ suite('Testing Connecting Blocks', function (done) {
}
// Use Selenium to bring up the page
const url =
'https://blockly-demo.appspot.com/static/demos/blockfactory/index.html';
'file://' +
posixPath(
path.join(__dirname, '..', '..', '..', 'demos', 'blockfactory')
) +
'/index.html';
console.log(url);
console.log('Starting webdriverio...');
browser = await webdriverio.remote(options);
console.log('Loading URL: ' + url);

View File

@@ -10,6 +10,8 @@
const webdriverio = require('webdriverio');
const chai = require('chai');
const path = require('path');
const {posixPath} = require('../../../scripts/helpers');
let browser;
suite('Testing Connecting Blocks', function (done) {
@@ -43,7 +45,11 @@ suite('Testing Connecting Blocks', function (done) {
options.capabilities['goog:chromeOptions'].args.push('--disable-gpu');
}
// Use Selenium to bring up the page
const url = 'https://blockly-demo.appspot.com/static/tests/playground.html';
const url =
'file://' +
posixPath(path.join(__dirname, '..', '..')) +
'/playground.html';
console.log(url);
console.log('Starting webdriverio...');
browser = await webdriverio.remote(options);
console.log('Loading URL: ' + url);