End to end automated tests run on Github workflows (#384)

* WIP for automated integration test

* See if it runs under a workflow

* Support running test locally as well as a workflow

* Use already downloaded repo to build. Do not re-clone

* Add comments

* Update to support new default config file

* Split out different test suites

* Add test for chat

* Always run test with config-default and ignore local config file

* Remove the build workflow because the end to end test does that now
This commit is contained in:
Gabe Kangas
2020-11-24 00:28:54 -08:00
committed by GitHub
parent cb1f183ca1
commit 5dff6f32fc
10 changed files with 5395 additions and 41 deletions

View File

@@ -0,0 +1,21 @@
var request = require('supertest');
request = request('http://127.0.0.1:8080');
test('service is online', (done) => {
request.get('/api/status').expect(200)
.then((res) => {
expect(res.body.online).toBe(true);
done();
});
});
test('frontend configuration is correct', (done) => {
request.get('/api/config').expect(200)
.then((res) => {
expect(res.body.title).toBe('Owncast');
expect(res.body.logo).toBe('/img/logo.svg');
expect(res.body.socialHandles[0].platform).toBe('github');
expect(res.body.socialHandles[0].url).toBe('http://github.com/owncast/owncast');
done();
});
});