Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 65 additions & 29 deletions src/pages/TestLogs.vue
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
<template>
<div class="row no-wrap no-scroll q-pa-md">
<table class="q-table horizontal-separator full-width col-lg-12 col-xl-10">
<tr>
<td colspan="2">
<q-input placeholder="Search" v-model="search" debounce="300">
<template v-slot:append>
<q-icon name="search" />
</template>
</q-input>
</td>
<td>
<q-select
v-model="statusFilter"
label="Status filter"
radio
:options="testsStatusFilterLabels"
/>
</td>
</tr>
<thead>
<tr>
<td colspan="2">
<q-input placeholder="Search" v-model="search" debounce="300">
<template v-slot:append>
<q-icon name="search" />
</template>
</q-input>
</td>
<td>
<q-select
v-model="statusFilter"
label="Status filter"
radio
:options="testsStatusFilterLabels"
/>
</td>
</tr>
</thead>
<tbody v-for="test in tests" :key="test.id">
<tr class="bg-grey-2">
<td width="1px"></td>
Expand Down Expand Up @@ -148,13 +150,21 @@
</td>
<td class="text-center" width="15%">
<q-chip
:color="log.success ? 'green' : 'negative'"
:color="
log.skipped ? 'warning' : log.success ? 'green' : 'negative'
"
text-color="white"
dense
class="text-weight-bolder text-capitalize"
square
>
{{ log.success ? 'done' : 'failed' }}
{{
log.skipped
? 'skipped' // If skipped
: log.success
? 'done'
: 'failed'
}}
</q-chip>
</td>
</tr>
Expand Down Expand Up @@ -182,11 +192,13 @@
</template>
</template>
</tbody>
<tr v-if="!tests || tests.length == 0">
<td colspan="4" class="text-center text-blue-7">
<h6>Nothing here yet</h6>
</td>
</tr>
<tbody v-if="!tests || tests.length == 0">
<tr>
<td colspan="4" class="text-center text-blue-7">
<h6>Nothing here yet</h6>
</td>
</tr>
</tbody>
</table>
</div>

Expand Down Expand Up @@ -222,6 +234,7 @@
'system_info',
'install_package',
'tests',
'package_integrity_tests',
'third_party',
'uninstall_package',
'stop_environment',
Expand Down Expand Up @@ -296,6 +309,17 @@
.filter((opt) => test.alts_response.result[opt])
.forEach((opt) => {
let res = {}
if (test.alts_response.result.skipped_tests?.length > 0) {
while (test.alts_response.result.skipped_tests.length > 0) {
let res = {
skipped: true,
name: 'Skipped test',
short_name:
test.alts_response.result.skipped_tests.shift(),
}
parsed_test.result.push(res)
}
}
if (['tests', 'third_party'].includes(opt)) {
for (const item in test.alts_response.result[opt]) {
res = {
Expand Down Expand Up @@ -331,6 +355,12 @@
}
}
})
parsed_test.result.sort((a, b) => {
return (
this.test_options.indexOf(a.short_name) -
this.test_options.indexOf(b.short_name)
)
})
this.tests.push(parsed_test)
})
})
Expand Down Expand Up @@ -360,12 +390,18 @@
}
},
onView(log) {
let logUrl = `${window.origin}/pulp/content/test_logs/build-${this.buildId}-test_log/${log.name}`
this.selectedLog = log.name
axios.get(logUrl).then((response) => {
this.logText = response.data
if (log.name === 'Skipped test') {
this.logText =
'This test was marked to be skipped specifically for this project and platform'
this.$refs.openLogView.open()
})
} else {
let logUrl = `${window.origin}/pulp/content/test_logs/build-${this.buildId}-test_log/${log.name}`
this.selectedLog = log.name
axios.get(logUrl).then((response) => {
this.logText = response.data
this.$refs.openLogView.open()
})
}
},
},
components: {
Expand Down