diff options
author | Artur Neumann <artur@jankaritech.com> | 2021-05-10 09:00:53 +0300 |
---|---|---|
committer | Artur Neumann <artur@jankaritech.com> | 2021-05-11 06:16:02 +0300 |
commit | 7dcd51702e967d9654acb93f78dfb93ac28f590b (patch) | |
tree | 23da1c633e9916e06db1dd421537ce73b44b7d31 /test/gui/shared/steps | |
parent | 7f88e0170bb29d596cee9c696da960df6877fd59 (diff) |
check content of date input field
Diffstat (limited to 'test/gui/shared/steps')
-rw-r--r-- | test/gui/shared/steps/steps.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/test/gui/shared/steps/steps.py b/test/gui/shared/steps/steps.py index be63ecf86..a8810050c 100644 --- a/test/gui/shared/steps/steps.py +++ b/test/gui/shared/steps/steps.py @@ -7,6 +7,7 @@ from os.path import isfile, join import re import urllib.request import json +import datetime from objectmaphelper import RegularExpression @@ -484,17 +485,19 @@ def step(context, publicLinkName, resource): expDate = [] for row in context.table: if row[0] == 'expireDate': - expDate = row[1].split("-") - expYear = expDate[0][2:] + expDate = datetime.datetime.strptime(row[1],'%Y-%m-%d') + expYear = expDate.year-2000 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(expDate.month) + nativeType(expDate.day) nativeType(expYear) - nativeType("<Tab>") waitFor(lambda: (test.vp("publicLinkExpirationProgressIndicator"))) - + test.compare( + str(waitForObjectExists(names.oCC_ShareLinkWidget_qt_spinbox_lineedit_QLineEdit).displayText), + str(expDate.month) + "/" + str(expDate.day) + "/" + str(expYear) + ) @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): |