Guest User

Untitled

a guest
Jun 17th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. describe("example", function() {
  2.  
  3. it("of test", function() {
  4.  
  5. console.log("1");
  6.  
  7. cy.request({
  8. url: Cypress.env("URL"),
  9. method: "POST",
  10. headers: auth_req.authHeaders,
  11. body: merged_body
  12. })
  13. .as("/authorize")
  14. .then((resp) => {
  15. console.log("2");
  16. Cypress.env("resp_code", resp.status);
  17. console.log("RESP CODE FROM RESPONSE:");
  18. console.log(resp.status);
  19. })
  20. .its("headers")
  21. .its("content-type")
  22. .should("include", "application/json");
  23.  
  24. console.log("3");
  25. const var1 = new something.NotImportant;
  26. console.log("4");
  27. const var2 = new something.AlsoNotImportant;
  28. console.log("5");
  29.  
  30. }
  31.  
  32. }
  33.  
  34. while (true) {
  35. cy.wait(5000);
  36. var resp_code = Cypress.env("resp_code");
  37. console.log("RESP CODE:");
  38. console.log(Cypress.env("resp_code"));
  39. }
Advertisement
Add Comment
Please, Sign In to add comment