test: fix update_test_style_by_command_x_handler_test

This commit is contained in:
Lucas.Xu 2022-08-15 19:09:53 +08:00
parent ab1032139a
commit de01e9222e
2 changed files with 6 additions and 3 deletions

View File

@ -112,6 +112,9 @@ extension on LogicalKeyboardKey {
if (this == LogicalKeyboardKey.keyU) {
return PhysicalKeyboardKey.keyU;
}
if (this == LogicalKeyboardKey.keyZ) {
return PhysicalKeyboardKey.keyZ;
}
throw UnimplementedError();
}
}

View File

@ -22,7 +22,7 @@ void main() async {
testWidgets('Presses Command + I to update text style', (tester) async {
await _testUpdateTextStyleByCommandX(
tester,
StyleKey.bold,
StyleKey.italic,
LogicalKeyboardKey.keyI,
);
});
@ -30,7 +30,7 @@ void main() async {
testWidgets('Presses Command + U to update text style', (tester) async {
await _testUpdateTextStyleByCommandX(
tester,
StyleKey.bold,
StyleKey.underline,
LogicalKeyboardKey.keyU,
);
});
@ -38,7 +38,7 @@ void main() async {
testWidgets('Presses Command + S to update text style', (tester) async {
await _testUpdateTextStyleByCommandX(
tester,
StyleKey.bold,
StyleKey.strikethrough,
LogicalKeyboardKey.keyS,
);
});