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:
21
test/automated/index.test.js
Normal file
21
test/automated/index.test.js
Normal 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();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user