Leave unrelated chat files as main formats them
This commit is contained in:
@@ -76,36 +76,34 @@ void main() {
|
||||
expect(_opacity(tester), 1);
|
||||
});
|
||||
|
||||
testWidgets(
|
||||
'desktop shows it on hover and focus, and keeps semantics',
|
||||
(tester) async {
|
||||
final semantics = tester.ensureSemantics();
|
||||
await tester.pumpWidget(_host(48));
|
||||
expect(_opacity(tester), 0);
|
||||
// Hidden, it is still reachable by a screen reader.
|
||||
expect(
|
||||
tester.getSemantics(_copy),
|
||||
isSemantics(tooltip: 'Copy', isButton: true, isFocusable: true),
|
||||
);
|
||||
testWidgets('desktop shows it on hover and focus, and keeps semantics', (
|
||||
tester,
|
||||
) async {
|
||||
final semantics = tester.ensureSemantics();
|
||||
await tester.pumpWidget(_host(48));
|
||||
expect(_opacity(tester), 0);
|
||||
// Hidden, it is still reachable by a screen reader.
|
||||
expect(
|
||||
tester.getSemantics(_copy),
|
||||
isSemantics(tooltip: 'Copy', isButton: true, isFocusable: true),
|
||||
);
|
||||
|
||||
final mouse = await tester.createGesture(kind: PointerDeviceKind.mouse);
|
||||
addTearDown(mouse.removePointer);
|
||||
await mouse.addPointer(location: Offset.zero);
|
||||
await mouse.moveTo(tester.getCenter(find.text('The answer text')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(_opacity(tester), 1);
|
||||
await mouse.moveTo(const Offset(5, 590));
|
||||
await tester.pumpAndSettle();
|
||||
expect(_opacity(tester), 0);
|
||||
final mouse = await tester.createGesture(kind: PointerDeviceKind.mouse);
|
||||
addTearDown(mouse.removePointer);
|
||||
await mouse.addPointer(location: Offset.zero);
|
||||
await mouse.moveTo(tester.getCenter(find.text('The answer text')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(_opacity(tester), 1);
|
||||
await mouse.moveTo(const Offset(5, 590));
|
||||
await tester.pumpAndSettle();
|
||||
expect(_opacity(tester), 0);
|
||||
|
||||
// Keyboard focus reveals it too.
|
||||
await tester.sendKeyEvent(LogicalKeyboardKey.tab);
|
||||
await tester.pumpAndSettle();
|
||||
expect(_opacity(tester), 1);
|
||||
semantics.dispose();
|
||||
},
|
||||
variant: TargetPlatformVariant.only(TargetPlatform.macOS),
|
||||
);
|
||||
// Keyboard focus reveals it too.
|
||||
await tester.sendKeyEvent(LogicalKeyboardKey.tab);
|
||||
await tester.pumpAndSettle();
|
||||
expect(_opacity(tester), 1);
|
||||
semantics.dispose();
|
||||
}, variant: TargetPlatformVariant.only(TargetPlatform.macOS));
|
||||
|
||||
for (final (width, inGutter) in [(1400.0, true), (560.0, false)]) {
|
||||
testWidgets('a ${width.toInt()} px conversation puts Copy '
|
||||
|
||||
Reference in New Issue
Block a user