Skip to content

Commit 377d968

Browse files
Merge branch 'master' into SER-2580-Missing-state-in-oidc
2 parents 485e788 + ccf4a06 commit 377d968

File tree

4 files changed

+27
-22
lines changed

4 files changed

+27
-22
lines changed

frontend/express/public/javascripts/countly/vue/components/helpers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -991,10 +991,10 @@
991991
},
992992
template: '<div class="bu-is-flex bu-is-flex-wrap-wrap bu-is-align-items-center">\
993993
<div class="cly-vue-color-tag__color-tag-wrapper" v-for="(tag,idx) in tags">\
994-
<div v-if="tag.value == selectedTag.value" @click="click(tag)" class="cly-vue-color-tag__color-tag cly-vue-color-tag__color-tag__selected bu-is-flex bu-is-align-items-center bu-is-justify-content-center" :style="{backgroundColor: tag.label}">\
994+
<div v-if="tag.value == selectedTag.value" @click="click(tag)" :data-test-id="`color-tag-${idx}`" class="cly-vue-color-tag__color-tag cly-vue-color-tag__color-tag__selected bu-is-flex bu-is-align-items-center bu-is-justify-content-center" :style="{backgroundColor: tag.label}">\
995995
<i class="ion-checkmark cly-vue-color-tag__checkmark"></i>\
996996
</div>\
997-
<div v-else @click="click(tag)" class="cly-vue-color-tag__color-tag bu-is-flex bu-is-align-items-center bu-is-justify-content-center" :style="{backgroundColor: tag.label}"></div>\
997+
<div v-else @click="click(tag)" :data-test-id="`color-tag-${idx}`" class="cly-vue-color-tag__color-tag bu-is-flex bu-is-align-items-center bu-is-justify-content-center" :style="{backgroundColor: tag.label}"></div>\
998998
</div>\
999999
</div>'
10001000
}));

plugins/remote-config/frontend/public/templates/conditions-drawer.html

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
:title="title"
66
ref="clyDrawer"
77
:saveButtonLabel="saveButtonLabel"
8-
v-bind="controls">
8+
v-bind="controls" test-id="condition-drawer">
99
<template v-slot:default="drawerScope">
1010
<cly-form-step id="conditions-drawer">
1111
<div class="cly-vue-drawer-step__section">
12-
<cly-form-field name="condition-name" v-slot="validation" :subheading="i18n('placeholder.condition-name')" :label="i18n('remote-config.condition-name')" rules="required|regex:^[a-zA-Z0-9 ]+$">
12+
<cly-form-field name="condition-name" test-id="condition-drawer-name-label" v-slot="validation" :subheading="i18n('placeholder.condition-name')" :label="i18n('remote-config.condition-name')" rules="required|regex:^[a-zA-Z0-9 ]+$">
1313
<el-input
14+
test-id="condition-drawer-name-input"
1415
v-model="drawerScope.editedObject.condition_name"
1516
:placeholder="i18n('remote-config.condition.name.placeholder')">
1617
</el-input>
@@ -19,14 +20,15 @@
1920
</div>
2021
</cly-form-field>
2122
<div class="bu-pt-3 bu-mt-2 bu-pb-1">
22-
<el-checkbox class="text-smallish"
23+
<el-checkbox test-id="condition-drawer-use-desc-checkbox" class="text-smallish"
2324
v-bind:label="i18n('remote-config.use.description')"
2425
v-model="useDescription"
2526
>
2627
</el-checkbox>
2728
<div class="bu-pt-3 cly-vue-remote-config-conditions-drawer" v-if="useDescription">
28-
<cly-form-field name="description" :label="i18n('remote-config.conditions.description')" rules="required">
29+
<cly-form-field test-id="condition-drawer-description-label" name="description" :label="i18n('remote-config.conditions.description')" rules="required">
2930
<textarea
31+
data-test-id="condition-drawer-description-input"
3032
class="input"
3133
v-model="drawerScope.editedObject.condition_description"
3234
:placeholder="i18n('remote-config.conditions.description.placeholder')">
@@ -35,7 +37,7 @@
3537
</div>
3638
</div>
3739
<div class="bu-py-4">
38-
<div class="text-big font-weight-bold bu-mb-1">
40+
<div data-test-id="condition-drawer-color-tag-label" class="text-big font-weight-bold bu-mb-1">
3941
{{i18n('remote-config.condition.color.tag')}}
4042
</div>
4143
<cly-color-tag :tags="colorTag" :defaultTag="defaultTag" v-model="selectedTag"></cly-color-tag>
@@ -53,12 +55,13 @@
5355
</el-input>
5456
</div>
5557
<div class="bu-pt-4">
56-
<div class="font-weight-bold text-big bu-mb-1">
58+
<div data-test-id="condition-drawer-condition-definition-label" class="font-weight-bold text-big bu-mb-1">
5759
{{i18n('remote-config.condition-definition')}}
5860
</div>
5961
<div>
6062
<validation-provider name="condition-definition" rules="required" v-slot="v">
61-
<cly-qb-segmentation
63+
<cly-qb-segmentation
64+
test-id="condition-drawer"
6265
ref="qb"
6366
:class="{'is-error': v.errors.length > 0}"
6467
:additional-properties="additionalProperties"

plugins/remote-config/frontend/public/templates/conditions.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,34 @@
44
>
55
<template v-slot:header-right>
66
<div class="bu-level-item" v-if="hasCreateRight">
7-
<el-button @click="create" type="success" size="small" icon="el-icon-circle-plus">Add Condition</el-button>
7+
<el-button data-test-id="add-condition-button" @click="create" type="success" size="small" icon="el-icon-circle-plus">Add Condition</el-button>
88
</div>
99
</template>
1010
</cly-header>
1111
<cly-main>
12-
<cly-datatable-n :rows="tableRows" :force-loading="isTableLoading" class="cly-vue-remote-config-conditions-table" :row-class-name="tableRowClassName">
12+
<cly-datatable-n test-id="condition" :rows="tableRows" :force-loading="isTableLoading" class="cly-vue-remote-config-conditions-table" :row-class-name="tableRowClassName">
1313
<template v-slot="scope">
1414
<el-table-column prop="condition_name" :label="i18n('remote-config.condition-name')" sortable="custom">
1515
<template v-slot="rowScope">
1616
<div>
17-
<div class="cly-vue-remote-config-conditions-drawer__margin-bottom"> {{rowScope.row.condition_name}}</div>
18-
<div class="color-cool-gray-40 text-small"> {{rowScope.row.used_in_parameters}} {{i18n('remote-config.conditions.parameter.affected')}}</div>
17+
<div :data-test-id="'datatable-condition-name-' + rowScope.$index" class="cly-vue-remote-config-conditions-drawer__margin-bottom"> {{rowScope.row.condition_name}}</div>
18+
<div :data-test-id="'datatable-condition-parameter-affect-' + rowScope.$index" class="color-cool-gray-40 text-small"> {{rowScope.row.used_in_parameters}} {{i18n('remote-config.conditions.parameter.affected')}}</div>
1919
</div>
2020
</template>
2121
</el-table-column>
22-
<el-table-column prop="condition_description" :label="i18n('remote-config.description')">
22+
<el-table-column test-id="condition" prop="condition_description" :label="i18n('remote-config.description')">
2323
<template v-slot:default="rowScope">
24-
{{displayDescription(rowScope.row.condition_description)}}
24+
<div :data-test-id="'datatable-condition-description-' + rowScope.$index"> {{displayDescription(rowScope.row.condition_description)}}</div>
2525
</template>
2626
</el-table-column>
27-
<el-table-column prop="condition_definition" :label="i18n('remote-config.definition')">
27+
<el-table-column test-id="condition" prop="condition_definition" :label="i18n('remote-config.definition')">
2828
<template v-slot:default="rowScope">
29-
<div v-html="rowScope.row.condition_definition"></div>
29+
<div :data-test-id="'datatable-condition-description-' + rowScope.$index" v-html="rowScope.row.condition_definition"></div>
3030
</template>
3131
</el-table-column>
32-
<el-table-column prop="seed_value" :label="i18n('remote-config.seed-value')">
32+
<el-table-column test-id="condition" prop="seed_value" :label="i18n('remote-config.seed-value')">
3333
<template v-slot:default="rowScope">
34-
{{rowScope.row.seed_value || "Default"}}
34+
<div :data-test-id="'datatable-condition-seed-value-' + rowScope.$index"> {{rowScope.row.seed_value || "Default"}}</div>
3535
</template>
3636
</el-table-column>
3737
<el-table-column type="options" v-if="hasUpdateRight || hasDeleteRight">

plugins/remote-config/frontend/public/templates/parameters-drawer.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@
2626
</div>
2727
</cly-form-field>
2828
<div class="bu-pt-3 bu-mt-2 bu-pb-1">
29-
<el-checkbox class="text-smallish"
29+
<el-checkbox test-id="parameter-description" class="text-smallish"
3030
v-bind:label="i18n('remote-config.use.description')"
3131
v-model="showDescription"
3232
>
3333
</el-checkbox>
3434
<div class="bu-pt-3 cly-vue-remote-config-conditions-drawer" v-if="showDescription">
35-
<cly-form-field name="description" :label="i18n('remote-config.parameter.description')" rules="required">
35+
<cly-form-field test-id="parameter-description" name="description" :label="i18n('remote-config.parameter.description')" rules="required">
3636
<textarea
37+
data-test-id="parameter-description-input"
3738
class="input"
3839
v-model="drawerScope.editedObject.description"
3940
:placeholder="i18n('remote-config.parameter.description.placeholder')">
@@ -77,6 +78,7 @@
7778
</remote-config-add-condition>
7879
</draggable>
7980
<cly-select-x
81+
test-id="add-value-for-condition"
8082
ref="selectX"
8183
@change="handleSelect"
8284
v-model="currentConditionValue"
@@ -91,7 +93,7 @@
9193
</template>
9294
<template v-slot:action>
9395
<div class="bu-ml-3">
94-
<el-button type="success" size="small" @click="showConditionDialog" icon="el-icon-circle-plus">{{i18n('remote-config.parameter.conditions.new.condition')}}
96+
<el-button data-test-id="new-condition-button" type="success" size="small" @click="showConditionDialog" icon="el-icon-circle-plus">{{i18n('remote-config.parameter.conditions.new.condition')}}
9597
</el-button>
9698
</div>
9799
</template>

0 commit comments

Comments
 (0)