Count on tab
This commit is contained in:
@@ -406,7 +406,13 @@
|
|||||||
|
|
||||||
<section id="options">
|
<section id="options">
|
||||||
<tabs>
|
<tabs>
|
||||||
<tab :id="'params'" :label="$t('parameters')" :selected="true">
|
<tab
|
||||||
|
:id="'params'"
|
||||||
|
:label="
|
||||||
|
$t('parameters') + `${params.length !== 0 ? ' \xA0 • \xA0 ' + params.length : ''}`
|
||||||
|
"
|
||||||
|
:selected="true"
|
||||||
|
>
|
||||||
<pw-section class="pink" label="Parameters" ref="parameters">
|
<pw-section class="pink" label="Parameters" ref="parameters">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
@@ -708,7 +714,12 @@
|
|||||||
</pw-section>
|
</pw-section>
|
||||||
</tab>
|
</tab>
|
||||||
|
|
||||||
<tab :id="'headers'" :label="$t('headers')">
|
<tab
|
||||||
|
:id="'headers'"
|
||||||
|
:label="
|
||||||
|
$t('headers') + `${headers.length !== 0 ? ' \xA0 • \xA0 ' + headers.length : ''}`
|
||||||
|
"
|
||||||
|
>
|
||||||
<pw-section class="orange" label="Headers" ref="headers">
|
<pw-section class="orange" label="Headers" ref="headers">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
@@ -829,7 +840,13 @@
|
|||||||
</pw-section>
|
</pw-section>
|
||||||
</tab>
|
</tab>
|
||||||
|
|
||||||
<tab :id="'tests'" :label="$t('tests')">
|
<tab
|
||||||
|
:id="'tests'"
|
||||||
|
:label="
|
||||||
|
$t('tests') +
|
||||||
|
`${testReports.length !== 0 ? ' \xA0 • \xA0 ' + testReports.length : ''}`
|
||||||
|
"
|
||||||
|
>
|
||||||
<pw-section
|
<pw-section
|
||||||
v-if="testsEnabled"
|
v-if="testsEnabled"
|
||||||
class="orange"
|
class="orange"
|
||||||
@@ -864,7 +881,7 @@
|
|||||||
useWorker: false,
|
useWorker: false,
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
<div v-if="testReports && testReports.length !== 0">
|
<div v-if="testReports.length !== 0">
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<label>Test Reports</label>
|
<label>Test Reports</label>
|
||||||
<div>
|
<div>
|
||||||
@@ -1326,7 +1343,7 @@ export default {
|
|||||||
testsEnabled: true,
|
testsEnabled: true,
|
||||||
testScript: "// pw.expect('variable').toBe('value');",
|
testScript: "// pw.expect('variable').toBe('value');",
|
||||||
preRequestScript: "// pw.env.set('variable', 'value');",
|
preRequestScript: "// pw.env.set('variable', 'value');",
|
||||||
testReports: null,
|
testReports: [],
|
||||||
copyButton: '<i class="material-icons">content_copy</i>',
|
copyButton: '<i class="material-icons">content_copy</i>',
|
||||||
downloadButton: '<i class="material-icons">save_alt</i>',
|
downloadButton: '<i class="material-icons">save_alt</i>',
|
||||||
doneButton: '<i class="material-icons">done</i>',
|
doneButton: '<i class="material-icons">done</i>',
|
||||||
@@ -2422,6 +2439,9 @@ export default {
|
|||||||
},
|
},
|
||||||
clearContent(name, { target }) {
|
clearContent(name, { target }) {
|
||||||
switch (name) {
|
switch (name) {
|
||||||
|
case "parameters":
|
||||||
|
this.params = []
|
||||||
|
break
|
||||||
case "auth":
|
case "auth":
|
||||||
this.auth = "None"
|
this.auth = "None"
|
||||||
this.httpUser = ""
|
this.httpUser = ""
|
||||||
@@ -2431,12 +2451,6 @@ export default {
|
|||||||
this.tokens = []
|
this.tokens = []
|
||||||
this.tokenReqs = []
|
this.tokenReqs = []
|
||||||
break
|
break
|
||||||
case "headers":
|
|
||||||
this.headers = []
|
|
||||||
break
|
|
||||||
case "parameters":
|
|
||||||
this.params = []
|
|
||||||
break
|
|
||||||
case "access_token":
|
case "access_token":
|
||||||
this.accessTokenName = ""
|
this.accessTokenName = ""
|
||||||
this.oidcDiscoveryUrl = ""
|
this.oidcDiscoveryUrl = ""
|
||||||
@@ -2445,28 +2459,29 @@ export default {
|
|||||||
this.clientId = ""
|
this.clientId = ""
|
||||||
this.scope = ""
|
this.scope = ""
|
||||||
break
|
break
|
||||||
|
case "headers":
|
||||||
|
this.headers = []
|
||||||
|
break
|
||||||
|
case "tests":
|
||||||
|
this.testReports = []
|
||||||
|
break
|
||||||
case "tokens":
|
case "tokens":
|
||||||
this.tokens = []
|
this.tokens = []
|
||||||
break
|
break
|
||||||
case "tokenReqs":
|
|
||||||
this.tokenReqs = []
|
|
||||||
case "tests":
|
|
||||||
this.testReports = null
|
|
||||||
break
|
|
||||||
default:
|
default:
|
||||||
this.method = "GET"
|
this.method = "GET"
|
||||||
this.url = "https://httpbin.org"
|
this.url = "https://httpbin.org"
|
||||||
this.path = "/get"
|
this.path = "/get"
|
||||||
this.uri = this.url + this.path
|
this.uri = this.url + this.path
|
||||||
this.label = ""
|
this.label = ""
|
||||||
|
this.bodyParams = []
|
||||||
|
this.rawParams = ""
|
||||||
|
this.files = []
|
||||||
|
this.params = []
|
||||||
this.auth = "None"
|
this.auth = "None"
|
||||||
this.httpUser = ""
|
this.httpUser = ""
|
||||||
this.httpPassword = ""
|
this.httpPassword = ""
|
||||||
this.bearerToken = ""
|
this.bearerToken = ""
|
||||||
this.headers = []
|
|
||||||
this.params = []
|
|
||||||
this.bodyParams = []
|
|
||||||
this.rawParams = ""
|
|
||||||
this.showTokenRequest = false
|
this.showTokenRequest = false
|
||||||
this.tokens = []
|
this.tokens = []
|
||||||
this.tokenReqs = []
|
this.tokenReqs = []
|
||||||
@@ -2476,7 +2491,8 @@ export default {
|
|||||||
this.accessTokenUrl = ""
|
this.accessTokenUrl = ""
|
||||||
this.clientId = ""
|
this.clientId = ""
|
||||||
this.scope = ""
|
this.scope = ""
|
||||||
this.files = []
|
this.headers = []
|
||||||
|
this.testReports = []
|
||||||
}
|
}
|
||||||
target.innerHTML = this.doneButton
|
target.innerHTML = this.doneButton
|
||||||
this.$toast.info(this.$t("cleared"), {
|
this.$toast.info(this.$t("cleared"), {
|
||||||
|
|||||||
Reference in New Issue
Block a user