From 2ff05a4af0c8744bf273ae28f2139286fee1865b Mon Sep 17 00:00:00 2001 From: Marcus Fedarko Date: Wed, 16 Dec 2020 12:46:22 -0800 Subject: [PATCH 1/3] DEV: add a note about js test HTML elements --- CONTRIBUTING.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 95cb8672c..3948dc395 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,8 +17,8 @@ npm install -g qunit-puppeteer jshint prettier@2.0.5 If you don't have `npm` installed, you will need to install that first. -**Note**: if you can't install puppeteer, the test suite can be run using a -web browser by opening the page in `tests/index.html`. +**Note**: if you can't install puppeteer, the (JavaScript) test suite can be +run using a web browser by opening the page in `tests/index.html`. ## Running tests @@ -34,6 +34,12 @@ make test If you just want to run the Python or JavaScript tests, you can run `make pytest` or `make jstest` respectively. +### Important note about JavaScript tests +If you add HTML elements to EMPress' HTML code that the JavaScript code relies +on, you will also need to add these elements to the `tests/index.html` file. +Ideally this would not be necessary, but for now it is. (Failing to do this can +cause obscure error messages from the JS tests.) + ## Front-end development For convenience, a utility script `./tests/python/make-dev-page.py` is bundled From 17a6ca8b731354bf1ef64131e61e81719c5681a4 Mon Sep 17 00:00:00 2001 From: Marcus Fedarko Date: Wed, 16 Dec 2020 12:48:19 -0800 Subject: [PATCH 2/3] BLD: attempt to fix #467 --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 21ce58748..afcfeb89d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,9 +2,12 @@ name: Empress CI # Controls when the action will run. on: - # Triggers the workflow on pull request events but only on the master branch + # Triggers the workflow on pull request and push events, only on the master + # branch pull_request: branches: [ master ] + push: + branches: [ master ] jobs: # name of job From adb9014711f2d2d8812a934fc15f864791c9da42 Mon Sep 17 00:00:00 2001 From: Marcus Fedarko Date: Wed, 16 Dec 2020 13:12:09 -0800 Subject: [PATCH 3/3] DEV: mention #435 in contributing --- CONTRIBUTING.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3948dc395..35815b52e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,12 +34,17 @@ make test If you just want to run the Python or JavaScript tests, you can run `make pytest` or `make jstest` respectively. -### Important note about JavaScript tests +### Notes about JavaScript tests If you add HTML elements to EMPress' HTML code that the JavaScript code relies on, you will also need to add these elements to the `tests/index.html` file. Ideally this would not be necessary, but for now it is. (Failing to do this can cause obscure error messages from the JS tests.) +Also, loading the test `index.html` fails on Firefox for some of the `Legend` +tests: see https://github.com/biocore/empress/issues/435. To circumvent this, +if you need to load the tests in the browser (rather than using puppeteer), +we recommend using a different browser for the time being. + ## Front-end development For convenience, a utility script `./tests/python/make-dev-page.py` is bundled