Add more integration test instrumentation for Query Builder test. Increase screen test resolution.
parent
18fc364f9c
commit
bf040bacce
|
@ -12,6 +12,8 @@
|
|||
"port": 80
|
||||
},
|
||||
|
||||
"live_output" : true,
|
||||
|
||||
"test_settings": {
|
||||
"default": {
|
||||
"selenium_port": 80,
|
||||
|
@ -28,7 +30,7 @@
|
|||
"browserstack.key": "${BROWSERSTACK_KEY}",
|
||||
"browserstack.debug": true,
|
||||
"browserstack.local": true,
|
||||
"resolution": "1024x768"
|
||||
"resolution": "1280x1024"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@ const FieldListItem = React.createClass({
|
|||
'btn-primary': fieldFunc.funcs.length,
|
||||
})}
|
||||
onClick={this.toggleFunctionsMenu}
|
||||
data-test={`query-builder-list-item-function-${fieldText}`}
|
||||
>
|
||||
{fieldFuncsLabel}
|
||||
</div>
|
||||
|
|
|
@ -11,6 +11,7 @@ const VisHeader = ({views, view, onToggleView, name}) =>
|
|||
key={v}
|
||||
onClick={() => onToggleView(v)}
|
||||
className={classnames({active: view === v})}
|
||||
data-test={`data-${v}`}
|
||||
>
|
||||
{_.upperFirst(v)}
|
||||
</li>
|
||||
|
|
|
@ -74,6 +74,7 @@ class FunctionSelector extends Component {
|
|||
<div
|
||||
className="btn btn-xs btn-success"
|
||||
onClick={this.handleApplyFunctions}
|
||||
data-test="function-selector-apply"
|
||||
>
|
||||
Apply
|
||||
</div>
|
||||
|
@ -90,6 +91,7 @@ class FunctionSelector extends Component {
|
|||
f,
|
||||
singleSelect ? this.onSingleSelect : this.onSelect
|
||||
)}
|
||||
data-test={`function-selector-item-${f}`}
|
||||
>
|
||||
{f}
|
||||
</div>
|
||||
|
|
|
@ -80,6 +80,7 @@ module.exports = {
|
|||
)
|
||||
.click(dataTest('query-builder-list-item-tag-test_measurement'))
|
||||
.click(dataTest('query-builder-list-item-tag-test_measurement2'))
|
||||
.pause(500)
|
||||
// Select both tag values
|
||||
.waitForElementVisible(
|
||||
dataTest('query-builder-list-item-tag-value-1'),
|
||||
|
@ -87,6 +88,7 @@ module.exports = {
|
|||
)
|
||||
.click(dataTest('query-builder-list-item-tag-value-1'))
|
||||
.click(dataTest('query-builder-list-item-tag-value-2'))
|
||||
.pause(500)
|
||||
// Select both field values
|
||||
.waitForElementVisible(
|
||||
dataTest('query-builder-list-item-field-value'),
|
||||
|
@ -94,11 +96,17 @@ module.exports = {
|
|||
)
|
||||
.click(dataTest('query-builder-list-item-field-value'))
|
||||
.click(dataTest('query-builder-list-item-field-value2'))
|
||||
.pause(500)
|
||||
// Assert the built query string
|
||||
.assert.containsText(
|
||||
dataTest('query-editor-field'),
|
||||
'SELECT mean("value") AS "mean_value", mean("value2") AS "mean_value2" FROM "testing"."autogen"."testing" WHERE time > now() - 1h AND "test_measurement"=\'1\' AND "test_measurement2"=\'2\' GROUP BY time(10s)'
|
||||
)
|
||||
.click(dataTest('data-table'))
|
||||
.click(dataTest('query-builder-list-item-function-value'))
|
||||
.waitForElementVisible(dataTest('function-selector-item-mean'), 1000)
|
||||
.click(dataTest('function-selector-item-mean'))
|
||||
.click(dataTest('function-selector-apply'))
|
||||
.end()
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue