Skip to content

Commit

Permalink
Merge pull request #143 from Zubs/feat/xray-integration
Browse files Browse the repository at this point in the history
feat: xray integration
  • Loading branch information
dacoaster authored Mar 19, 2024
2 parents 27b89e3 + 085ac91 commit 7315020
Show file tree
Hide file tree
Showing 13 changed files with 1,194 additions and 25 deletions.
Binary file added src/assets/icon/xray-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/components/ControlPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@
:selected="selected"
/>
</div>
<div v-if="credentials.xray && credentials.xray.length > 0">
<xray-export-session
:title="$tc(`caption.export_to_xray`, 1)"
:credential-items="credentials.xray"
:items="items"
:selected="selected"
/>
</div>
</v-list>
</v-card>
</v-menu>
Expand Down Expand Up @@ -764,6 +772,7 @@ import EndSessionDialog from "./dialogs/EndSessionDialog.vue";
//import MinimizeControlWrapper from "../components/MinimizeControlWrapper.vue";
import JiraExportSession from "./jira/JiraExportSession";
import TestRailExportSession from "./testrail/TestRailExportSession";
import XrayExportSession from "./xray/XrayExportSession";
import AddEvidenceDialog from "@/components/dialogs/AddEvidenceDialog.vue";
import JiraAddIssue from "./jira/JiraAddIssue";
Expand Down Expand Up @@ -810,6 +819,7 @@ export default {
// MinimizeControlWrapper,
JiraExportSession,
TestRailExportSession,
XrayExportSession,
JiraAddIssue,
},
props: {
Expand Down
13 changes: 13 additions & 0 deletions src/components/ExportPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@
</v-list-item-title>
</v-list-item-content>
</v-list-item>
<div
v-if="this.credentials.xray && this.credentials.xray.length > 0"
>
<xray-export-session
:title="$tc(`caption.export_to_xray`, 1)"
:credential-items="credentials.xray"
:selected="[]"
:items="itemLists"
@close-menu="() => (evidenceExportDestinationMenu = false)"
/>
</div>
<!-- TODO - What does it look like to export an entire session to a 3rd party service?
<div
v-if="this.credentials.jira && this.credentials.jira.length > 0"
Expand Down Expand Up @@ -75,12 +86,14 @@
<script>
//import JiraExportSession from "./jira/JiraExportSession";
//import TestRailExportSession from "./testrail/TestRailExportSession";
import XrayExportSession from "./xray/XrayExportSession";
export default {
name: "ExportPanel",
components: {
//JiraExportSession,
//TestRailExportSession,
XrayExportSession,
},
props: {
items: {
Expand Down
31 changes: 13 additions & 18 deletions src/components/MenuPopover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,22 @@
width="32"
height="32"
>
<img
:src="
credential.user.avatar
? credential.user.avatar
: 'https://www.gravatar.com/avatar/' +
credential.user.name
"
alt="avatar"
width="32"
/>
<img :src="profileAvatar" alt="avatar" width="32" />
</v-list-item-avatar>

<v-list-item-content>
<v-list-item-title>
{{ credential.user.name }}
{{
credential.user.name ??
credential.type.charAt(0).toUpperCase() +
credential.type.substr(1).toLowerCase() +
` User`
}}
</v-list-item-title>
<v-list-item-subtitle>
{{ credential.user.email }}
</v-list-item-subtitle>
</v-list-item-content>

<v-list-item-action>
<v-btn
icon
Expand Down Expand Up @@ -130,12 +125,12 @@ export default {
if (cList.length > 0) {
if (cList[0].user.avatar) {
return cList[0].user.avatar;
} else {
} else if (cList[0].user.name) {
return "https://www.gravatar.com/avatar/" + cList[0].user.name;
}
}
}
return "https://www.gravatar.com/avatar/" + uuidv4();
return "https://www.gravatar.com/avatar/" + uuidv4() + "?d=robohash";
},
},
methods: {
Expand All @@ -156,12 +151,12 @@ export default {
window.open(jiraUrl, "_blank");
}
this.showMenu = false;
} else if (credentialType === "testrail") {
const testRailUrl = `https://${credential.url}`;
} else if (credentialType === "testrail" || credentialType === "xray") {
const url = `https://${credential.url}`;
if (this.$isElectron) {
await this.$electronService.openExternalLink(testRailUrl);
await this.$electronService.openExternalLink(url);
} else {
window.open(testRailUrl, "_blank");
window.open(url, "_blank");
}
this.showMenu = false;
}
Expand Down
15 changes: 15 additions & 0 deletions src/components/authentication/SigninWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@
{{ $tc("caption.signin_testrail", 1) }}
</div>
</v-btn>
<v-btn
class="mb-4 outline-btn jira"
block
outlined
color="white"
@click="signinXray"
>
<img :src="require('../../assets/icon/xray-logo.png')" width="12" />
<div class="btn-text" :style="{ color: currentTheme.secondary }">
{{ $tc("caption.signin_xray", 1) }}
</div>
</v-btn>
<!--<v-btn class="mb-4 outline-btn" block outlined color="white">
<img :src="require('../../assets/icon/qtest.png')" />
<div class="btn-text" :style="{ color: currentTheme.secondary }">
Expand Down Expand Up @@ -178,6 +190,9 @@ export default {
signinTestRail() {
this.$router.push({ path: "/authentication/signinTestRail" });
},
signinXray() {
this.$router.push({ path: "/authentication/signinXray" });
},
},
};
</script>
Expand Down
Loading

0 comments on commit 7315020

Please sign in to comment.