Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
clients
python
sakia
Commits
6de5e887
Commit
6de5e887
authored
7 years ago
by
Florian Thöni
Browse files
Options
Downloads
Patches
Plain Diff
Clean helpers
parent
30d0633a
No related branches found
No related tags found
1 merge request
!684
READY:Test helpers : Message box, click yes vs enter
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/functional/test_connection_cfg_dialog.py
+1
-1
1 addition, 1 deletion
tests/functional/test_connection_cfg_dialog.py
tests/helpers.py
+0
-16
0 additions, 16 deletions
tests/helpers.py
with
1 addition
and
17 deletions
tests/functional/test_connection_cfg_dialog.py
+
1
−
1
View file @
6de5e887
...
@@ -5,7 +5,7 @@ from PyQt5.QtCore import Qt
...
@@ -5,7 +5,7 @@ from PyQt5.QtCore import Qt
from
PyQt5.QtTest
import
QTest
from
PyQt5.QtTest
import
QTest
from
sakia.data.processors
import
ConnectionsProcessor
,
BlockchainProcessor
from
sakia.data.processors
import
ConnectionsProcessor
,
BlockchainProcessor
from
sakia.gui.dialogs.connection_cfg
import
ConnectionConfigController
from
sakia.gui.dialogs.connection_cfg
import
ConnectionConfigController
from
tests.helpers
import
click_on_top_message_box
,
select_file_dialog
,
accept_dialog
from
tests.helpers
import
select_file_dialog
,
accept_dialog
def
assert_key_parameters_behaviour
(
connection_config_dialog
,
user
):
def
assert_key_parameters_behaviour
(
connection_config_dialog
,
user
):
...
...
This diff is collapsed.
Click to expand it.
tests/helpers.py
+
0
−
16
View file @
6de5e887
...
@@ -16,22 +16,6 @@ def accept_dialog(title):
...
@@ -16,22 +16,6 @@ def accept_dialog(title):
if
isinstance
(
w
,
QDialog
)
and
w
.
windowTitle
()
==
title
:
if
isinstance
(
w
,
QDialog
)
and
w
.
windowTitle
()
==
title
:
w
.
accept
()
w
.
accept
()
def
click_on_top_message_box
():
topWidgets
=
QApplication
.
topLevelWidgets
()
for
w
in
topWidgets
:
if
isinstance
(
w
,
QMessageBox
):
QTest
.
keyClick
(
w
,
Qt
.
Key_Enter
)
elif
isinstance
(
w
,
QDialog
)
and
w
.
windowTitle
()
==
"
Registration
"
:
QTest
.
keyClick
(
w
,
Qt
.
Key_Enter
)
def
yes_on_top_message_box
():
topWidgets
=
QApplication
.
topLevelWidgets
()
for
w
in
topWidgets
:
if
isinstance
(
w
,
QMessageBox
):
QTest
.
mouseClick
(
w
.
button
(
QMessageBox
.
Yes
),
Qt
.
LeftButton
)
def
select_file_dialog
(
filename
):
def
select_file_dialog
(
filename
):
topWidgets
=
QApplication
.
topLevelWidgets
()
topWidgets
=
QApplication
.
topLevelWidgets
()
for
w
in
topWidgets
:
for
w
in
topWidgets
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment