Skip to content

Adding test blocks into the playground - #1629

Merged
AnmAtAnm merged 3 commits into
RaspberryPiFoundation:developfrom
AnmAtAnm:playground-test-blocks
Feb 16, 2018
Merged

Adding test blocks into the playground#1629
AnmAtAnm merged 3 commits into
RaspberryPiFoundation:developfrom
AnmAtAnm:playground-test-blocks

Conversation

@AnmAtAnm

@AnmAtAnm AnmAtAnm commented Feb 16, 2018

Copy link
Copy Markdown
Contributor

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide

The details

Resolves

#1626

Adds a number of test blocks to the playground for testing block configurations (and edge cases) not covered by the standard blocks.

Proposed Changes

Adds a new toolbox option to the playground, which includes only test blocks.
Does not change the blocks shown in other toolbox configurations.

Blocks include:

  • Empty block (with and without a mutator)
  • Various configurations of number blocks.
  • Long drop-down fields and image drop-down fields.
  • Angle and date fields.
  • Image fields, including networked images and mis-specified images.

Reason for Changes

Provides an easy way to test these cases, encouraging more regular spot testing.

Test Coverage

Test blocks in this PR reference some network images that are not yet online. However, I tested them with URLs from the android project before setting them up with blockly-demo URL.

Tested on:

  • Desktop Chrome

Additional Information

The new toolbox option includes a number of test blocks
largely pulled from the android project, testing various
configurations and edge cases.
},
{
"type": "field_image",
"src": "https://blockly-demo.appspot.com/static/media/test_a.png",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can these use the media url thingy?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh. never mind. I now realize getting them off the network was the whole point of this block :)

@picklesrus picklesrus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you make the images?

Please ignore my other comment :)

@picklesrus

Copy link
Copy Markdown
Contributor

LGTM

@AnmAtAnm

Copy link
Copy Markdown
Contributor Author

Travis failure unrelated to code:

{ Error: Couldn't connect to selenium server
    at getHTML("#closureTestRunnerLog") - test_runner.js:17:2
  details: undefined,
  message: 'connect ECONNREFUSED 127.0.0.1:4444',
  type: 'RuntimeError',
  seleniumStack: 
   { status: -1,
     type: 'ECONNREFUSED',
     orgStatusMessage: 'connect ECONNREFUSED 127.0.0.1:4444',
     message: 'Couldn\'t connect to selenium server' } }

@AnmAtAnm
AnmAtAnm merged commit d9a7f84 into RaspberryPiFoundation:develop Feb 16, 2018
@AnmAtAnm
AnmAtAnm deleted the playground-test-blocks branch February 20, 2018 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants