2022-02-11 17:16:36 +03:00
|
|
|
const {agentProvider, matchers} = require('../../utils/e2e-framework');
|
2023-01-17 14:56:29 +03:00
|
|
|
const {anyEtag, stringMatching, anyContentLength, anyContentVersion} = 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-05-19 08:50:44 +03:00
|
|
|
etag: anyEtag,
|
2023-01-17 14:56:29 +03:00
|
|
|
'content-length': anyContentLength,
|
|
|
|
'content-version': anyContentVersion
|
2022-02-08 17:33:19 +03:00
|
|
|
});
|
2021-03-09 12:10:27 +03:00
|
|
|
});
|
|
|
|
});
|