-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
[CharInv] Track words changed with find-and-replace #2955
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2955 +/- ##
==========================================
+ Coverage 72.84% 73.50% +0.65%
==========================================
Files 265 265
Lines 10217 10300 +83
Branches 1201 1213 +12
==========================================
+ Hits 7443 7571 +128
+ Misses 2418 2374 -44
+ Partials 356 355 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Reviewed 2 of 16 files at r2, 15 of 19 files at r3, 8 of 8 files at r4, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @imnasnainaec)
public/locales/en/translation.json
line 374 at r4 (raw file):
"noWordChanges": "No words changed by find-and-replace.", "wordChanges": "Words changed by find-and-replace:", "wordChangesWithStrings": "Words changed by find-and-replace ({{ val1 }} → {{ val2 }}):"
A little wordy. Why not just "Words changed"?
Code quote:
"noWordChanges": "No words changed by find-and-replace.",
"wordChanges": "Words changed by find-and-replace:",
"wordChangesWithStrings": "Words changed by find-and-replace ({{ val1 }} → {{ val2 }}):"
src/goals/CharacterInventory/Redux/tests/CharacterInventoryActions.test.tsx
line 230 at r4 (raw file):
mockGetFrontierWords.mockResolvedValue([]); await store.dispatch(findAndReplace("A", "a"));
I think this test would be more convincing if there was a word in the Frontier with no A
in it.
src/goals/CharacterInventory/tests/CharInvCompleted.test.tsx
line 110 at r4 (raw file):
root.findByProps({ id: CharInvCompletedId.TypographyNoWordChanges }) ).toThrow(); root.findByProps({ id: CharInvCompletedId.TypographyWordChanges });
Shouldn't there be an expect
after calling findByProps
? Am I missing something?
Code quote:
root.findByProps
src/goals/CharacterInventory/tests/CharInvCompleted.test.tsx
line 145 at r4 (raw file):
}); expect(root.findAllByType(CharChange)).toHaveLength(2); });
Why does passing a list of 3 character changes expects the length to be 3 but when a list of 6 is passed the expected value is 2?
Code quote:
it("doesn't render more than 3 char changes", async () => {
await renderCharInvChangesGoalList({
...defaultCharInvChanges,
charChanges: mockCharChanges,
});
expect(root.findAllByType(CharChange)).toHaveLength(2);
});
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.
Reviewable status: 16 of 22 files reviewed, 2 unresolved discussions (waiting on @jmgrady)
src/goals/CharacterInventory/tests/CharInvCompleted.test.tsx
line 110 at r4 (raw file):
Previously, jmgrady (Jim Grady) wrote…
Shouldn't there be an
expect
after callingfindByProps
? Am I missing something?
It will throw if it fails. I could add expect(() => ...).not.toThrow();
if you think that helps.
src/goals/CharacterInventory/tests/CharInvCompleted.test.tsx
line 145 at r4 (raw file):
Previously, jmgrady (Jim Grady) wrote…
Why does passing a list of 3 character changes expects the length to be 3 but when a list of 6 is passed the expected value is 2?
Clarifying comment added.
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.
Reviewed 6 of 6 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @imnasnainaec)
src/goals/CharacterInventory/tests/CharInvCompleted.test.tsx
line 110 at r4 (raw file):
Previously, imnasnainaec (D. Ror.) wrote…
It will throw if it fails. I could add
expect(() => ...).not.toThrow();
if you think that helps.
A comment could help but I am fine with that explanation.
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.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)
Follows #2964
Resolves #2333
Also, fixed a bug in #2962 that the CancelConfirmDialog gets stuck in loading after its first use.
This change is