Skip to content

Commit

Permalink
Fix functional tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed May 4, 2017
1 parent 5cd2924 commit 4bafa03
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
</div>

<button
data-test-subj="visualizeAddYAxisButton"
aria-label="Add Y axis"
ng-click="addValueAxis()"
tooltip="Add Y axis"
Expand Down
1 change: 1 addition & 0 deletions src/core_plugins/kibana/public/dashboard/panel/panel.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<div class="panel panel-default" ng-class="{'panel--edit-mode': !isViewOnlyMode()}" ng-switch on="panel.type" ng-if="savedObj || error">
<div class="panel-heading">
<span
data-test-subj="dashboardPanelTitle"
class="panel-title"
aria-label="{{:: 'Visualization panel: ' + savedObj.title }}"
>
Expand Down
11 changes: 5 additions & 6 deletions test/functional/page_objects/dashboard_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,11 @@ export function DashboardPageProvider({ getService, getPageObjects }) {

getPanelTitles() {
log.debug('in getPanelTitles');
return getRemote()
.findAllByCssSelector('span.panel-title')
return testSubjects.findAll('dashboardPanelTitle')
.then(function (titleObjects) {

function getTitles(chart) {
return chart.getAttribute('title');
return chart.getVisibleText();
}

const getTitlePromises = titleObjects.map(getTitles);
Expand All @@ -286,7 +285,7 @@ export function DashboardPageProvider({ getService, getPageObjects }) {
getPanelSizeData() {
log.debug('in getPanelSizeData');
return getRemote()
.findAllByCssSelector('li.gs-w')
.findAllByCssSelector('li.gs-w') // These are gridster-defined elements and classes
.then(function (titleObjects) {

function getTitles(chart) {
Expand Down Expand Up @@ -318,9 +317,9 @@ export function DashboardPageProvider({ getService, getPageObjects }) {
});
})
.then(chart => {
return chart.findByCssSelector('span.panel-title')
return chart.findByCssSelector('[data-test-subj="dashboardPanelTitle"]')
.then(function (titleElement) {
return titleElement.getAttribute('title');
return titleElement.getVisibleText();
})
.then(theData => {
obj.title = theData;
Expand Down
5 changes: 2 additions & 3 deletions test/functional/services/point_series_vis.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export function PointSeriesVisProvider({ getService }) {
const remote = getService('remote');
const config = getService('config');
const testSubjects = getService('testSubjects');
const log = getService('log');

const defaultFindTimeout = config.get('timeouts.find');
Expand All @@ -21,9 +22,7 @@ export function PointSeriesVisProvider({ getService }) {
}

clickAddAxis() {
return remote
.setFindTimeout(defaultFindTimeout)
.findByCssSelector('button[aria-label="Add value axis"]')
return testSubjects.find('visualizeAddYAxisButton')
.click();
}

Expand Down
9 changes: 0 additions & 9 deletions ui_framework/dist/ui_framework.css
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,6 @@ body {
/* 2 */
font-size: 10px !important;
/* 2 */
-webkit-transition: background-color 0.1s linear;
transition: background-color 0.1s linear; }
.kuiCheckBox:before {
position: relative;
Expand All @@ -710,7 +709,6 @@ body {
font-size: 1em;
opacity: 0;
color: #FFF;
-webkit-transition: opacity 0.1s linear;
transition: opacity 0.1s linear; }
.kuiCheckBox:checked {
border-color: #328CAA;
Expand Down Expand Up @@ -783,7 +781,6 @@ body {
background-color: #ffffff;
border: 1px solid #DEDEDE;
border-radius: 4px;
-webkit-transition: border-color 0.1s linear;
transition: border-color 0.1s linear;
/**
* 1. Angular will add an ng-untouched class to an input if it hasn't been touched yet.
Expand Down Expand Up @@ -824,7 +821,6 @@ body {
background-color: #ffffff;
border: 1px solid #DEDEDE;
border-radius: 4px;
-webkit-transition: border-color 0.1s linear;
transition: border-color 0.1s linear;
/**
* 1. Angular will add an ng-untouched class to an input if it hasn't been touched yet.
Expand Down Expand Up @@ -892,7 +888,6 @@ body {
background-color: #ffffff;
border: 1px solid #DEDEDE;
border-radius: 4px;
-webkit-transition: border-color 0.1s linear;
transition: border-color 0.1s linear;
/**
* 1. Angular will add an ng-untouched class to an input if it hasn't been touched yet.
Expand Down Expand Up @@ -932,7 +927,6 @@ body {
background-color: #ffffff;
border: 1px solid #DEDEDE;
border-radius: 4px;
-webkit-transition: border-color 0.1s linear;
transition: border-color 0.1s linear;
/**
* 1. Angular will add an ng-untouched class to an input if it hasn't been touched yet.
Expand Down Expand Up @@ -1733,7 +1727,6 @@ body {
background-color: #ffffff;
border: 1px solid #DEDEDE;
border-radius: 4px;
-webkit-transition: border-color 0.1s linear;
transition: border-color 0.1s linear;
/**
* 1. Angular will add an ng-untouched class to an input if it hasn't been touched yet.
Expand Down Expand Up @@ -1815,7 +1808,6 @@ body {
background-color: #ffffff;
border: 1px solid #DEDEDE;
border-radius: 4px;
-webkit-transition: border-color 0.1s linear;
transition: border-color 0.1s linear;
/**
* 1. Angular will add an ng-untouched class to an input if it hasn't been touched yet.
Expand Down Expand Up @@ -2882,7 +2874,6 @@ body {
border: 1px solid #ffffff;
line-height: normal;
/* 1 */
-webkit-transition: border-color 0.1s linear;
transition: border-color 0.1s linear; }
.kuiToolBarSearchBox__input:focus {
outline: none;
Expand Down

0 comments on commit 4bafa03

Please sign in to comment.