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

DXCDT-240: Prevent empty logo_url update payload inclusion #667

Merged
merged 6 commits into from
Oct 14, 2022

Conversation

willvedd
Copy link
Contributor

✏️ Changes

Under certain and unknown, conditions, an empty string logo_url is returned when fetching branding settings. While I have not been able to reproduce the export of a blank logo_url, is has been reported by #226 and #656, suggesting that real folks actually experience this. The proposed validation is simple enough and doesn't produce significant tech debt.

🔗 References

Original issues: #226, #656

🎯 Testing

Added a test case for logo_url being omitted from update payload.

Additionally, added an unrelated but important test around the prevention of sending an API request if branding settings is an empty object.

@willvedd willvedd requested a review from a team as a code owner October 13, 2022 20:05
expect(wasUpdateCalled).to.equal(true);
});

it('should not send updateSettings request if empty object passed', async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is unrelated, but still a valid case nonetheless.

@codecov-commenter
Copy link

codecov-commenter commented Oct 14, 2022

Codecov Report

Base: 83.36% // Head: 83.40% // Increases project coverage by +0.03% 🎉

Coverage data is based on head (eba48dc) compared to base (46147e5).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #667      +/-   ##
==========================================
+ Coverage   83.36%   83.40%   +0.03%     
==========================================
  Files         114      114              
  Lines        3331     3333       +2     
  Branches      614      615       +1     
==========================================
+ Hits         2777     2780       +3     
  Misses        323      323              
+ Partials      231      230       -1     
Impacted Files Coverage Δ
src/types.ts 100.00% <ø> (ø)
src/tools/auth0/handlers/branding.ts 75.60% <100.00%> (+3.81%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@willvedd willvedd merged commit adef285 into master Oct 14, 2022
@willvedd willvedd deleted the DXCDT-240-blank-logo-url-validation branch October 14, 2022 15:07
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.

3 participants