-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
adding data-test-subj to buttons and updating snapshots #20080
adding data-test-subj to buttons and updating snapshots #20080
Conversation
💚 Build Succeeded |
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 only reviewed the code; I didn't run this locally. I had one suggestion for making maintenance easier but otherwise this LGTM!
@@ -24,19 +24,19 @@ export class LicenseStatus extends React.PureComponent { | |||
if (isExpired) { | |||
icon = <EuiIcon color="danger" type="alert" />; | |||
message = ( | |||
<span> | |||
<span data-test-subj="licenseSubText"> |
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.
It might make maintenance easier if we dedupe these three span
elements by changing them to Fragments like this:
if (isExpired) {
icon = <EuiIcon color="danger" type="alert" />;
message = (
<Fragment>
Your license expired on <strong>{expiryDate}</strong>
</Fragment>
);
title = `Your ${type} license has expired`;
} else {
icon = <EuiIcon color="success" type="checkInCircleFilled" />;
message = expiryDate ? (
<Fragment>
Your license will expire on <strong>{expiryDate}</strong>
</Fragment>
) : (
<Fragment>
Your license will never expire.
</Fragment>
);
title = `Your ${type} license is ${status.toLowerCase()}`;
}
And then instantiate the span itself on line 70 like this:
<EuiText color="subdued">
<span data-test-subj="licenseSubText">
{message}
</span>
</EuiText>
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.
Code LGTM
Don't forget version labels 🙂 |
Thx @jen-huang done. Wish this would happen in some automated fashion -- I will always forget to do this. |
💔 Build Failed |
* adding data-test-subj to buttons and updating snapshots * PR feedback * updating snapshots
* adding data-test-subj to buttons and updating snapshots * PR feedback * updating snapshots
Closes #19968. Adding data-test-subj attributes to support functional tests.