Feat: multi content authoring (#4139)

This commit is contained in:
Erez Rokah
2020-09-20 10:30:46 -07:00
committed by GitHub
parent 7968e01e29
commit cb2ad687ee
65 changed files with 4331 additions and 1521 deletions

View File

@ -302,14 +302,11 @@ async function teardownGitGatewayTest(taskData) {
transformRecordedData: (expectation, toSanitize) => {
const result = methods[taskData.provider].transformData(expectation, toSanitize);
const { httpRequest, httpResponse } = expectation;
if (httpResponse.body && httpRequest.path === '/.netlify/identity/token') {
const parsed = JSON.parse(httpResponse.body);
if (result.response && result.url === '/.netlify/identity/token') {
const parsed = JSON.parse(result.response);
parsed.access_token = 'access_token';
parsed.refresh_token = 'refresh_token';
const responseBody = JSON.stringify(parsed);
return { ...result, response: responseBody };
return { ...result, response: JSON.stringify(parsed) };
} else {
return result;
}