示例#1
0
def cmake():
    terminal = mv.Terminal()
    terminal.new()
    terminal.type("cd build")
    mv.wait(1)
    terminal.type("cmake ..")
    mv.wait(1)
    terminal.type("make")
    mv.wait_image("terminal/built_target", seconds=20, wait=3, score=0.9)
    return terminal
示例#2
0
def run_test(test_name, scroll_result):
    terminal = mv.Terminal()
    terminal.new()
    terminal.type("cd tests")
    terminal.type("python3 {}".format(test_name))
    mv.wait_image("terminal/local_node_stopped", seconds=20, score=0.9)

    terminal.maximize()
    mv.wait(2)
    terminal.scroll_down(scroll_result)
    return terminal
示例#3
0
def show_and_run_test(test_name, scroll_script, scroll_result):
    view_explorer()
    mv.focus_group(1)
    if not mv.exists(
            "explorer/{}".format(test_name), mv.region_side_bar):
        mv.find("explorer/tests", mv.region_side_bar).click()
        mv.hover(mv.region_menu_bar) # move cursor away

    mv.wait_image("explorer/{}".format(test_name), mv.region_side_bar).click()
    mv.toggle_side_bar()
    test = mv.Edit(test_name, 1)
    test.scroll_down(scroll_script)

    return run_test(test_name, scroll_result)
示例#4
0
def view_explorer():
    mv.send_shortcut("e", sikuli.Key.CTRL + sikuli.Key.SHIFT)
    mv.wait_image("view/explorer", mv.region_side_bar, 10)
示例#5
0
def view_two_columns():
    mv.send_shortcut("v", sikuli.Key.ALT)
    mv.wait_image("view/editor_layout", mv.region_vscode).click()
    mv.wait_image("view/two_columns1", mv.region_vscode).click()
示例#6
0
def view_extensions():
    mv.send_shortcut("v", sikuli.Key.ALT)
    button = mv.wait_image("view/extensions")
    button.click()
    mv.wait_image("view/extensions", mv.region_side_bar, 10, 2)
示例#7
0
CONTRACT_WORKSPACE = "C:\\Workspaces\\EOS\\contracts\\"
CONTRACT_NAME = "hello2"
MOVIE_NAME = "five_minutes"

# black, blue, cyan, gray, green, magenta, orange, pink, red, white, yellow
HIGHLIGHT_COLOR = "pink"
NAME = os.path.join(mv.sikuli_movies_dir(), "movies", MOVIE_NAME, MOVIE_NAME)
START_POINT = "movies/" + MOVIE_NAME + "/start_point"

mv.kill_ffmpeg()
mv.delete_contract(os.path.join(CONTRACT_WORKSPACE, CONTRACT_NAME))

narration = ma.init()
mv.focus_group(1)
ma.ide_view()
get_started = mv.wait_image("eoside/get_started", mv.region_vscode)
if not get_started:
    print('''
Is 'EOSIDE' view focused?
Is US keyboard set?
Is 'hello' project in the 'Recent' list?
    ''')
    exit()

ma.type_setup(narration)

mv.start_ffmpeg(NAME)
mv.wait(5)
narration.move_right()
narration.set_width()
示例#8
0
                mv.sikuli_movies_dir(), "movies", "installing", "installing")
START_POINT = "movies/installing/start_point"

mv.kill_ffmpeg()
mv.delete_contract(os.path.join(CONTRACT_WORKSPACE, CONTRACT_NAME))

narration = ma.init()
mv.focus_group(1)
ma.type_setup(narration)
mv.start_ffmpeg(NAME)

mv.wait(5)
mv.show_enabled_extensions()
mv.wait(1)

extension_eoside = mv.wait_image("extension_eoside", mv.region_side_bar)
extension_eoside.highlight(3, HIGHLIGHT_COLOR)
extension_eoside.click()
mv.wait_image("logo_tokenika")
narration.move_right()
narration.type('''
# EOSIDE extends VSCode

EOSIDE is available from the VSCode Extension Marketplace.
''', "w")
extension_eoside.highlight(3, HIGHLIGHT_COLOR)
mv.toggle_side_bar()
narration.set_width()

narration.type('''