Complete prompt presets, body-priority panes and clearer chat and stage layouts
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pipelines_app/features/pipelines/widgets/pipeline_scope_control.dart';
|
||||
|
||||
void main() {
|
||||
for (final cupertino in [false, true]) {
|
||||
for (final width in [120.0, 500.0]) {
|
||||
testWidgets(
|
||||
'native scope remains usable at $width, Cupertino=$cupertino',
|
||||
(tester) async {
|
||||
var scheduled = false;
|
||||
final control = StatefulBuilder(
|
||||
builder: (context, setState) => Center(
|
||||
child: SizedBox(
|
||||
width: width,
|
||||
child: PipelineScopeControl(
|
||||
scheduled: scheduled,
|
||||
onSelected: (value) => setState(() => scheduled = value),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
await tester.pumpWidget(
|
||||
cupertino
|
||||
? CupertinoApp(home: CupertinoPageScaffold(child: control))
|
||||
: MaterialApp(home: Scaffold(body: control)),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
if (width == 120) {
|
||||
await tester.tap(find.byKey(const Key('pipeline-scope')));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Scheduled').last);
|
||||
} else {
|
||||
await tester.tap(find.text('Scheduled'));
|
||||
}
|
||||
await tester.pumpAndSettle();
|
||||
expect(scheduled, isTrue);
|
||||
expect(tester.takeException(), isNull);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user