feat(build): enforce mobile layout during e2e tests

This is important as we run our benchmarks on
mobile devices as web driver tests fails if buttons
are not visible / overlaid by other content.
This commit is contained in:
Tobias Bosch
2015-02-27 09:07:16 -08:00
parent 7e6f536cf5
commit 3b40052dc7
8 changed files with 53 additions and 41 deletions

View File

@ -23,11 +23,10 @@ export class App {
for (var i = 0; i < appSize; i++) {
ListWrapper.push(this.scrollAreas, i);
}
// TODO(tbosch): change to bindAction when it works in pub serve
DOM.on(DOM.query('scroll-app /deep/ #run-btn'), 'click', (_) => {
bindAction('#run-btn', () => {
this.runBenchmark();
});
DOM.on(DOM.query('scroll-app /deep/ #reset-btn'), 'click', (_) => {
bindAction('#reset-btn', () => {
this._getScrollDiv().scrollTop = 0;
var existingMarker = this._locateFinishedMarker();
if (isPresent(existingMarker)) {
@ -90,10 +89,6 @@ export function setupReflectorForApp() {
<div>
<div style="display: flex">
<scroll-area id="testArea"></scroll-area>
<div style="padding-left: 20px">
<button id="run-btn">Run</button>
<button id="reset-btn">Reset</button>
</div>
</div>
<div template="if scrollAreas.length > 0">
<p>Following tables are only here to add weight to the UI:</p>

View File

@ -9,6 +9,10 @@
Iteration count: <input type="text" name="iterationCount" value="1"></input><br>
Scroll increment: <input type="text" name="scrollIncrement" value="1"></input><br>
</form>
<div>
<button id="run-btn">Run</button>
<button id="reset-btn">Reset</button>
</div>
<scroll-app></scroll-app>
$SCRIPTS$