File: test_open.py

package info (click to toggle)
librepcb 1.2.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 58,488 kB
  • sloc: cpp: 267,986; python: 12,100; ansic: 6,899; xml: 234; sh: 215; makefile: 115; perl: 73
file content (19 lines) | stat: -rw-r--r-- 810 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
Test opening the library editor
"""


def test_metadata(library_editor):
    """
    Just open the library editor and check some metadata
    """
    le = library_editor
    assert le.widget('libraryEditorStackedWidget').properties()['count'] == 1
    assert le.widget('libraryEditorOverviewNameEdit').properties()['text'] == 'Populated Library'
    assert le.widget('libraryEditorOverviewDescriptionEdit').properties()['plainText'] == 'Test library containing some elements'
    assert le.widget('libraryEditorOverviewKeywordsEdit').properties()['text'] == 'test,library,populated'
    assert le.widget('libraryEditorOverviewAuthorEdit').properties()['text'] == 'test'
    assert le.widget('libraryEditorOverviewVersionEdit').properties()['text'] == '0.0.1'