cthulhu/test/keystrokes/gnome-clocks/timer_flat_review.py
2024-12-18 10:05:44 -05:00

117 lines
4.3 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env python3
#
# Copyright (c) 2024 Stormux
# Copyright (c) 2010-2012 The Orca Team
# Copyright (c) 2012 Igalia, S.L.
# Copyright (c) 2005-2010 Sun Microsystems Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., Franklin Street, Fifth Floor,
# Boston MA 02110-1301 USA.
#
# Fork of Orca Screen Reader (GNOME)
# Original source: https://gitlab.gnome.org/GNOME/orca
from macaroon.playback import *
import utils
sequence = MacroSequence()
sequence.append(PauseAction(3000))
sequence.append(KeyComboAction("F10"))
sequence.append(KeyComboAction("Tab"))
sequence.append(KeyComboAction("Tab"))
sequence.append(KeyComboAction("Tab"))
sequence.append(KeyComboAction("Tab"))
sequence.append(KeyComboAction("space"))
sequence.append(PauseAction(3000))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_8"))
sequence.append(utils.AssertPresentationAction(
"1. Review current line",
["BRAILLE LINE: 'Start $l'",
" VISIBLE: 'Start $l', cursor=1",
"SPEECH OUTPUT: 'Start'"]))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("space"))
sequence.append(utils.AssertPresentationAction(
"2. Activate timer",
["BRAILLE LINE: 'gnome-clocks application Clocks frame Pause push button'",
" VISIBLE: 'Pause push button', cursor=1",
"BRAILLE LINE: 'gnome-clocks application Clocks frame Pause push button'",
" VISIBLE: 'Pause push button', cursor=1",
"SPEECH OUTPUT: 'Clocks frame'",
"SPEECH OUTPUT: 'Pause push button'"]))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_8"))
sequence.append(utils.AssertPresentationAction(
"3. Review current line",
["BRAILLE LINE: 'Pause Reset $l'",
" VISIBLE: 'Pause Reset $l', cursor=1",
"SPEECH OUTPUT: 'Pause Reset'"]))
sequence.append(PauseAction(5000))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_7"))
sequence.append(utils.AssertPresentationAction(
"4. Review previous line",
["BRAILLE LINE: '00 04 5[0-9] \\$l'",
" VISIBLE: '00 04 5[0-9] \\$l', cursor=1",
"SPEECH OUTPUT: '00 04 5[0-9]'"]))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_7"))
sequence.append(utils.AssertPresentationAction(
"5. Review previous line",
["BRAILLE LINE: '& y World & y Alarm & y Stopwatch &=y Timer $l'",
" VISIBLE: '& y World & y Alarm & y Stopwatc', cursor=1",
"SPEECH OUTPUT: 'not selected World not selected Alarm not selected Stopwatch selected Timer'"]))
sequence.append(PauseAction(5000))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_9"))
sequence.append(utils.AssertPresentationAction(
"6. Review next line",
["BRAILLE LINE: '00 04 4[0-9] \\$l'",
" VISIBLE: '00 04 4[0-9] \\$l', cursor=1",
"SPEECH OUTPUT: '00 04 4[0-9]'"]))
sequence.append(PauseAction(5000))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_8"))
sequence.append(utils.AssertPresentationAction(
"7. Review current line",
["BRAILLE LINE: '00 04 3[0-9] \\$l'",
" VISIBLE: '00 04 3[0-9] \\$l', cursor=1",
"SPEECH OUTPUT: '00 04 3[0-9]'"]))
sequence.append(PauseAction(5000))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_8"))
sequence.append(utils.AssertPresentationAction(
"8. Review current line",
["BRAILLE LINE: '00 04 2[0-9] \\$l'",
" VISIBLE: '00 04 2[0-9] \\$l', cursor=1",
"SPEECH OUTPUT: '00 04 2[0-9]'"]))
sequence.append(utils.AssertionSummaryAction())
sequence.start()