Skip to content

Commit

Permalink
Merge branch 'master' into anna/master
Browse files Browse the repository at this point in the history
  • Loading branch information
Cookiezaurs authored Oct 8, 2024
2 parents 3686f47 + e533b6b commit 05c6371
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Version 24.05.15
Enterprise fixes:
- [nps] Fixed UI issues in the widget editor related to the "user consent" section
- [ratings] Fixed rendering issue for escaped values

## Version 24.05.14
Fixes:
- [code] Added better handling for countly servers while deployed using subdirectory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@
<slot name="option-prefix" v-bind="option"></slot>\
</div>\
<slot name="option-label" v-bind="option">\
<div :data-test-id="testId + \'-item-\' + (option.label ? option.label.replaceAll(\' \', \'-\').toLowerCase() : \' \')" class="cly-vue-listbox__item-label" v-tooltip="option.label">{{decodeHtml(option.label)}}</div>\
<div :data-test-id="testId + \'-item-\' + (option.label ? option.label.replaceAll(\' \', \'-\').toLowerCase() : \' \')" class="cly-vue-listbox__item-label" v-tooltip="decodeHtml(option.label)">{{decodeHtml(option.label)}}</div>\
</slot>\
</div>\
<div class="bu-level-right" v-if="hasRemovableOptions || !!$scopedSlots[\'option-suffix\']">\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@
steps: null
};
}
if (Array.isArray(this.widget.links)) {
if (Array.isArray(this.widget.links) && this.widget.links.length) {
this.widget.links.forEach(function(link) {
if (link.linkValue.indexOf('term')) {
link.text = "Terms and Conditions";
Expand All @@ -1162,8 +1162,9 @@
link.linkValue = link.linkValue.replace(new RegExp('[?&]' + CLY_X_INT + '=[^&]*'), '').replace(/[?&]$/, '');
});
this.widget.links = {"link": this.widget.links, "finalText": this.widget.finalText};
this.widget.consent = true;
}
if (!this.widget.links) {
else {
this.widget.links = {
"link": [
{
Expand All @@ -1182,6 +1183,7 @@
"finalText": "I agree to the Terms and Conditions and Privacy Policy."

};
this.widget.consent = false;
}
if (!this.widget.rating_symbol) {
this.widget.rating_symbol = "emojis";
Expand Down
3 changes: 2 additions & 1 deletion ui-tests/cypress/e2e/dashboard/feedback/ratings/widgets.cy.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('Create New Widget', () => {
navigationHelpers.goToFeedbackRatingsWidgetsPage();
});

it('Verify default values of page and create a widget with that values and then update the widget data', function() {
it.skip('Verify default values of page and create a widget with that values and then update the widget data', function() {
widgetsHelpers.clickAddNewWidgetButton();
widgetsHelpers.verifySettingsPageDefaultElements();
widgetsHelpers.typeWidgetName("My New Widget");
Expand Down Expand Up @@ -222,6 +222,7 @@ describe('Create New Widget', () => {
contactViaCheckboxLabelText: widget.contactViaCheckboxLabelText,
contactEmail: widgetRate.contactEmail,
submitButtonText: widget.submitButtonText,
hasAggrementCheckbox: true,
selectedMainColor: widget.mainColor,
selectedFontColor: widget.FontColor,
hasPoweredByLogo: true,
Expand Down
7 changes: 7 additions & 0 deletions ui-tests/cypress/lib/dashboard/feedback/ratings/demoWidgetPage.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const verifyDemoPageElementsAndRate = ({
submitButtonText,
submitButtonColor,
submitButtonFontColor,
hasAggrementCheckbox = false,
hasPoweredByLogo = true,
thankYouMessageText,
successIconColor
Expand Down Expand Up @@ -132,6 +133,12 @@ const verifyDemoPageElementsAndRate = ({
cy.shouldNotExist(demoPageElements.LOGO_IMAGE);
}

if (hasAggrementCheckbox) {
cy.contains('label', 'I agree to the terms and conditions and privacy policy')
.find('input[type="checkbox"]')
.click();
}

cy.clickElement(demoPageElements.SUBMIT_BUTTON);

// cy.window().then((win) => {
Expand Down

0 comments on commit 05c6371

Please sign in to comment.