Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(contactus): ensure feedback key is present as string #1501

Conversation

dcshzj
Copy link
Contributor

@dcshzj dcshzj commented Sep 18, 2023

Problem

Closes IS-532.

Solution

Breaking Changes

  • Yes - this PR contains breaking changes
  • No - this PR is backwards compatible

Bug Fixes:

  • On the backend, the feedback key needs to be a string, even if it is not required. However, because of the use of _.cloneDeep(), the feedback key will be deleted if the user did not specify a feedback URL, which causes a validation error. This change enforces that the feedback key is always present and sets it to be an empty string if not provided.

Tests

  • Unit tests (using npm run tests)
  • e2e tests (comment on this PR with the text !run e2e)
  • Smoke tests
    • Navigate to a site where the _data/footer.yml file has a null feedback key (i.e. feedback: )
    • Visit the Contact Us page
    • Make any change, the page should save successfully (previously it cannot save)

Deploy Notes

None

@dcshzj dcshzj requested a review from a team September 18, 2023 06:26
@dcshzj dcshzj temporarily deployed to staging September 18, 2023 06:34 — with GitHub Actions Inactive
@dcshzj dcshzj temporarily deployed to staging September 18, 2023 06:39 — with GitHub Actions Inactive
@dcshzj dcshzj merged commit 2aeeeb1 into develop Sep 18, 2023
@mergify mergify bot deleted the IS-532-contact-us-page-is-not-able-to-save-if-feedback-is-empty-initially branch September 18, 2023 07:00
@harishv7 harishv7 mentioned this pull request Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants