Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorArtur Neumann <artur@jankaritech.com>2021-05-07 12:10:32 +0300
committerGitHub <noreply@github.com>2021-05-07 12:10:32 +0300
commit6174c6b7ae96bf167678ea371f7767741643cc75 (patch)
tree0f428468d54e2e1793e75bbd93ea059e772fd95a /test
parentf64f54df6a44bf46f2f432c9d3c16af88f7b8c12 (diff)
hardening setting date of public link in tests (#8611)
wait for progressindicator when updating public share
Diffstat (limited to 'test')
-rw-r--r--test/gui/shared/scripts/names.py2
-rw-r--r--test/gui/shared/steps/steps.py32
-rw-r--r--test/gui/shared/verificationPoints/publicLinkExpirationProgressIndicator93
3 files changed, 113 insertions, 14 deletions
diff --git a/test/gui/shared/scripts/names.py b/test/gui/shared/scripts/names.py
index 6fe1c0c07..5464dac82 100644
--- a/test/gui/shared/scripts/names.py
+++ b/test/gui/shared/scripts/names.py
@@ -104,3 +104,5 @@ linkShares_0_0_QModelIndex = {"column": 0, "container": oCC_ShareLinkWidget_link
oCC_ShareLinkWidget_radio_readOnly_QRadioButton = {"container": qt_tabwidget_stackedwidget_OCC_ShareLinkWidget_OCC_ShareLinkWidget, "name": "radio_readOnly", "type": "QRadioButton", "visible": 1}
oCC_ShareLinkWidget_radio_readWrite_QRadioButton = {"container": qt_tabwidget_stackedwidget_OCC_ShareLinkWidget_OCC_ShareLinkWidget, "name": "radio_readWrite", "type": "QRadioButton", "visible": 1}
oCC_ShareLinkWidget_radio_uploadOnly_QRadioButton = {"container": qt_tabwidget_stackedwidget_OCC_ShareLinkWidget_OCC_ShareLinkWidget, "name": "radio_uploadOnly", "type": "QRadioButton", "visible": 1}
+oCC_ShareLinkWidget_checkBox_expire_QCheckBox = {"container": qt_tabwidget_stackedwidget_OCC_ShareLinkWidget_OCC_ShareLinkWidget, "name": "checkBox_expire", "type": "QCheckBox", "visible": 1}
+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}
diff --git a/test/gui/shared/steps/steps.py b/test/gui/shared/steps/steps.py
index 8a3412e86..83e4319f9 100644
--- a/test/gui/shared/steps/steps.py
+++ b/test/gui/shared/steps/steps.py
@@ -118,7 +118,7 @@ def setUpClient(context, username, password, pollingInterval):
def getPasswordForUser(userId):
if userId in defaultUsers.keys():
return defaultUsers[userId]['password']
-
+
@Given('user "|any|" has set up a client with default settings and polling interval "|any|"')
def step(context, username, interval):
pollingInterval='''[ownCloud]
@@ -481,12 +481,16 @@ def step(context, publicLinkName, resource):
if row[0] == 'expireDate':
expDate = row[1].split("-")
expYear = expDate[0][2:]
- doubleClick(waitForObject(names.oCC_ShareLinkWidget_qt_spinbox_lineedit_QLineEdit), 5, 9, Qt.NoModifier, Qt.LeftButton)
- type(waitForObject(names.oCC_ShareLinkWidget_calendar_QDateEdit), expDate[1])
- type(waitForObject(names.oCC_ShareLinkWidget_calendar_QDateEdit), expDate[2])
- type(waitForObject(names.oCC_ShareLinkWidget_calendar_QDateEdit), expYear)
-
-
+ mouseClick(waitForObject(names.oCC_ShareLinkWidget_qt_spinbox_lineedit_QLineEdit), 0, 0, Qt.NoModifier, Qt.LeftButton)
+ nativeType("<Delete>")
+ nativeType("<Delete>")
+ nativeType(expDate[1])
+ nativeType(expDate[2])
+ nativeType(expYear)
+ nativeType("<Tab>")
+ waitFor(lambda: (test.vp("publicLinkExpirationProgressIndicator")))
+
+
@When('the user creates a new public link with permissions "|any|" for folder "|any|" without password using the client-UI')
def step(context, permissions, resource):
resource = sanitizePath(substituteInLineCodes(context, resource))
@@ -497,7 +501,7 @@ def step(context, permissions, resource):
elif permissions == 'Download / View / Edit':
radioObjectName = names.oCC_ShareLinkWidget_radio_readWrite_QRadioButton
elif permissions == 'Upload only (File Drop)':
- radioObjectName = names.oCC_ShareLinkWidget_radio_uploadOnly_QRadioButton
+ radioObjectName = names.oCC_ShareLinkWidget_radio_uploadOnly_QRadioButton
test.compare(str(waitForObjectExists(radioObjectName).text), permissions)
clickButton(waitForObject(radioObjectName))
@@ -518,7 +522,7 @@ def step(context, permissions, resource, password):
def createPublicShare(context, resource, role):
resource = sanitizePath(substituteInLineCodes(context, resource))
radioObjectName = ''
-
+
if role == 'Viewer':
radioObjectName = names.oCC_ShareLinkWidget_radio_readOnly_QRadioButton
elif role == 'Editor':
@@ -530,8 +534,8 @@ def createPublicShare(context, resource, role):
openPublicLinkDialog(context, resource)
clickButton(waitForObject(radioObjectName))
- clickButton(waitForObject(names.oCC_ShareLinkWidget_createShareButton_QPushButton))
-
+ clickButton(waitForObject(names.oCC_ShareLinkWidget_createShareButton_QPushButton))
+
@When('the user creates a new public link for folder "|any|" using the client-UI with these details:')
def step(context, resource):
role = ''
@@ -544,10 +548,10 @@ def step(context, resource):
raise Exception("No role has been found")
else:
createPublicShare(context, resource, role)
-
-
+
+
@When('the user creates a new public link for folder "|any|" with "|any|" using the client-UI')
def step(context, resource, role):
createPublicShare(context, resource, role)
-
+
diff --git a/test/gui/shared/verificationPoints/publicLinkExpirationProgressIndicator b/test/gui/shared/verificationPoints/publicLinkExpirationProgressIndicator
new file mode 100644
index 000000000..cd9a1357e
--- /dev/null
+++ b/test/gui/shared/verificationPoints/publicLinkExpirationProgressIndicator
@@ -0,0 +1,93 @@
+<?xml version='1.0' encoding='UTF-8' standalone='no'?>
+<VerificationPoint type="Visual" version="5">
+ <Description/>
+ <Verification object="oCC_ShareLinkWidget_checkBox_expire_QProgressIndicator">
+ <visual>
+ <ui version="1.0">
+ <execution>
+ <state>
+ <element id="178fe141603" class="QProgressIndicator">
+ <image type="PNG">iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAIklEQVQ4jWN8//79fwYqAiZqGjZq4KiBowaOGjhq4FAyEACDpgP0OKH6SQAAAABJRU5ErkJggg==</image>
+ <superclass>
+ <class>QWidget</class>
+ <class>QObject</class>
+ </superclass>
+ <abstractProperties>
+ <visual isTopLevel="1"/>
+ <geometry isRelative="0">
+ <x>528</x>
+ <y>604</y>
+ <height>20</height>
+ <width>20</width>
+ </geometry>
+ </abstractProperties>
+ <properties>
+ <property name="isActiveWindow">
+ <string>true</string>
+ </property>
+ <property name="focus">
+ <string>false</string>
+ </property>
+ <property name="focusPolicy">
+ <string>0</string>
+ </property>
+ <property name="autoFillBackground">
+ <string>false</string>
+ </property>
+ <property name="maximized">
+ <string>false</string>
+ </property>
+ <property name="fullScreen">
+ <string>false</string>
+ </property>
+ <property name="displayedWhenStopped">
+ <string>false</string>
+ </property>
+ <property name="delay">
+ <string>40</string>
+ </property>
+ <property name="whatsThis"/>
+ <property name="windowIconText"/>
+ <property name="statusTip"/>
+ <property name="enabled">
+ <string>true</string>
+ </property>
+ <property name="windowOpacity">
+ <string>1</string>
+ </property>
+ <property name="toolTipDuration">
+ <string>-1</string>
+ </property>
+ <property name="toolTip"/>
+ <property name="styleSheet"/>
+ <property name="minimized">
+ <string>false</string>
+ </property>
+ <property name="windowFilePath"/>
+ <property name="layoutDirection">
+ <string>0</string>
+ </property>
+ <property name="windowModality">
+ <string>0</string>
+ </property>
+ <property name="tabletTracking">
+ <string>false</string>
+ </property>
+ <property name="accessibleDescription"/>
+ <property name="windowTitle"/>
+ </properties>
+ <identifyingProperties>
+ <property name="accessibleName"/>
+ <property name="objectName"/>
+ </identifyingProperties>
+ </element>
+ </state>
+ </execution>
+ </ui>
+ <check type="identifying"/>
+ <check type="screenshot">
+ <PropertyVerification element-id="178fe141603"/>
+ </check>
+ </visual>
+ </Verification>
+</VerificationPoint>