Skip to content

action to quickly test Looking Glass behavior when altering payload data

License

Notifications You must be signed in to change notification settings

Aexmuxomor/looking-glass-payload-tester

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

looking-glass-payload-tester

Action to quickly test Looking Glass behavior when altering payload data

Configuration is easy!

  1. Create a new workflow file in the repo you wish to use for testing
  2. Add the following contents to the repo
name: Looking Glass Payload Tester
on:
  workflow_dispatch:
    inputs:
      filename:
        description: "string for a filename if your payload needs one"
        required: true
      is_correct:
        description: "a boolean value for the isCorrect field"
        required: true
      level:
        description: "string value of a supported Looking Glass level"
        required: true
      display_type:
        description: "string value of a supported Looking Glass display type"
        required: true
      msg:
        description: "string value of a message if your payload has one, can be an empty string"
        required: true
      error_expected:
        description: "string value of the error.expected field of a Looking Glass payload"
        required: true
      error_got:
        description: "string value of the error.got field of a Looking Glass payload"
        required: true

jobs:
  create_payload:
    runs-on: ubuntu-latest
    steps:
      - uses: githubtraining/[email protected]
        id: events
        with:
          filename: ${{ github.event.inputs.filename }}
          isCorrect: ${{ github.event.inputs.is_correct }}
          level: ${{ github.event.inputs.level }}
          display_type: ${{ github.event.inputs.display_type }}
          msg: ${{ github.event.inputs.msg }}
          error_expected: ${{ github.event.inputs.error_expected }}
          error_got: ${{ github.event.inputs.error_got }}

      - uses: githubtraining/[email protected]
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          feedback: ${{ steps.events.outputs.reports }}
  1. Click the actions tab of your repository

image

  1. Select the Looking Glass Payload Tester from the list of configured workflows (if you changed the contents of the example file above your's may be named differently)

image

  1. Click the Run workflow button on the upper right corner of the middle section of your screen and supply your input values to create a payload Looking Glass can understand

image

  1. Click the green Run workflow button to execute the workflow
  2. Check your actions logs and other payload diaplay_types for Looking Glass feedback 🎉

It is useful to enable actions debugging while working with Looking Glass as an author. To do so set the proper repository secrets!

About

action to quickly test Looking Glass behavior when altering payload data

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%