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