-
Notifications
You must be signed in to change notification settings - Fork 58
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
UIP-2751 Transition in/out-specific config, test attributes #120
UIP-2751 Transition in/out-specific config, test attributes #120
Conversation
RavenNumber of Findings: 0 |
Codecov Report
@@ Coverage Diff @@
## master #120 +/- ##
==========================================
+ Coverage 94.39% 94.42% +0.04%
==========================================
Files 31 31
Lines 1549 1559 +10
==========================================
+ Hits 1462 1472 +10
Misses 87 87 |
|
||
if (props.transitionCount == 0) { | ||
warningMessage += ' Instead of setting this prop to 0, override the `hasTransition` getter to return false.'; | ||
} |
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 no longer necessary; transition counts that are <=0
are accounted for in hasTransitionIn
and hasTransitionOut
, and behave as if there is no transition (see tests).
Map<String, String> getTransitionTestAttributes() { | ||
if (!component_base.UiProps.testMode) return const {}; | ||
|
||
const enumToAttrValue = const <TransitionPhase, String>{ |
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.
Noobie question - what is the attribute text for the "TransitionPhase"? I assume this is the attribute I'll have to search for in my functional tests when checking if the modal dialog has finished animating.
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.
@seangerhardt-wf the HTML will look like this based on the current transition phase (only listing the ones you'd probably be interested in for functional test purposes):
TransitionPhase.SHOWN
<div data-transition-phase="shown"><!-- ... -->
TransitionPhase.HIDDEN
<div data-transition-phase="hidden"><!-- ... -->
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.
One question / suggestion @greglittlefield-wf - otherwise looks great.
}; | ||
|
||
return { | ||
'data-transition-phase': enumToAttrValue[state.transitionPhase], |
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.
@greglittlefield-wf should we store data-transition-phase
as a constant sorta like we do for the test id attribute?
+1 |
+1 |
Necessary to support existing consumers who don’t properly add inherited default props.
+1 |
QA +10
Merging. |
Ultimate problem:
How it was fixed:
transitionInCount
/transitionOutCount
props and updateAbstractTransitionComponent
to support themAbstractTransitionComponent.getTransitionTestAttributes
for use in consumer implementationsTesting suggestions:
Potential areas of regression: