[ermine] Update e2e smoke test
Updates the smoke test for ermine after modular -> sfw transition.
The test previously assumed a base shell existed, which is not
true anymore.
This is still blocked on http://fxb/44506
Build: fx set workstation.x64 --args=flutter_driver_enabled=true
Test: fx run-e2e-tests experiences_ermine_session_shell_e2e_test
Change-Id: Ia8b91c233f27aa5862c78e7895b14a08a39fca41
diff --git a/tests/e2e/test/ermine_smoke_test.dart b/tests/e2e/test/ermine_smoke_test.dart
index e0096eb..f0e6967 100644
--- a/tests/e2e/test/ermine_smoke_test.dart
+++ b/tests/e2e/test/ermine_smoke_test.dart
@@ -27,59 +27,34 @@
connector = FlutterDriverConnector(sl4f);
await connector.initialize();
- // Check if base shell is running.
- final isolate = await connector.isolate('userpicker_base_shell');
+ // Check if ermine is running.
+ final isolate = await connector.isolate('ermine');
if (isolate == null) {
- fail('could not find userpicker_base_shell.');
+ fail('could not find ermine.');
}
- // Now connect to base shell.
- driver = await connector.driverForIsolate('userpicker_base_shell');
+ // Now connect to ermine.
+ driver = await connector.driverForIsolate('ermine');
if (driver == null) {
- fail('unable to connect to userpicker_base_shell.');
+ fail('unable to connect to ermine.');
}
});
tearDownAll(() async {
- await driver.close();
+ await driver?.close();
await connector.tearDown();
await sl4f.stopServer();
sl4f.close();
});
- test('Guest login to ermine', () async {
- // Get the center of the plus key.
- final plusButtonFinder = find.byValueKey('plus');
- var center = await centerFromFinder(driver, plusButtonFinder);
-
- final input = Input(sl4f);
- bool didTap = await input.tap(Point(center.x, center.y));
- expect(didTap, true);
-
- // The 'Guest' button should be visible, tap it.
- final guestButtonFinder = find.byValueKey('Guest');
- center = await centerFromFinder(driver, guestButtonFinder);
-
- didTap = await input.tap(Point(center.x, center.y));
- expect(didTap, true);
-
- // This should launch ermine.
- final ermineDriver = await connector.driverForIsolate('ermine');
- if (ermineDriver == null) {
- fail('Unable to launch ermine');
- }
- await ermineDriver.waitUntilNoTransientCallbacks();
+ test('Screen should not be black', () async {
+ await driver.waitUntilNoTransientCallbacks();
// Now take a screen shot and make sure it is not all black.
final scenic = Scenic(sl4f);
final image = await scenic.takeScreenshot();
bool isAllBlack = image.data.every((pixel) => pixel & 0x00ffffff == 0);
expect(isAllBlack, false);
-
- // Now log out of ermine.
- final logoutFinder = find.byValueKey('logout');
- await ermineDriver.tap(logoutFinder);
- await ermineDriver.close();
});
}