Commit 99e343a2 authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Re-title, format iOS device tests (#10733)

parent 1bc54e06
...@@ -22,7 +22,7 @@ void main() { ...@@ -22,7 +22,7 @@ void main() {
final FakePlatform osx = new FakePlatform.fromPlatform(const LocalPlatform()); final FakePlatform osx = new FakePlatform.fromPlatform(const LocalPlatform());
osx.operatingSystem = 'macos'; osx.operatingSystem = 'macos';
group('test screenshot', () { group('screenshot', () {
MockProcessManager mockProcessManager; MockProcessManager mockProcessManager;
MockFile mockOutputFile; MockFile mockOutputFile;
IOSDevice iosDeviceUnderTest; IOSDevice iosDeviceUnderTest;
...@@ -32,9 +32,7 @@ void main() { ...@@ -32,9 +32,7 @@ void main() {
mockOutputFile = new MockFile(); mockOutputFile = new MockFile();
}); });
testUsingContext( testUsingContext('error if idevicescreenshot is not installed', () async {
'screenshot without ideviceinstaller error',
() async {
when(mockOutputFile.path).thenReturn(fs.path.join('some', 'test', 'path', 'image.png')); when(mockOutputFile.path).thenReturn(fs.path.join('some', 'test', 'path', 'image.png'));
// Let everything else return exit code 0 so process.dart doesn't crash. // Let everything else return exit code 0 so process.dart doesn't crash.
// The matcher order is important. // The matcher order is important.
...@@ -65,12 +63,9 @@ void main() { ...@@ -65,12 +63,9 @@ void main() {
overrides: <Type, Generator>{ overrides: <Type, Generator>{
ProcessManager: () => mockProcessManager, ProcessManager: () => mockProcessManager,
Platform: () => osx, Platform: () => osx,
} });
);
testUsingContext( testUsingContext('idevicescreenshot captures and returns screenshot', () async {
'screenshot with ideviceinstaller gets command',
() async {
when(mockOutputFile.path).thenReturn(fs.path.join('some', 'test', 'path', 'image.png')); when(mockOutputFile.path).thenReturn(fs.path.join('some', 'test', 'path', 'image.png'));
// Let everything else return exit code 0. // Let everything else return exit code 0.
// The matcher order is important. // The matcher order is important.
...@@ -99,8 +94,6 @@ void main() { ...@@ -99,8 +94,6 @@ void main() {
environment: null, environment: null,
workingDirectory: null workingDirectory: null
)); ));
}, }, overrides: <Type, Generator>{ProcessManager: () => mockProcessManager});
overrides: <Type, Generator>{ProcessManager: () => mockProcessManager}
);
}); });
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment