You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 jaar geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. context.skip("Recorder", () => {
  2. before(() => {
  3. cy.login();
  4. });
  5. beforeEach(() => {
  6. cy.visit("/app/recorder");
  7. return cy
  8. .window()
  9. .its("xhiveframework")
  10. .then((xhiveframework) => {
  11. // reset recorder
  12. return xhiveframework.xcall("xhiveframework.recorder.stop").then(() => {
  13. return xhiveframework.xcall("xhiveframework.recorder.delete");
  14. });
  15. });
  16. });
  17. it("Recorder Empty State", () => {
  18. cy.get(".page-head").findByTitle("Recorder").should("exist");
  19. cy.get(".indicator-pill").should("contain", "Inactive").should("have.class", "red");
  20. cy.get(".page-actions").findByRole("button", { name: "Start" }).should("exist");
  21. cy.get(".page-actions").findByRole("button", { name: "Clear" }).should("exist");
  22. cy.get(".msg-box").should("contain", "Recorder is Inactive");
  23. cy.get(".msg-box").findByRole("button", { name: "Start Recording" }).should("exist");
  24. });
  25. it("Recorder Start", () => {
  26. cy.get(".page-actions").findByRole("button", { name: "Start" }).click();
  27. cy.get(".indicator-pill").should("contain", "Active").should("have.class", "green");
  28. cy.get(".msg-box").should("contain", "No Requests found");
  29. cy.visit("/app/List/DocType/List");
  30. cy.intercept("POST", "/api/method/xhiveframework.desk.reportview.get").as("list_refresh");
  31. cy.wait("@list_refresh");
  32. cy.get(".page-head").findByTitle("DocType").should("exist");
  33. cy.get(".list-count").should("contain", "20 of ");
  34. cy.visit("/app/recorder");
  35. cy.get(".page-head").findByTitle("Recorder").should("exist");
  36. cy.get(".xhiveframework-list .result-list").should(
  37. "contain",
  38. "/api/method/xhiveframework.desk.reportview.get"
  39. );
  40. });
  41. it("Recorder View Request", () => {
  42. cy.get(".page-actions").findByRole("button", { name: "Start" }).click();
  43. cy.visit("/app/List/DocType/List");
  44. cy.intercept("POST", "/api/method/xhiveframework.desk.reportview.get").as("list_refresh");
  45. cy.wait("@list_refresh");
  46. cy.get(".page-head").findByTitle("DocType").should("exist");
  47. cy.get(".list-count").should("contain", "20 of ");
  48. cy.visit("/app/recorder");
  49. cy.get(".xhiveframework-list .list-row-container span")
  50. .contains("/api/method/xhiveframework")
  51. .should("be.visible")
  52. .click({ force: true });
  53. cy.url().should("include", "/recorder/request");
  54. cy.get("form").should("contain", "/api/method/xhiveframework");
  55. });
  56. });