From ac50bbddcaf0edc45b0d0846215bdb7f647f75a1 Mon Sep 17 00:00:00 2001 From: Liyas Thomas Date: Tue, 23 Jun 2020 22:16:06 +0530 Subject: [PATCH] Moved pre-request script and tests to options tabs --- lang/en-US.json | 4 +- pages/index.vue | 413 +++++++++++++++++++++++------------------------- 2 files changed, 198 insertions(+), 219 deletions(-) diff --git a/lang/en-US.json b/lang/en-US.json index ae614543e..581067878 100644 --- a/lang/en-US.json +++ b/lang/en-US.json @@ -285,5 +285,7 @@ "mqtt_topic_title": "Publish / Subscribe topic", "mqtt_publish": "Publish", "mqtt_subscribe": "Subscribe", - "mqtt_unsubscribe": "Unsubscribe" + "mqtt_unsubscribe": "Unsubscribe", + "pre_request_script": "Pre-request Script", + "tests": "Tests" } diff --git a/pages/index.vue b/pages/index.vue index 0c9a0ca10..d4dc0a87a 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -2,39 +2,6 @@
- - - -
  • @@ -402,40 +369,6 @@ > code - - - -
-
- -
-
- -
- -
-
-
-
-

{{ testReport.startBlock }}

-
-

- - - {{ testReport.styles.icon }} - -   {{ testReport.result }} - - - - -

-

-
-
- - - -
- + + +
    +
  • +
    + +
    + +
    +
    + +
  • +
+
    +
  • + +
  • +
  • + +
  • +
  • + + + +
  • +
    +
  • + +
  • +
    +
+
    +
  • + +
  • +
+
+
+ +
  • @@ -822,99 +789,112 @@ - - + +
    • - +
      - + +
      - -
    • -
    -
      -
    • -
    • -
    • - -
    • -
    • - - - -
    • -
      -
    • - -
    • -
    +
    +
    + + +
    • - +
      + + +
      + +
      +
      + +
      + +
      +
      +
      +
      +

      {{ testReport.startBlock }}

      +
      +

      + + + {{ testReport.styles.icon }} + +   {{ testReport.result }} + + + + +

      +

      +
      +
    @@ -1342,8 +1322,8 @@ export default { data() { return { showModal: false, - showPreRequestScript: false, - testsEnabled: false, + showPreRequestScript: true, + testsEnabled: true, testScript: "// pw.expect('variable').toBe('value');", preRequestScript: "// pw.env.set('variable', 'value');", testReports: null, @@ -2015,9 +1995,6 @@ export default { // Start showing the loading bar as soon as possible. // The nuxt axios module will hide it when the request is made. this.$nuxt.$loading.start() - if (this.$refs.response.$el.classList.contains("hidden")) { - this.$refs.response.$el.classList.toggle("hidden") - } this.previewEnabled = false this.response.status = this.$t("fetching") this.response.body = this.$t("loading")