JuliaPluto/Pluto.jl

Test the /sample/test1.jl interactive notebook with Puppeteer

Open

#867 建立於 2021年1月21日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)Julia (5,295 star) (329 fork)batch import
frontendgood first issuetests

描述

Introduction

This is a newcomer-friendly issue. Most of Pluto's functionality is documented in this notebook that exists as part of the codebase. We use it whenever we change something to our frontend code, to check that things are still working.

Right now we run this notebook manually, and perform the checks by hand. This issue is about running and testing the reactivity and the features of pluto automatically with the Puppeteer framework.

Puppeteer is a Chromium browser with an API, that we already use to run some simple tests.

What needs to be done

  1. create a new branch
  2. create a new .js file in /test/frontend/__tests__
  3. add code that will perform actions that a user would do. In puppeteer we usually do that waiting for selectors to show up in the DOM and then executing some browser code.
  4. make sure that the action had the correct result and nothing exploded

You can take a look at the existing tests, though this one is more advanced. Eventually, we would like all tests from this notebook to run automatically, but small steps are also welcome!

If you're interested in doing that and have more questions, feel free to ask here or in zulip

貢獻者指南