Skip to content

Commit

Permalink
[Tests-Only] Visually check all tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
swoichha committed Jun 17, 2021
1 parent 5211ff8 commit 3366f26
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 1 deletion.
2 changes: 2 additions & 0 deletions test/gui/shared/scripts/names.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,5 @@
oCC_ShareLinkWidget_checkBox_expire_QProgressIndicator = {"aboveWidget": oCC_ShareLinkWidget_lineEdit_password_QLineEdit, "container": qt_tabwidget_stackedwidget_OCC_ShareLinkWidget_OCC_ShareLinkWidget, "leftWidget": oCC_ShareLinkWidget_checkBox_expire_QCheckBox, "type": "QProgressIndicator", "unnamed": 1, "visible": 1}
oCC_IssuesWidget_tableView_QTableView = {"container": qt_tabwidget_stackedwidget_OCC_IssuesWidget_OCC_IssuesWidget, "name": "_tableView", "type": "QTableView", "visible": 1}
o_tableView_0_1_QModelIndex = {"column": 1, "container": oCC_IssuesWidget_tableView_QTableView, "row": 0, "type": "QModelIndex"}
settings_settingsdialog_toolbutton_Add_account_QToolButton = {"name": "settingsdialog_toolbutton_Add account", "type": "QToolButton", "visible": 1, "window": settings_OCC_SettingsDialog}
settings_settingsdialog_toolbutton_Activity_QToolButton = {"name": "settingsdialog_toolbutton_Activity", "type": "QToolButton", "visible": 1, "window": settings_OCC_SettingsDialog}
8 changes: 8 additions & 0 deletions test/gui/shared/steps/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,3 +640,11 @@ def step(context):
'Ser&ver Address',
)
waitForObject(AccountConnectionWizard.SERVER_ADDRESS_BOX)


@Then("all tabs in the toolbar should match the default baseline")
def step(context):
test.vp("AddAccount")
test.vp("Activity")
test.vp("Settings")
test.vp("QuitOwncloud")
2 changes: 1 addition & 1 deletion test/gui/suite.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ HOOK_SUB_PROCESSES=false
IMPLICITAUTSTART=0
LANGUAGE=Python
OBJECTMAPSTYLE=script
TEST_CASES=tst_addAccount tst_sharing tst_syncing tst_loginLogout tst_removeAccountConnection
TEST_CASES=tst_addAccount tst_sharing tst_syncing tst_loginLogout tst_removeAccountConnection tst_checkAlltabs
VERSION=3
WRAPPERS=Qt
11 changes: 11 additions & 0 deletions test/gui/tst_checkAlltabs/test.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Feature: Visually check all tabs

As a user
I want to visually check all tabs in client
So that I can performe all the actions related to client


Scenario: Tabs in toolbar looks correct
Given user "Alice" has been created on the server with default attributes and without skeleton files
And user "Alice" has set up a client with default settings
Then all tabs in the toolbar should match the default baseline
9 changes: 9 additions & 0 deletions test/gui/tst_checkAlltabs/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
source(findFile('scripts', 'python/bdd.py'))

setupHooks('../shared/scripts/bdd_hooks.py')
collectStepDefinitions('./steps', '../shared/steps')


def main():
testSettings.throwOnFailure = True
runFeatureFile('test.feature')
16 changes: 16 additions & 0 deletions test/gui/tst_checkAlltabs/verificationPoints/Activity
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<VerificationPoint type="ObjectProperties" version="4">
<Description/>
<Verification object="settings_settingsdialog_toolbutton_Activity_QToolButton" property="pos.x" type="int" valueType="Value"><![CDATA[195]]>
<base64EncodedValue>MTk1</base64EncodedValue>
</Verification>
<Verification object="settings_settingsdialog_toolbutton_Activity_QToolButton" property="pos.y" type="int" valueType="Value"><![CDATA[0]]>
<base64EncodedValue>MA==</base64EncodedValue>
</Verification>
<Verification object="settings_settingsdialog_toolbutton_Activity_QToolButton" property="text" type="QString" valueType="Value"><![CDATA[Activity]]>
<base64EncodedValue>QWN0aXZpdHk=</base64EncodedValue>
</Verification>
<Verification object="settings_settingsdialog_toolbutton_Activity_QToolButton" property="visible" type="bool" valueType="Value"><![CDATA[true]]>
<base64EncodedValue>dHJ1ZQ==</base64EncodedValue>
</Verification>
</VerificationPoint>
16 changes: 16 additions & 0 deletions test/gui/tst_checkAlltabs/verificationPoints/AddAccount
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<VerificationPoint type="ObjectProperties" version="4">
<Description/>
<Verification object="settings_settingsdialog_toolbutton_Add_account_QToolButton" property="pos.x" type="int" valueType="Value"><![CDATA[0]]>
<base64EncodedValue>MA==</base64EncodedValue>
</Verification>
<Verification object="settings_settingsdialog_toolbutton_Add_account_QToolButton" property="pos.y" type="int" valueType="Value"><![CDATA[0]]>
<base64EncodedValue>MA==</base64EncodedValue>
</Verification>
<Verification object="settings_settingsdialog_toolbutton_Add_account_QToolButton" property="text" type="QString" valueType="Value"><![CDATA[Add account]]>
<base64EncodedValue>QWRkIGFjY291bnQ=</base64EncodedValue>
</Verification>
<Verification object="settings_settingsdialog_toolbutton_Add_account_QToolButton" property="visible" type="bool" valueType="Value"><![CDATA[true]]>
<base64EncodedValue>dHJ1ZQ==</base64EncodedValue>
</Verification>
</VerificationPoint>
16 changes: 16 additions & 0 deletions test/gui/tst_checkAlltabs/verificationPoints/QuitOwncloud
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<VerificationPoint type="ObjectProperties" version="4">
<Description/>
<Verification object="settings_settingsdialog_toolbutton_Quit_ownCloud_QToolButton" property="pos.x" type="int" valueType="Value"><![CDATA[691]]>
<base64EncodedValue>Njkx</base64EncodedValue>
</Verification>
<Verification object="settings_settingsdialog_toolbutton_Quit_ownCloud_QToolButton" property="pos.y" type="int" valueType="Value"><![CDATA[0]]>
<base64EncodedValue>MA==</base64EncodedValue>
</Verification>
<Verification object="settings_settingsdialog_toolbutton_Quit_ownCloud_QToolButton" property="text" type="QString" valueType="Value"><![CDATA[Quit ownCloud]]>
<base64EncodedValue>UXVpdCBvd25DbG91ZA==</base64EncodedValue>
</Verification>
<Verification object="settings_settingsdialog_toolbutton_Quit_ownCloud_QToolButton" property="visible" type="bool" valueType="Value"><![CDATA[true]]>
<base64EncodedValue>dHJ1ZQ==</base64EncodedValue>
</Verification>
</VerificationPoint>
16 changes: 16 additions & 0 deletions test/gui/tst_checkAlltabs/verificationPoints/Settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<VerificationPoint type="ObjectProperties" version="4">
<Description/>
<Verification object="settings_settingsdialog_toolbutton_Settings_QToolButton" property="pos.x" type="int" valueType="Value"><![CDATA[262]]>
<base64EncodedValue>MjYy</base64EncodedValue>
</Verification>
<Verification object="settings_settingsdialog_toolbutton_Settings_QToolButton" property="pos.y" type="int" valueType="Value"><![CDATA[0]]>
<base64EncodedValue>MA==</base64EncodedValue>
</Verification>
<Verification object="settings_settingsdialog_toolbutton_Settings_QToolButton" property="text" type="QString" valueType="Value"><![CDATA[Settings]]>
<base64EncodedValue>U2V0dGluZ3M=</base64EncodedValue>
</Verification>
<Verification object="settings_settingsdialog_toolbutton_Settings_QToolButton" property="visible" type="bool" valueType="Value"><![CDATA[true]]>
<base64EncodedValue>dHJ1ZQ==</base64EncodedValue>
</Verification>
</VerificationPoint>

0 comments on commit 3366f26

Please sign in to comment.