Update comments for chip tests (#97476)
This commit is contained in:
parent
729f8c83d2
commit
0277a46b80
@ -3504,8 +3504,8 @@ void main() {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Tap at the delete icon of the chip, which is at the right
|
// Tap at the delete icon of the chip, which is at the right side of the
|
||||||
// side of the chip
|
// chip
|
||||||
final Offset topRightOfInkwell = tester.getTopLeft(find.byType(InkWell).first);
|
final Offset topRightOfInkwell = tester.getTopLeft(find.byType(InkWell).first);
|
||||||
final Offset tapLocationOfDeleteButton = topRightOfInkwell + const Offset(8, 8);
|
final Offset tapLocationOfDeleteButton = topRightOfInkwell + const Offset(8, 8);
|
||||||
final TestGesture tapGesture = await tester.startGesture(tapLocationOfDeleteButton);
|
final TestGesture tapGesture = await tester.startGesture(tapLocationOfDeleteButton);
|
||||||
@ -3515,7 +3515,7 @@ void main() {
|
|||||||
// Wait for some more time while pressing and holding the delete button
|
// Wait for some more time while pressing and holding the delete button
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
|
|
||||||
// There should be no tooltip
|
// There should be no delete button tooltip
|
||||||
expect(findTooltipContainer('Delete'), findsNothing);
|
expect(findTooltipContainer('Delete'), findsNothing);
|
||||||
|
|
||||||
await tapGesture.up();
|
await tapGesture.up();
|
||||||
@ -3557,8 +3557,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Tap at the delete icon of the chip, which is at the right
|
// Hover over the delete icon of the chip
|
||||||
// side of the chip
|
|
||||||
final Offset centerOfDeleteButton = tester.getCenter(find.byKey(deleteButtonKey));
|
final Offset centerOfDeleteButton = tester.getCenter(find.byKey(deleteButtonKey));
|
||||||
final TestGesture hoverGesture = await tester.createGesture(kind: PointerDeviceKind.mouse);
|
final TestGesture hoverGesture = await tester.createGesture(kind: PointerDeviceKind.mouse);
|
||||||
await hoverGesture.moveTo(centerOfDeleteButton);
|
await hoverGesture.moveTo(centerOfDeleteButton);
|
||||||
@ -3566,10 +3565,10 @@ void main() {
|
|||||||
|
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
|
|
||||||
// Wait for some more time while pressing and holding the delete button
|
// Wait for some more time while hovering over the delete button
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
|
|
||||||
// There should be no delete tooltip
|
// There should be no delete button tooltip
|
||||||
expect(findTooltipContainer(''), findsNothing);
|
expect(findTooltipContainer(''), findsNothing);
|
||||||
// There should be a chip tooltip, however.
|
// There should be a chip tooltip, however.
|
||||||
expect(findTooltipContainer('Chip Tooltip'), findsOneWidget);
|
expect(findTooltipContainer('Chip Tooltip'), findsOneWidget);
|
||||||
@ -3585,8 +3584,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Hover over the delete icon of the chip, which is at the right side of the
|
// Hover over the delete icon of the chip
|
||||||
// chip
|
|
||||||
final Offset centerOfDeleteButton = tester.getCenter(find.byKey(deleteButtonKey));
|
final Offset centerOfDeleteButton = tester.getCenter(find.byKey(deleteButtonKey));
|
||||||
final TestGesture hoverGesture = await tester.createGesture(kind: PointerDeviceKind.mouse);
|
final TestGesture hoverGesture = await tester.createGesture(kind: PointerDeviceKind.mouse);
|
||||||
await hoverGesture.moveTo(centerOfDeleteButton);
|
await hoverGesture.moveTo(centerOfDeleteButton);
|
||||||
@ -3594,12 +3592,12 @@ void main() {
|
|||||||
|
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
|
|
||||||
// Wait for some more time while pressing and holding the delete button
|
// Wait for some more time while hovering over the delete button
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
|
|
||||||
// There should not be a chip tooltip
|
// There should not be a chip tooltip
|
||||||
expect(findTooltipContainer('Chip Tooltip'), findsNothing);
|
expect(findTooltipContainer('Chip Tooltip'), findsNothing);
|
||||||
// There should be a delete tooltip
|
// There should be a delete button tooltip
|
||||||
expect(findTooltipContainer('Delete'), findsOneWidget);
|
expect(findTooltipContainer('Delete'), findsOneWidget);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user