2022-02-11 09:16:36 -05:00
|
|
|
const {agentProvider, matchers} = require('../../utils/e2e-framework');
|
2022-05-01 05:34:33 -05:00
|
|
|
const {anyEtag, stringMatching} = matchers;
|
2021-03-09 04:10:27 -05:00
|
|
|
|
2022-02-08 09:33:19 -05:00
|
|
|
describe('Site API', function () {
|
2022-02-04 10:32:29 -05:00
|
|
|
let agent;
|
2021-03-09 04:10:27 -05:00
|
|
|
|
|
|
|
before(async function () {
|
2022-02-10 07:17:21 -05:00
|
|
|
agent = await agentProvider.getAdminAPIAgent();
|
2021-03-09 04:10:27 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
it('can retrieve config and all expected properties', async function () {
|
2022-02-08 09:33:19 -05:00
|
|
|
await agent
|
|
|
|
.get('site/')
|
|
|
|
.matchBodySnapshot({
|
|
|
|
site: {
|
|
|
|
version: stringMatching(/\d+\.\d+/)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.matchHeaderSnapshot({
|
2022-05-01 05:34:33 -05:00
|
|
|
etag: anyEtag
|
2022-02-08 09:33:19 -05:00
|
|
|
});
|
2021-03-09 04:10:27 -05:00
|
|
|
});
|
|
|
|
});
|