-
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
Expand coverage of dashboard tests #17703
Expand coverage of dashboard tests #17703
Conversation
4d9c1c1
to
4703433
Compare
c03c37f
to
cc4122c
Compare
bc46a6a
to
6081dbd
Compare
99a7145
to
a8c6f25
Compare
💔 Build Failed |
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.
Dang. That's a lot of work. This looks great to me. I really like the helper classes you put together to consolodate common test functionality. I may steal a page from this book in my migrations testing!
@@ -10,6 +10,7 @@ exports[`DashboardPanel matches snapshot 1`] = ` | |||
> | |||
<div | |||
class="panel-heading" | |||
data-test-subj="dashboardPanelHeading-" |
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 looks like it's missing info after the -
was it supposed to have some value there, like the title? Probably not important.
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.
There isn't a title in the test data for this, but I can add it in so it tests that the title is there and that it doesn't look like a mistake.
async setCustomPanelTitle(customTitle, panel) { | ||
log.debug(`setCustomPanelTitle(${customTitle}, ${panel})`); | ||
await this.openPanelOptions(panel); | ||
/** |
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.
Honestly, this is the only place in this entire file that jsdoc comments are used. I'd personally get rid of them, and just add a descriptive //
comment if you think one is necessary. Buuuut that's maybe terrible advice.
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.
As we move towards typescript, these kinds of comments will become more prolific. This does look inconsistent, but if the function deserves a comment (I thought it did, originalTitle
doesn't obviously reflect that it's being used to find the panel to change, and that it's optional), I think it might as well be jsdoc vs //
. Appreciate the feedback, but I think I'll leave this one here.
/** | ||
* | ||
* @param field | ||
* @param operator |
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.
Same here. The comment block is fairly useless except for the inputType
clarification, 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.
Agree on this one, I'll remove. not to mention the variable name is wrong :).
💚 Build Succeeded |
c4c7d36
to
fd068b8
Compare
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 looks great. I really like how it breaks the functional tests into smaller files.
@@ -0,0 +1,14 @@ | |||
export function TimePickerProvider({ getService }) { |
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.
Looks like this is never used anywhere
async getFilterFieldIndexPatterns() { | ||
const indexPatterns = []; | ||
const groups = await find.allByCssSelector('.ui-select-choices-group-label'); | ||
console.log('found ' + groups.length + ' index pattern group labels'); |
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.
Should this use log server?
}); | ||
|
||
after(async function () { | ||
console.log('showing chrome again'); |
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.
Should this use log service?
fd068b8
to
26a7bdf
Compare
💔 Build Failed |
Failed on:
Filed #18682 Will rebase and test again. |
… migrating the data as we progress
26a7bdf
to
961e82c
Compare
💚 Build Succeeded |
* Expand coverage of dashboard tests and decrease time * Fix timing error when sub urls fail to save from too fast app link clicking * discover doesn't have breadcrumbs * Check top nav text so it works on both listing and saved object edit/view pages * need to do the add panel operations one at a time * Need both types of input in filter * Give test data a title * Remove incorrect and unnecessary comment * Move data around and get rid of 6_3 specific naming as we will end up migrating the data as we progress * Remove code accidentally checked in
* Expand coverage of dashboard tests and decrease time * Fix timing error when sub urls fail to save from too fast app link clicking * discover doesn't have breadcrumbs * Check top nav text so it works on both listing and saved object edit/view pages * need to do the add panel operations one at a time * Need both types of input in filter * Give test data a title * Remove incorrect and unnecessary comment * Move data around and get rid of 6_3 specific naming as we will end up migrating the data as we progress * Remove code accidentally checked in
* Expand coverage of dashboard tests and decrease time * Fix timing error when sub urls fail to save from too fast app link clicking * discover doesn't have breadcrumbs * Check top nav text so it works on both listing and saved object edit/view pages * need to do the add panel operations one at a time * Need both types of input in filter * Give test data a title * Remove incorrect and unnecessary comment * Move data around and get rid of 6_3 specific naming as we will end up migrating the data as we progress * Remove code accidentally checked in
I created new test data from the 6.x branch so it's correctly labeled as 6.3. I created new visualizations for every type we have so we don't have to spend time creating these visualizations during the tests. I'm also doing some ad hoc rendering/snapshot testing by checking on certain css classes. A bit fragile but not as fragile as the actual visual regression testing, and much faster.