Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- exports.updateTestRail = function(){
- jasmine.getEnv().addReporter({
- suiteStarted: function(result,done) {
- tr.getSections({
- project_id : 5,
- suite_id : 8
- }).then(function (res) {
- data = {
- sections: res
- }
- sectionId = jsonQuery('sections[name='+result.description+']', {data: data}).value.id;
- done();
- })
- },
- specStarted: function(result) {
- tr.getCases({
- project_id : 5,
- filters: {
- suite_id : 8,
- section_id : sectionId,
- }
- }).then(function (res) {
- data= {
- cases: res
- }
- try {
- var caseId = jsonQuery('cases[title='+result.description+']', {data: data}).value.id
- } catch (err) {
- console.log(result.description)
- }
- var object = {
- "case_id": caseId,
- "type_id": 3
- };
- tr.updateCase(object);
- })
- }
- });
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement