-
Notifications
You must be signed in to change notification settings - Fork 108
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
chore: Add tests to publisher utils #5001
Conversation
import getSettingsFormData from "../getSettingsFormData"; | ||
|
||
const settingsData = { | ||
blacklist_countries: [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Inclusive naming check] reported by reviewdog 🐶
[warning] blacklist
may be insensitive, use denylist
, blocklist
instead
|
||
const settingsData = { | ||
blacklist_countries: [], | ||
blacklist_country_keys: "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Inclusive naming check] reported by reviewdog 🐶
[warning] blacklist
may be insensitive, use denylist
, blocklist
instead
update_metadata_on_release: false, | ||
visibility: "private", | ||
visibility_locked: false, | ||
whitelist_countries: ["GB"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Inclusive naming check] reported by reviewdog 🐶
[warning] whitelist
may be insensitive, use allowlist
instead
visibility: "private", | ||
visibility_locked: false, | ||
whitelist_countries: ["GB"], | ||
whitelist_country_keys: "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Inclusive naming check] reported by reviewdog 🐶
[warning] whitelist
may be insensitive, use allowlist
instead
}; | ||
|
||
const data = { | ||
blacklist_countries: [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Inclusive naming check] reported by reviewdog 🐶
[warning] blacklist
may be insensitive, use denylist
, blocklist
instead
update_metadata_on_release: false, | ||
visibility: "private", | ||
visibility_locked: false, | ||
whitelist_countries: ["GB"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Inclusive naming check] reported by reviewdog 🐶
[warning] whitelist
may be insensitive, use allowlist
instead
visibility: "private", | ||
visibility_locked: false, | ||
whitelist_countries: ["GB"], | ||
whitelist_country_keys: "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Inclusive naming check] reported by reviewdog 🐶
[warning] whitelist
may be insensitive, use allowlist
instead
territory_distribution_status: true, | ||
unlisted: true, | ||
visibility: true, | ||
whitelist_country_keys: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Inclusive naming check] reported by reviewdog 🐶
[warning] whitelist
may be insensitive, use allowlist
instead
expect(formData.get("snap_id")).toEqual("snap-id"); | ||
expect(formData.get("private")).toEqual("private"); | ||
expect(formData.get("territories")).toEqual("custom"); | ||
expect(formData.get("territories_custom_type")).toEqual("whitelist"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Inclusive naming check] reported by reviewdog 🐶
[warning] whitelist
may be insensitive, use allowlist
instead
expect(formData.get("private")).toEqual("private"); | ||
expect(formData.get("territories")).toEqual("custom"); | ||
expect(formData.get("territories_custom_type")).toEqual("whitelist"); | ||
expect(formData.get("blacklist_countries")).toEqual(""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Inclusive naming check] reported by reviewdog 🐶
[warning] blacklist
may be insensitive, use denylist
, blocklist
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Done
Added tests for publisher utils
How to QA
All tests should pass (the inclusive naming check will fail)
Testing
Issue / Card
Fixes https://warthogs.atlassian.net/browse/WD-18400