Commit 50532f38 authored by Jacek Marchwicki's avatar Jacek Marchwicki Committed by Flutter GitHub Bot

[Driver] correct type for getWidgetDiagnostics (#45985)

parent 4484ae40
......@@ -619,7 +619,7 @@ class FlutterDriver {
}) async {
return _sendCommand(GetDiagnosticsTree(
finder,
DiagnosticsType.renderObject,
DiagnosticsType.widget,
subtreeDepth: subtreeDepth,
includeProperties: includeProperties,
timeout: timeout,
......
......@@ -250,6 +250,42 @@ void main() {
});
});
group('getWidgetDiagnostics', () {
test('sends the getWidgetDiagnostics command', () async {
when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) {
expect(i.positionalArguments[1], <String, dynamic>{
'command': 'get_diagnostics_tree',
'diagnosticsType': 'widget',
'finderType': 'ByTooltipMessage',
'text': 'foo',
'includeProperties': 'true',
'subtreeDepth': '0',
'timeout': _kSerializedTestTimeout,
});
return makeMockResponse(<String, dynamic>{});
});
await driver.getWidgetDiagnostics(find.byTooltip('foo'), timeout: _kTestTimeout);
});
});
group('getRenderObjectDiagnostics', () {
test('sends the getRenderObjectDiagnostics command', () async {
when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) {
expect(i.positionalArguments[1], <String, dynamic>{
'command': 'get_diagnostics_tree',
'diagnosticsType': 'renderObject',
'finderType': 'ByTooltipMessage',
'text': 'foo',
'includeProperties': 'true',
'subtreeDepth': '0',
'timeout': _kSerializedTestTimeout,
});
return makeMockResponse(<String, dynamic>{});
});
await driver.getRenderObjectDiagnostics(find.byTooltip('foo'), timeout: _kTestTimeout);
});
});
group('waitForCondition', () {
test('sends the wait for NoPendingFrameCondition command', () async {
when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) {
......
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