[Driver] correct type for getWidgetDiagnostics (#45985)
This commit is contained in:
committed by
Flutter GitHub Bot
parent
4484ae4043
commit
50532f387a
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user