<commit_before># -*- coding: utf-8 -*-
#!/usr/bin/python

"""Test of entry output using Firefox.
"""

from macaroon.playback import *
import utils

sequence = MacroSequence()

########################################################################
# We wait for the focus to be on a blank Firefox window.
#
sequence.append(WaitForWindowActivate("Minefield",None))

########################################################################
# Open the "Bookmarks" menu, Down Arrow to Show All Bookmarks, then 
# press Return.
#
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Alt>b"))
sequence.append(utils.AssertPresentationAction(
    "Bookmarks menu",
    ["BRAILLE LINE:  'Minefield Application Minefield Frame ToolBar Bookmarks Menu'",
     "     VISIBLE:  'Bookmarks Menu', cursor=1",
     "BRAILLE LINE:  'Minefield Application Minefield Frame ToolBar Application MenuBar Bookmark This Page(Control D)'",
     "     VISIBLE:  'Bookmark This Page(Control D)', cursor=1",
     "SPEECH OUTPUT: ''",
     "SPEECH OUTPUT: 'Bookmarks menu'",
     "SPEECH OUTPUT: ''",
     "SPEECH OUTPUT: 'Bookmark This Page Control D'"]))

sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(utils.AssertPresentationAction(
    "Down Arrow in Bookmarks menu",
    ["BRAILLE LINE:  'Minefield Application Minefield Frame ToolBar Application MenuBar Organize Bookmarks'",
     "     VISIBLE:  'Organize Bookmarks', cursor=1",
     "SPEECH OUTPUT: ''",
     "SPEECH OUTPUT: 'Organize Bookmarks'"]))

sequence.append(KeyComboAction("Return"))

########################################################################
# Press Shift+F10 to bring up a context menu then Down Arrow once to
# get to "New Bookmark..." and press Return.
#
sequence.append(KeyComboAction("<Shift>F10"))
sequence.append(KeyComboAction("Down"))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Return", 1000))
sequence.append(utils.AssertPresentationAction(
    "Return for a new bookmark",
    ["BRAILLE LINE:  'Minefield Application Add Bookmark Dialog'",
     "     VISIBLE:  'Add Bookmark Dialog', cursor=1",
     "BRAILLE LINE:  'Minefield Application Add Bookmark Dialog  $l'",
     "     VISIBLE:  ' $l', cursor=1",
     "SPEECH OUTPUT: ''",
     "SPEECH OUTPUT: 'Add Bookmark'",
     "SPEECH OUTPUT: ''",
     "SPEECH OUTPUT: 'Name: text '"]))

########################################################################
# Focus will be in the Name single-line entry.  Type "this is a test"
#
sequence.append(utils.StartRecordingAction())
sequence.append(TypeAction("this is a test"))
sequence.append(utils.AssertPresentationAction(
    "Type 'this is a test'",
    [     "BRAILLE LINE:  'Minefield Application Add Bookmark Dialog t $l'",
     "     VISIBLE:  't $l', cursor=2",
     "BRAILLE LINE:  'Minefield Application Add Bookmark Dialog t $l'",
     "     VISIBLE:  't $l', cursor=2",
     "BRAILLE LINE:  'Minefield Application Add Bookmark Dialog th $l'",
     "     VISIBLE:  'th $l', cursor=2",
     "BRAILLE LINE:  'Minefield Application Add Bookmark Dialog th $l'",
     "     VISIBLE:  'th $l', cursor=3",
     "BRAILLE LINE:  'Minefield Application Add Bookmark Dialog thi $l'",
     "     VISIBLE:  'thi $l', cursor=3",
     "BRAILLE LINE:  'Minefield Application Add Bookmark Dialog thi $l'",
     "     VISIBLE:  'thi $l', cursor=4",
     "BRAILLE LINE:  'Minefield Application Add Bookmark Dialog this $l'",
     "     VISIBLE:  'this $l', cursor=4",
     "BRAILLE LINE:  'Minefield Application Add Bookmark Dialog this $l'",<commit_msg>Updated test because FF updated the dialog.  Again.<commit_after># -*- coding: utf-8 -*-
#!/usr/bin/python

"""Test of entry output using Firefox.
"""

from macaroon.playback import *
import utils

sequence = MacroSequence()

########################################################################
# We wait for the focus to be on a blank Firefox window.
#
sequence.append(WaitForWindowActivate("Minefield",None))

########################################################################
# Open the "Bookmarks" menu, Down Arrow to Show All Bookmarks, then 
# press Return.
#
sequence.append(KeyComboAction("<Alt>b"))
sequence.append(KeyComboAction("Down"))
sequence.append(KeyComboAction("Return"))

########################################################################
# Down Arrow to select Bookmarks menu (necessary to add a new item).
# Then Press Alt+O for Organize and Return on "New Bookmark..."
#
sequence.append(KeyComboAction("Down", 3000))
sequence.append(KeyComboAction("<Alt>o"))
sequence.append(KeyComboAction("Return", 1000))

########################################################################
# Focus will be in the Name single-line entry.  Type "this is a test"
#
sequence.append(utils.StartRecordingAction())
sequence.append(TypeAction("this is a test"))
sequence.append(utils.AssertPresentationAction(
    "Type 'this is a test'",
    [     "BRAILLE LINE:  'Minefield Application Add Bookmark Dialog t $l'",
     "     VISIBLE:  't $l', cursor=2",
     "BRAILLE LINE:  'Minefield Application Add Bookmark Dialog t $l'",
     "     VISIBLE:  't $l', cursor=2",
     "BRAILLE LINE:  'Minefield Application Add Bookmark Dialog th $l'",
     "     VISIBLE:  'th $l', cursor=2",
     "BRAILLE LINE:  'Minefield Application Add Bookmark Dialog th $l'",
     "     VISIBLE:  'th $l', cursor=3",
     "BRAILLE LINE:  'Minefield Application Add Bookmark Dialog thi $l'",
     "     VISIBLE:  'thi $l', cursor=3",
     "BRAILLE LINE:  'Minefield Application Add Bookmark Dialog thi $l'",
     "     VISIBLE:  'thi $l', cursor=4",
     "BRAILLE LINE:  'Minefield Application Add Bookmark Dialog this $l'",
     "     VISIBLE:  'this $l', cursor=4",
     "BRAILLE LINE:  'Minefield Application Add Bookmark Dialog this $l'",
{'fraction_non_alphanumeric': 0.21687979539641944, 'fraction_numerical': 0.006308610400682012, 'mean_word_length': 4.487371375116932, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '357320', 'n_tokens_mistral': 1818, 'n_tokens_neox': 1741, 'n_words': 518}