Skip to content

Commit afc0119

Browse files
authored
Merge pull request #5611 from Countly/QT-227
[QT-227] Verify that the Community Edition screens that includes data, can be opened as error-free - VOL 4
2 parents b8e8629 + 124d282 commit afc0119

File tree

13 files changed

+1461
-242
lines changed

13 files changed

+1461
-242
lines changed

plugins/crashes/frontend/public/templates/overview.html

+28-11
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,43 @@
2020
<div class="bu-is-flex bu-is-flex-direction-column">
2121
<a
2222
class="crash-group-title has-ellipsis"
23+
:data-test-id="'datatable-crash-groups-group-title-' + col.$index"
2324
:href="'#/crashes/' + col.row._id"
2425
v-html="col.row.name">
2526
</a>
2627
<div class="bu-mt-2 bu-is-flex">
27-
<crash-badge :type="badge.type" v-html="badge.content" v-for="badge in badgesFor(col.row)"></crash-badge>
28+
<crash-badge :type="badge.type" v-html="badge.content" v-for="(badge, badgeIndex) in badgesFor(col.row)" :data-test-id="'datatable-crash-groups-badge-type-' + badgeIndex + '-col-' + col.$index"></crash-badge>
2829
</div>
2930
</div>
3031
</template>
3132
</el-table-column>
3233
<template v-for="(col,idx) in scope.dynamicCols">
33-
<el-table-column v-if="col.value === 'os'" :key="idx" prop="os" :label="i18n('crashes.platform')" width="120" show-overflow-tooltip sortable></el-table-column>
34+
<el-table-column v-if="col.value === 'os'" :key="idx" prop="os" :label="i18n('crashes.platform')" width="120" show-overflow-tooltip sortable>
35+
<template slot-scope="rowScope">
36+
<span :data-test-id="'datatable-crash-groups-platform-' + rowScope.$index">{{rowScope.row.os}}</span>
37+
</template>
38+
</el-table-column>
3439
<el-table-column v-if="col.value === 'reports'" :key="idx" prop="reports" :label="i18n('crashes.reports')" width="150" sortable :sort-method="occurrenceSort">
3540
<template slot-scope="rowScope">
36-
<span v-if="singleAppVersionFilter.length">{{rowScope.row.app_version[singleAppVersionFilter.replace(/\./g, ':')]}}</span>
37-
<span v-else>{{rowScope.row.reports}}</span>
41+
<span v-if="singleAppVersionFilter.length" :data-test-id="'datatable-crash-groups-occurences-' + rowScope.$index">{{rowScope.row.app_version[singleAppVersionFilter.replace(/\./g, ':')]}}</span>
42+
<span v-else :data-test-id="'datatable-crash-groups-occurences-' + rowScope.$index">{{rowScope.row.reports}}</span>
43+
</template>
44+
</el-table-column>
45+
<el-table-column v-if="col.value === 'lastTs'" :key="idx" prop="lastTs" :label="i18n('crashes.last_time')" :formatter="formatDate" width="180" sortable>
46+
<template slot-scope="rowScope">
47+
<div :data-test-id="'datatable-crash-groups-last-occurrence-' + rowScope.$index">{{formatDate(null,null,rowScope.row.lastTs)}}</div>
48+
</template>
49+
</el-table-column>
50+
<el-table-column v-if="col.value === 'users'" :key="idx" prop="users" :label="i18n('crashes.affected-users')" width="170" sortable>
51+
<template slot-scope="rowScope">
52+
<span :data-test-id="'datatable-crash-groups-affected-users-' + rowScope.$index">{{rowScope.row.users}}</span>
53+
</template>
54+
</el-table-column>
55+
<el-table-column v-if="col.value === 'latest_version'" :key="idx" prop="latest_version" :label="i18n('crashes.latest_app')" width="190" sortable :sort-method="appVersionSort">
56+
<template slot-scope="rowScope">
57+
<span :data-test-id="'datatable-crash-groups-latest-app-version-' + rowScope.$index">{{rowScope.row.latest_version}}</span>
3858
</template>
3959
</el-table-column>
40-
<el-table-column v-if="col.value === 'lastTs'" :key="idx" prop="lastTs" :label="i18n('crashes.last_time')" :formatter="formatDate" width="180" sortable></el-table-column>
41-
<el-table-column v-if="col.value === 'users'" :key="idx" prop="users" :label="i18n('crashes.affected-users')" width="170" sortable></el-table-column>
42-
<el-table-column v-if="col.value === 'latest_version'" :key="idx" prop="latest_version" :label="i18n('crashes.latest_app')" width="190" sortable :sort-method="appVersionSort"></el-table-column>
4360
</template>
4461
</template>
4562
<template v-slot:bottomline="scope">
@@ -116,14 +133,14 @@
116133
<div data-test-id="crash-statistics-top-platforms-label">{{i18n("crashes.top-platforms")}}</div>
117134
<div class="bu-ml-1"><cly-tooltip-icon data-test-id="crash-statistics-top-platforms-tooltip" icon="ion ion-help-circled" :tooltip="i18n('crashes.help-platforms')"></cly-tooltip-icon></div>
118135
</div>
119-
<div class="bu-column bu-pt-0" v-for="platform in statistics.topPlatformsOrder">
136+
<div class="bu-column bu-pt-0" v-for="(platform, platformIndex) in statistics.topPlatformsOrder">
120137
<div class="bu-columns bu-is-gapless bu-is-mobile text-medium color-gray-100 bu-mb-1">
121-
<div class="bu-column">{{platform}}</div>
122-
<div class="bu-column bu-has-text-right">
138+
<div class="bu-column" :data-test-id="'crash-statistics-top-platforms-platform-' + platformIndex">{{platform}}</div>
139+
<div class="bu-column bu-has-text-right" :data-test-id="'crash-statistics-top-platforms-platform-users-percentage-' + platformIndex">
123140
{{statistics.topPlatforms[platform].count}} Users ({{statistics.topPlatforms[platform].percent.toFixed(1)}}%)
124141
</div>
125142
</div>
126-
<cly-progress-bar :percentage="statistics.topPlatforms[platform].percent" color="#F96300" backgroundColor="#ECECEC" :height="8">
143+
<cly-progress-bar :test-id="'crash-statistics-top-platforms-platform-' + platformIndex" :percentage="statistics.topPlatforms[platform].percent" color="#F96300" backgroundColor="#ECECEC" :height="8">
127144
</cly-progress-bar>
128145
</div>
129146
</div>

plugins/push/frontend/public/templates/push-notification-tab.html

+23-23
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</div>
3131
</div>
3232
<cly-section>
33-
<cly-datatable-n :data-source="remoteTableDataSource" v-loading="areRowsLoading || isUserCommandLoading" :force-loading="isLoading" :available-dynamic-cols="optionalTableColumns" :resizable="true" class="is-clickable cly-vue-push-notification-table">
33+
<cly-datatable-n test-id="messaging" :data-source="remoteTableDataSource" v-loading="areRowsLoading || isUserCommandLoading" :force-loading="isLoading" :available-dynamic-cols="optionalTableColumns" :resizable="true" class="is-clickable cly-vue-push-notification-table">
3434
<template v-slot:header-left>
3535
<cly-multi-select
3636
class="bu-ml-3 ratings-tab-view__filter-selector"
@@ -43,12 +43,12 @@
4343
<template slot-scope="scope">
4444
<div class="bu-is-flex bu-is-flex-direction-column">
4545
<a v-bind:href="'#/messaging/details/' + scope.row._id" class="bu-is-flex bu-is-align-items-center">
46-
<a class="has-ellipsis">{{(scope.row.name)}}</a>
46+
<a class="has-ellipsis" :data-test-id="'datatable-messaging-campaign-name-' + scope.$index">{{(scope.row.name)}}</a>
4747
</a>
4848
<span class="cly-vue-push-notification-table-column__second-line">
49-
<span> {{getPreviewPlatforms(scope.row.platforms)}} </span>
50-
<span class="blinker cly-vue-push-notification-table-column__separator-blinker"></span>
51-
<span> {{i18n('push-notification.created-by')}} {{scope.row.createdBy || '-'}} </span>
49+
<span :data-test-id="'datatable-messaging-platform-name-' + scope.$index"> {{getPreviewPlatforms(scope.row.platforms)}} </span>
50+
<span class="blinker cly-vue-push-notification-table-column__separator-blinker" :data-test-id="'datatable-messaging-blinker-' + scope.$index"></span>
51+
<span :data-test-id="'datatable-messaging-created-by-' + scope.$index"> {{i18n('push-notification.created-by')}} {{scope.row.createdBy || '-'}} </span>
5252
</span>
5353
</div>
5454
</template>
@@ -90,21 +90,21 @@
9090
</template>
9191
<el-table-column width="220" sortable="custom" prop="status" :label="i18n('push-notification.table-status')">
9292
<template slot-scope="scope">
93-
<cly-status-tag :text="statusOptions[scope.row.status] && statusOptions[scope.row.status].label || '' " :color="getStatusBackgroundColor(scope.row.status)"> </cly-status-tag>
93+
<cly-status-tag :text="statusOptions[scope.row.status] && statusOptions[scope.row.status].label || '' " :color="getStatusBackgroundColor(scope.row.status)" :data-test-id="'datatable-messaging-status-' + scope.$index"> </cly-status-tag>
9494
</template>
9595
</el-table-column>
9696
<el-table-column width="220" sortable="custom" prop="sent" :label="i18n('push-notification.table-sent')" class="cly-vue-push-notification-table-column">
9797
<template slot-scope="scope">
98-
<span class="cly-vue-push-notification-table-column__numbers-only"> {{formatNumber(scope.row.sent)}} </span>
98+
<span class="cly-vue-push-notification-table-column__numbers-only" :data-test-id="'datatable-messaging-sent-' + scope.$index"> {{formatNumber(scope.row.sent)}} </span>
9999
</template>
100100
</el-table-column>
101101
<el-table-column min-width="200" sortable="custom" prop="actioned" :label="i18n('push-notification.table-actioned')" class="cly-vue-push-notification-table-column">
102102
<template slot-scope="scope">
103103
<div class="bu-level">
104104
<div class="bu-level-left cly-vue-push-notification-table-column__numbers-only">
105-
<span class="bu-mr-1">{{formatNumber(scope.row.actioned)}}</span>
106-
<span class="bu-mr-1">|</span>
107-
<span>{{formatPercentage(scope.row.actioned/scope.row.sent)}} %</span>
105+
<span class="bu-mr-1" :data-test-id="'datatable-messaging-actioned-value-' + scope.$index">{{formatNumber(scope.row.actioned)}}</span>
106+
<span class="bu-mr-1" :data-test-id="'datatable-messaging-actioned-divider-' + scope.$index">|</span>
107+
<span :data-test-id="'datatable-messaging-actioned-percentage-' + scope.$index">{{formatPercentage(scope.row.actioned/scope.row.sent)}} %</span>
108108
</div>
109109
</div>
110110
</template>
@@ -113,8 +113,8 @@
113113
<template slot-scope="scope">
114114
<div class="bu-is-flex bu-is-flex-direction-column">
115115
<template v-if="scope.row.lastDate && scope.row.lastDate.date">
116-
<span class="cly-vue-push-notification-table-column__first-line">{{scope.row.lastDate.date}}</span>
117-
<span class="cly-vue-push-notification-table-column__second-line">{{scope.row.lastDate.time}}</span>
116+
<span class="cly-vue-push-notification-table-column__first-line" :data-test-id="'datatable-messaging-date-sent-' + scope.$index">{{scope.row.lastDate.date}}</span>
117+
<span class="cly-vue-push-notification-table-column__second-line" :data-test-id="'datatable-messaging-scheduled-' + scope.$index">{{scope.row.lastDate.time}}</span>
118118
</template>
119119
<template v-else>
120120
<span>-</span>
@@ -133,17 +133,17 @@
133133

134134
<el-table-column type="options">
135135
<template slot-scope="scope">
136-
<cly-more-options v-if="scope.row.hover" size="small" @command="handleUserCommands($event, scope.row._id, scope.row.notificationType)">
137-
<el-dropdown-item v-if="shouldShowStartUserCommand(scope.row.status)" :command="UserCommandEnum.START">{{i18n('push-notification.start')}} </el-dropdown-item>
138-
<el-dropdown-item v-if="shouldShowStopUserCommand(scope.row.status)" :command="UserCommandEnum.STOP">{{i18n('push-notification.stop')}} </el-dropdown-item>
139-
<el-dropdown-item v-if="shouldShowEditUserCommand(scope.row.status)" :command="UserCommandEnum.EDIT">{{i18n('push-notification.edit')}}</el-dropdown-item>
140-
<el-dropdown-item v-if="shouldShowEditDraftUserCommand(scope.row.status)" :command="UserCommandEnum.EDIT_DRAFT">{{i18n('push-notification.edit-draft')}}</el-dropdown-item>
141-
<el-dropdown-item v-if="shouldShowEditRejectUserCommand(scope.row.status)" :command="UserCommandEnum.EDIT_REJECT">{{i18n('push-notification.edit')}}</el-dropdown-item>
142-
<el-dropdown-item v-if="shouldShowDuplicateUserCommand(scope.row.status)" :command="UserCommandEnum.DUPLICATE">{{i18n('push-notification.duplicate')}}</el-dropdown-item>
143-
<el-dropdown-item v-if="shouldShowDeleteUserCommand(scope.row.status)" :command="UserCommandEnum.DELETE">{{i18n('push-notification.delete')}}</el-dropdown-item>
144-
<el-dropdown-item v-if="shouldShowResendUserCommand(scope.row.status)" :command="UserCommandEnum.RESEND">{{i18n('push-notification.resend')}}</el-dropdown-item>
145-
<el-dropdown-item v-if="shouldShowApproveUserCommand(scope.row.status)" :command="UserCommandEnum.APPROVE">{{i18n('push-notification.approve')}}</el-dropdown-item>
146-
<el-dropdown-item v-if="shouldShowRejectUserCommand(scope.row.status)" :command="UserCommandEnum.REJECT">{{i18n('push-notification.reject')}}</el-dropdown-item>
136+
<cly-more-options :test-id="'datatable-messaging-more-button-' + scope.$index" v-if="scope.row.hover" size="small" @command="handleUserCommands($event, scope.row._id, scope.row.notificationType)">
137+
<el-dropdown-item v-if="shouldShowStartUserCommand(scope.row.status)" :command="UserCommandEnum.START" :data-test-id="'datatable-messaging-more-option-start-' + scope.$index">{{i18n('push-notification.start')}} </el-dropdown-item>
138+
<el-dropdown-item v-if="shouldShowStopUserCommand(scope.row.status)" :command="UserCommandEnum.STOP" :data-test-id="'datatable-messaging-more-option-stop-' + scope.$index">{{i18n('push-notification.stop')}} </el-dropdown-item>
139+
<el-dropdown-item v-if="shouldShowEditUserCommand(scope.row.status)" :command="UserCommandEnum.EDIT" :data-test-id="'datatable-messaging-more-option-edit-' + scope.$index">{{i18n('push-notification.edit')}}</el-dropdown-item>
140+
<el-dropdown-item v-if="shouldShowEditDraftUserCommand(scope.row.status)" :command="UserCommandEnum.EDIT_DRAFT" :data-test-id="'datatable-messaging-more-option-edit-draft-' + scope.$index">{{i18n('push-notification.edit-draft')}}</el-dropdown-item>
141+
<el-dropdown-item v-if="shouldShowEditRejectUserCommand(scope.row.status)" :command="UserCommandEnum.EDIT_REJECT" :data-test-id="'datatable-messaging-more-option-edit-reject-' + scope.$index">{{i18n('push-notification.edit')}}</el-dropdown-item>
142+
<el-dropdown-item v-if="shouldShowDuplicateUserCommand(scope.row.status)" :command="UserCommandEnum.DUPLICATE" :data-test-id="'datatable-messaging-more-option-duplicate-' + scope.$index">{{i18n('push-notification.duplicate')}}</el-dropdown-item>
143+
<el-dropdown-item v-if="shouldShowDeleteUserCommand(scope.row.status)" :command="UserCommandEnum.DELETE" :data-test-id="'datatable-messaging-more-option-delete-' + scope.$index">{{i18n('push-notification.delete')}}</el-dropdown-item>
144+
<el-dropdown-item v-if="shouldShowResendUserCommand(scope.row.status)" :command="UserCommandEnum.RESEND" :data-test-id="'datatable-messaging-more-option-resend-' + scope.$index">{{i18n('push-notification.resend')}}</el-dropdown-item>
145+
<el-dropdown-item v-if="shouldShowApproveUserCommand(scope.row.status)" :command="UserCommandEnum.APPROVE" :data-test-id="'datatable-messaging-more-option-approve-' + scope.$index">{{i18n('push-notification.approve')}}</el-dropdown-item>
146+
<el-dropdown-item v-if="shouldShowRejectUserCommand(scope.row.status)" :command="UserCommandEnum.REJECT" :data-test-id="'datatable-messaging-more-option-reject-' + scope.$index">{{i18n('push-notification.reject')}}</el-dropdown-item>
147147
</cly-more-options>
148148
</template>
149149
</el-table-column>

plugins/star-rating/frontend/public/templates/comments-table.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</el-table-column>
2424
<el-table-column prop="email" :label="i18n('feedback.email')" min-width="200">
2525
<template v-slot="rowScope">
26-
<span class="text-medium" :data-test-id="'ratings-comment-table-time-email-row' + rowScope.$index">
26+
<span class="text-medium" :data-test-id="'ratings-comment-table-email-row-' + rowScope.$index">
2727
{{ rowScope.row.email }}
2828
</span>
2929
</template>

0 commit comments

Comments
 (0)