From 43c82cb3c9eb10a943cbd50895f8b40214afafd0 Mon Sep 17 00:00:00 2001 From: Olivier Keshavjee Date: Wed, 22 Nov 2017 11:27:21 +0100 Subject: [PATCH] Adds: simple ui tests for exporter and importer widgets --- manuskript/tests/ui/exporters/__init__.py | 4 +++ .../tests/ui/exporters/test_exporters.py | 27 +++++++++++++++++++ manuskript/tests/ui/importers/__init__.py | 4 +++ .../tests/ui/importers/test_importers.py | 19 +++++++++++++ 4 files changed, 54 insertions(+) create mode 100644 manuskript/tests/ui/exporters/__init__.py create mode 100644 manuskript/tests/ui/exporters/test_exporters.py create mode 100644 manuskript/tests/ui/importers/__init__.py create mode 100644 manuskript/tests/ui/importers/test_importers.py diff --git a/manuskript/tests/ui/exporters/__init__.py b/manuskript/tests/ui/exporters/__init__.py new file mode 100644 index 00000000..b4598816 --- /dev/null +++ b/manuskript/tests/ui/exporters/__init__.py @@ -0,0 +1,4 @@ +#!/usr/bin/env python +# --!-- coding: utf8 --!-- + +"""Tests for exporters, ui part.""" diff --git a/manuskript/tests/ui/exporters/test_exporters.py b/manuskript/tests/ui/exporters/test_exporters.py new file mode 100644 index 00000000..c0225443 --- /dev/null +++ b/manuskript/tests/ui/exporters/test_exporters.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python +# --!-- coding: utf8 --!-- + +"""Tests for settingsWindow""" + +def test_loadExportWiget(MWSampleProject): + """ + Simply tests that export widget loads properly. + """ + MW = MWSampleProject + + # Loading from mainWindow + MW.doCompile() + E = MW.dialog + assert E.isVisible() + E.hide() + + # Load exporter manager + E.openManager() + EM = E.dialog + assert EM.isVisible() + EM.hide() + + EM.close() + E.close() + +#FIXME: test significant stuff diff --git a/manuskript/tests/ui/importers/__init__.py b/manuskript/tests/ui/importers/__init__.py new file mode 100644 index 00000000..eec38ed4 --- /dev/null +++ b/manuskript/tests/ui/importers/__init__.py @@ -0,0 +1,4 @@ +#!/usr/bin/env python +# --!-- coding: utf8 --!-- + +"""Tests for importers, ui part.""" diff --git a/manuskript/tests/ui/importers/test_importers.py b/manuskript/tests/ui/importers/test_importers.py new file mode 100644 index 00000000..37bc0943 --- /dev/null +++ b/manuskript/tests/ui/importers/test_importers.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python +# --!-- coding: utf8 --!-- + +"""Tests for settingsWindow""" + +def test_loadImportWiget(MWSampleProject): + """ + Simply tests that import widget loads properly. + """ + MW = MWSampleProject + + # Loading from mainWindow + MW.doImport() + I = MW.dialog + assert I.isVisible() + I.hide() + I.close() + +#FIXME: test significant stuff