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

@ -13,8 +13,8 @@ describe('ng-dart1.x naive infinite scroll benchmark', function () {
url: URL,
id: 'ng1-dart1.x.naive_infinite_scroll',
work: function() {
element(by.deepCss('#reset-btn')).click();
element(by.deepCss('#run-btn')).click();
$('#reset-btn').click();
$('#run-btn').click();
var s = 1000;
if (appSize > 4) {
s = s + appSize * 100;

View File

@ -11,10 +11,6 @@ import 'package:angular2/src/test_lib/benchmark_util.dart';
<div>
<div style="display: flex">
<scroll-area scroll-top="scrollTop"></scroll-area>
<div style="padding-left: 20px">
<button id='run-btn'>Run</button>
<button id='reset-btn'>Reset</button>
</div>
</div>
<div ng-if="scrollAreas.length > 0">
<p>Following tables are only here to add weight to the UI:</p>
@ -39,10 +35,10 @@ class App implements ShadowRootAware {
@override
void onShadowRoot(ShadowRoot shadowRoot) {
bindAction('scroll-app /deep/ #run-btn', () {
bindAction('#run-btn', () {
runBenchmark();
});
bindAction('scroll-app /deep/ #reset-btn', () {
bindAction('#reset-btn', () {
scrollTop = 0;
});
}

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$