Advertisement
Guest User

Untitled

a guest
May 24th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. exports.updateTestRail = function(){
  2. jasmine.getEnv().addReporter({
  3. suiteStarted: function(result) {
  4. tr.getSections({
  5. project_id : 5,
  6. suite_id : 8
  7. }).then(function (res) {
  8. data = {
  9. sections: res
  10. }
  11. sectionId = jsonQuery('sections[name='+result.description+']', {data: data}).value.id;
  12. })
  13. },
  14. specStarted: function(result) {
  15. tr.getCases({
  16. project_id : 5,
  17. filters: {
  18. suite_id : 8,
  19. section_id : sectionId,
  20. }
  21. }).then(function (res) {
  22. data= {
  23. cases: res
  24. }
  25. try {
  26.  
  27. var caseId = jsonQuery('cases[title='+result.description+']', {data: data}).value.id
  28.  
  29. } catch (err) {
  30.  
  31. console.log(result.description)
  32.  
  33. }
  34. var object = {
  35. "case_id": caseId,
  36. "type_id": 3
  37. };
  38. tr.updateCase(object);
  39. })
  40. }
  41. });
  42. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement