E2E docs: Add guide to debuging PhantomJS (#21606)

* Add guide to debuging PhanomJS

* Update contribute/style-guides/e2e.md
This commit is contained in:
Dominik Prokop 2020-01-20 08:34:36 +01:00 committed by GitHub
parent 152059fec9
commit aba402f98e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,3 +146,15 @@ describe('List test', () => {
});
});
```
## Debugging PhantomJS image rendering
There is no easy or comprehensive way to debug PhantomJS smoke test (image rendering) failures. However, PhantomJS exposes remote debugging interface which can give you a sense of what is going wrong in the smoke test. Before performing the steps described below make sure your local Grafana instance is running:
1. Go to `tools/phantomjs` directory
2. Execute `phantomjs` binary against `render.js` file: `./phantomjs --remote-debugger-port=9009 --remote-debugger-autorun=yes ./render.js url="http://localhost:3000"`
3. In your browser navigate to `http://localhost:9009/`
4. Select `http://localhost:3000/login` from the list. You will get access to Webkit's inspector to see the console's output from the smoke test.
The method described above is not perfect, but is helpful to evaluate smoke tests breaking due to bundle errors.