Merge branch 'main' into flutter/design-templates
This commit is contained in:
@@ -44,6 +44,33 @@ void main() {
|
||||
expect(factory.channels, isEmpty);
|
||||
});
|
||||
|
||||
testWidgets('long server URLs can wrap in a narrow settings viewport', (
|
||||
tester,
|
||||
) async {
|
||||
tester.view.physicalSize = const Size(390, 844);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
addTearDown(tester.view.resetPhysicalSize);
|
||||
addTearDown(tester.view.resetDevicePixelRatio);
|
||||
|
||||
final client = transport.PipelinesClient(
|
||||
channelFactory: FakeChannelFactory().call,
|
||||
);
|
||||
addTearDown(client.dispose);
|
||||
await _pump(
|
||||
tester,
|
||||
client,
|
||||
store: MemorySettingsStore(
|
||||
serverUrl:
|
||||
'wss://a-very-long-server-hostname-that-exceeds-a-mobile-field.test:8123/connect',
|
||||
),
|
||||
);
|
||||
|
||||
final field = tester.widget<TextField>(find.byType(TextField).first);
|
||||
expect(field.maxLines, 2);
|
||||
expect(field.controller?.text, contains('/connect'));
|
||||
expect(tester.takeException(), isNull);
|
||||
});
|
||||
|
||||
testWidgets('an invalid URL shows the field error and opens no socket', (
|
||||
tester,
|
||||
) async {
|
||||
|
||||
Reference in New Issue
Block a user