-
Notifications
You must be signed in to change notification settings - Fork 0
Reactor/user generated content #88
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
c30043a
fix(engagement): make reaction or comment optional but not both
fulleni 9f5a3f7
test: enhance engagement fixtures with varied reaction/comment combin…
fulleni 68a560d
build(serialization): sync
fulleni 0ceec9b
fix(engagement): handle comment-only and reaction-only engagements
fulleni d7e04bc
feat(enums): add positive interaction type enum
fulleni bedf379
chore: barrels
fulleni dddbfaf
refactor(remote_configs): update app review configuration
fulleni ac6a512
feat(app_review): enhance eligibility criteria for app review prompt
fulleni 211a251
build(serialization): sync
fulleni 3ab9876
test(core): add PositiveInteractionType enum tests
fulleni db79e9a
test(app_review_config): update tests for eligiblePositiveInteractions
fulleni 5a80b0d
style: format
fulleni 2ac9d91
fix(enums): correct reportable entity value for comments
fulleni a47704b
test(enums): correct ReportableEntity tests
fulleni d015e7d
fix(fixtures): change report entity type to comment
fulleni 713e242
build(serialziation): sync
fulleni dc18e93
chore: delete absolete file
fulleni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import 'package:json_annotation/json_annotation.dart'; | ||
|
|
||
| /// {@template positive_interaction_type} | ||
| /// Defines the abstract types of user actions that can be considered positive | ||
| /// interactions, potentially contributing to triggering events like the | ||
| /// in-app review prompt. | ||
| /// {@endtemplate} | ||
| @JsonEnum() | ||
| enum PositiveInteractionType { | ||
| /// The user saved a content item (e.g., a headline). | ||
| @JsonValue('saveItem') | ||
| saveItem, | ||
|
|
||
| /// The user followed an entity (e.g., a topic, source, or country). | ||
| @JsonValue('followItem') | ||
| followItem, | ||
|
|
||
| /// The user shared a content item (e.g., a headline). | ||
| @JsonValue('shareContent') | ||
| shareContent, | ||
|
|
||
| /// The user created a saved filter. | ||
| @JsonValue('saveFilter') | ||
| saveFilter, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| import 'package:core/src/enums/positive_interaction_type.dart'; | ||
| import 'package:test/test.dart'; | ||
|
|
||
| void main() { | ||
| group('PositiveInteractionType', () { | ||
| test('has correct number of values', () { | ||
| expect(PositiveInteractionType.values.length, 4); | ||
| }); | ||
|
|
||
| group('serialization', () { | ||
| test('uses correct string values for json serialization', () { | ||
| // This test verifies that the enum's string representation, | ||
| // which is used by json_serializable, matches the expected value. | ||
| expect(PositiveInteractionType.saveItem.name, 'saveItem'); | ||
| expect(PositiveInteractionType.followItem.name, 'followItem'); | ||
| expect(PositiveInteractionType.shareContent.name, 'shareContent'); | ||
| expect(PositiveInteractionType.saveFilter.name, 'saveFilter'); | ||
| }); | ||
|
|
||
| test('can be created from string value for json deserialization', () { | ||
| // This test verifies that the enum can be created from its | ||
| // string representation, mimicking json_serializable's behavior. | ||
| expect( | ||
| PositiveInteractionType.values.byName('saveItem'), | ||
| PositiveInteractionType.saveItem, | ||
| ); | ||
| expect( | ||
| PositiveInteractionType.values.byName('followItem'), | ||
| PositiveInteractionType.followItem, | ||
| ); | ||
| expect( | ||
| PositiveInteractionType.values.byName('shareContent'), | ||
| PositiveInteractionType.shareContent, | ||
| ); | ||
| expect( | ||
| PositiveInteractionType.values.byName('saveFilter'), | ||
| PositiveInteractionType.saveFilter, | ||
| ); | ||
| }); | ||
|
|
||
| test('throws ArgumentError for invalid string value', () { | ||
| expect( | ||
| () => PositiveInteractionType.values.byName('invalid_interaction'), | ||
| throwsA(isA<ArgumentError>()), | ||
| ); | ||
| }); | ||
| }); | ||
| }); | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.