Skip to content
Merged
Show file tree
Hide file tree
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
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
Loading