-
Notifications
You must be signed in to change notification settings - Fork 78
Conversation
beforeEach(() => { | ||
;(useTracking as jest.Mock).mockImplementation(() => { | ||
return { | ||
trackEvent, | ||
} | ||
}) | ||
}) | ||
afterEach(() => { | ||
jest.clearAllMocks() | ||
}) |
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.
moved equivalent code to setupJest.ts
const values = Object.keys(Schema.ActionNames).map(k => Schema.ActionNames[k as any]) | ||
values.map(name => expect(name[0] === name[0].toLowerCase()).toBeTruthy()) | ||
}) | ||
}) |
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.
this test broke but it's only enforcing an old convention that we broke here to maintain compatibility with eigen's analytics schema.
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.
(so i just deleted it)
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.
Awesome! Thanks David 🙇
@@ -67,6 +68,7 @@ export const Input = React.forwardRef<TextInput, InputProps & TextInputProps>( | |||
input.current.clear() | |||
setValue("") | |||
rest.onChangeText?.("") | |||
rest.onClear?.() |
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.
Oh neat! The equivalent syntax on Swift would be rest.onClear?()
. I'll have to adjust my internal code parser 😛
left a few comments here https://artsyproduct.atlassian.net/browse/MX-150 -- will be easier to give more specific schema when i can play around with the new experience in the beta -- if i am not mistaken it's not yet in it, is it? |
That’s right – should be in the next beta! |
🚀 PR was released in v1.21.10 🚀 |
https://artsyproduct.atlassian.net/browse/MX-150
This copies the previous behaviour, except we no longer have a "search screen closed" event because it's a tab now.
Worth noting that there are new subtleties which are not yet being taken into account (e.g. tapping on recent searches vs current search results). We can follow up with @anipetrov on how that should be represented.