-
Notifications
You must be signed in to change notification settings - Fork 734
Infra/picker testing coverage #3107
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
Conversation
expect(onDismiss).toHaveBeenCalledTimes(2); // TODO: this should be 1 | ||
}); | ||
|
||
// TODO: this test is not passing yet |
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.
When should this start working?
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.
The issue here is that the onShow
function is triggered only when the modal is fully open.
Iv'e tried to use act
and waitFor
didn't help.
I'll change the TODO
comment to fix this test in the future, WDYT ?
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.
Doesn't matter IMO
// describe.skip('WheelPicker', () => { | ||
// }); | ||
|
||
//TODO: add more tests for different props | ||
describe('Picker field types', () => { |
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.
These are failing
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.
fixed, bad merging from master after merging the new useFieldType
hook.
const getStyle = () => { | ||
return StyleSheet.flatten(driver.getElement().props.style) as TextStyle; | ||
}; |
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.
I don't think you're using this anymore, do we want to keep this change?
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.
@adids1221 Are you sure you've pushed your changed?
expect(onDismiss).toHaveBeenCalledTimes(2); // TODO: this should be 1 | ||
}); | ||
|
||
// TODO: this test is not passing yet |
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.
Doesn't matter IMO
const label = screen.getByTestId(`${testID}.settings.type.label`); | ||
const placeholder = screen.getByTestId(`${testID}.settings.type.placeholder`); | ||
expect(label).toBeTruthy(); | ||
expect(placeholder).toBeTruthy(); | ||
expect(label.props.children).toEqual(undefined); | ||
expect(placeholder.props.children).toEqual(placeholderText); |
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.
Ideally the driver will return the label text and the placeholder text, please fix or add a ticket
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.
Ticket MADS-4318
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.
Approved, please see the last note about the driver
Description
Picker testing coverage.
Testing picker modes (modal and dialog) - currently there is an issue with WheelPicker testing.
Testing picker field types by style.
Search functionality testing have the same issue as the WheelPicker.
Changelog
Picker testing coverage
Additional info
MADS-4181