소스 검색

test(cypress): show full response on insert_doc failure (#17257)

version-14
Ankush Menat 3 년 전
committed by GitHub
부모
커밋
9c5d6feec1
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. +6
    -1
      cypress/support/commands.js

+ 6
- 1
cypress/support/commands.js 파일 보기

@@ -313,7 +313,12 @@ Cypress.Commands.add('insert_doc', (doctype, args, ignore_duplicate) => {
if (ignore_duplicate) {
status_codes.push(409);
}
expect(res.status).to.be.oneOf(status_codes);

let message = null;
if (ignore_duplicate && !status_codes.includes(res.status)) {
message = `Document insert failed, response: ${JSON.stringify(res, null, '\t')}`;
}
expect(res.status).to.be.oneOf(status_codes, message);
return res.body.data;
});
});


불러오는 중...
취소
저장