-
Notifications
You must be signed in to change notification settings - Fork 734
new button driver, image driver, testing #2894
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
const isLabelExist = () => { | ||
return labelDriver.exists(); | ||
}; | ||
|
||
const getIconElement = () => { | ||
return iconDriver.getElement(); | ||
}; | ||
|
||
const isIconExist = () => { | ||
return iconDriver.exists(); | ||
}; |
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 convention is to:
const getLabel = () => {
return labelDriver;
};
...
Or in case you have a logic change:
const getLabel = () => {
const exists = (): boolean => {
// New logic
};
return {...labelDriver, exists};
};
...
@@ -0,0 +1,33 @@ | |||
import {ButtonProps} from './ButtonTypes'; |
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 props should be exported from the component IMO
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.
Ethan commented on my PR that it should be from the types, not sure why it's named ButtonTypes
and not types
but it's not related to this PR
const getLabel = () => { | ||
const exists = (): boolean => { | ||
return labelDriver.exists(); | ||
}; | ||
|
||
return {...labelDriver, exists}; | ||
}; |
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.
const getLabel = () => { | |
const exists = (): boolean => { | |
return labelDriver.exists(); | |
}; | |
return {...labelDriver, exists}; | |
}; | |
const getLabel = () => { | |
return labelDriver; | |
}; |
Description
Button - create new driver and refactor tests to it
Changelog
Button - create new driver and refactor tests to it
Additional info