Loading files
c730ec352This file is pinned to the selected release. Download the original to open it in your design tool.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Test opening projects
"""
def test_file_tree_dclick(librepcb):
librepcb.add_project_to_workspace("Empty Project")
with librepcb.open() as app:
# Open project
items = app.get("#HomePanel #WorkspaceFolderTreeView TreeView::item-ta *")
items.wait(1)
items[0].dclick()
items.wait_for_item(lambda x: x.label == "Empty Project.lpp").dclick()
# Verify that schematic- and board tabs have been opened
tabs = app.get("#TabButton *")
tabs.wait(3)
assert tabs[1].label == "Schematic"
assert tabs[1].checked
assert tabs[2].label == "Board"
assert not tabs[2].checked
# Close project and wait until tabs have been closed
app.get("#DocumentsPanel ProjectSection::close-btn").click()
tabs.wait(1)