mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
* First, run the test suite in question 20s to see how flaky it is and if it can be semi reliably repro'ed * Use testSubjects instead of click by link test. * spaces in data-test-subj selectors messes this up * Passed sufficient number of times, remove extra test runs
This commit is contained in:
parent
25bf57af62
commit
7ef2bc3a79
5 changed files with 8 additions and 9 deletions
|
@ -184,6 +184,7 @@
|
|||
<tr
|
||||
ng-repeat="item in listingController.pageOfItems track by item.id"
|
||||
class="kuiTableRow"
|
||||
data-test-subj="dashboardListingRow"
|
||||
>
|
||||
<td class="kuiTableRowCell kuiTableRowCell--checkBox" ng-if="!listingController.hideWriteControls">
|
||||
<div class="kuiTableRowCell__liner">
|
||||
|
@ -202,7 +203,7 @@
|
|||
<div class="kuiTableRowCell__liner">
|
||||
<a
|
||||
class="kuiLink"
|
||||
data-test-subj="dashboardListingTitleLink"
|
||||
data-test-subj="dashboardListingTitleLink-{{item.title.split(' ').join('-')}}"
|
||||
ng-href="{{ listingController.getUrlForItem(item) }}"
|
||||
>
|
||||
{{ item.title }}
|
||||
|
|
|
@ -57,7 +57,7 @@ export default function ({ getService, getPageObjects }) {
|
|||
|
||||
it('Does not warn when you save an existing dashboard with the title it already has, and that title is a duplicate',
|
||||
async function () {
|
||||
await PageObjects.dashboard.clickDashboardByLinkText(dashboardName);
|
||||
await PageObjects.dashboard.selectDashboard(dashboardName);
|
||||
await PageObjects.header.isGlobalLoadingIndicatorHidden();
|
||||
await PageObjects.dashboard.clickEdit();
|
||||
await PageObjects.dashboard.saveDashboard(dashboardName);
|
||||
|
|
|
@ -35,7 +35,7 @@ export default function ({ getService, getPageObjects }) {
|
|||
|
||||
it('existing dashboard opens in view mode', async function () {
|
||||
await PageObjects.dashboard.gotoDashboardLandingPage();
|
||||
await PageObjects.dashboard.clickDashboardByLinkText(dashboardName);
|
||||
await PageObjects.dashboard.selectDashboard(dashboardName);
|
||||
const inViewMode = await PageObjects.dashboard.getIsInViewMode();
|
||||
|
||||
expect(inViewMode).to.equal(true);
|
||||
|
|
|
@ -3,7 +3,6 @@ export default function ({ getService, loadTestFile }) {
|
|||
|
||||
describe('dashboard app', function () {
|
||||
before(() => remote.setWindowSize(1200, 900));
|
||||
|
||||
loadTestFile(require.resolve('./_bwc_shared_urls'));
|
||||
loadTestFile(require.resolve('./_dashboard_queries'));
|
||||
loadTestFile(require.resolve('./_dashboard_grid'));
|
||||
|
|
|
@ -354,8 +354,8 @@ export function DashboardPageProvider({ getService, getPageObjects }) {
|
|||
});
|
||||
}
|
||||
|
||||
async clickDashboardByLinkText(dashName) {
|
||||
await find.clickByLinkText(dashName);
|
||||
async selectDashboard(dashName) {
|
||||
await testSubjects.click(`dashboardListingTitleLink-${dashName.split(' ').join('-')}`);
|
||||
}
|
||||
|
||||
async clearSearchValue() {
|
||||
|
@ -391,7 +391,7 @@ export function DashboardPageProvider({ getService, getPageObjects }) {
|
|||
}
|
||||
|
||||
async getCountOfDashboardsInListingTable() {
|
||||
const dashboardTitles = await testSubjects.findAll('dashboardListingTitleLink');
|
||||
const dashboardTitles = await testSubjects.findAll('dashboardListingRow');
|
||||
return dashboardTitles.length;
|
||||
}
|
||||
|
||||
|
@ -410,7 +410,7 @@ export function DashboardPageProvider({ getService, getPageObjects }) {
|
|||
|
||||
await retry.try(async () => {
|
||||
await this.searchForDashboardWithName(dashName);
|
||||
await this.clickDashboardByLinkText(dashName);
|
||||
await this.selectDashboard(dashName);
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
|
||||
const onDashboardLandingPage = await this.onDashboardLandingPage();
|
||||
|
@ -435,7 +435,6 @@ export function DashboardPageProvider({ getService, getPageObjects }) {
|
|||
return await testSubjects.findAll('dashboardPanel');
|
||||
}
|
||||
|
||||
|
||||
async getPanelDimensions() {
|
||||
const panels = await find.allByCssSelector('.react-grid-item'); // These are gridster-defined elements and classes
|
||||
async function getPanelDimensions(panel) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue