-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tests-only]added tests for public link share with expiration date #8527
Conversation
92f1aca
to
64c8aad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the error output in the log is not so nice
Detail Exception: Step execution through test middleware failed. Error: AssertionError [ERR_ASSERTION]: Expiry Date Mismatch: [object Object]
but I guess that needs to be changed in the middleware
And the user edits the public link named "Public link" of file "textfile0.txt" changing following | ||
| expireDate | 2038-07-21 | | ||
Then the fields of the last public link share response of user "Alice" should include on the server | ||
| expireDate | 2038-07-21 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that step fails for me with
AssertionError [ERR_ASSERTION]: Expiry Date Mismatch: [object Object]
at Object.assertUserLastPublicShareDetails (/home/artur/www/owncloud-test-middleware/src/helpers/sharingHelper.js:431:16)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async /home/artur/www/owncloud-test-middleware/src/app.js:56:7 {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: '2038-02-07',
expected: '2038-07-21',
operator: 'strictEqual'
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you run the test after removing the snooze(5)
step?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the problem seems to be my location settings. my date format is set to "d/m/yy" yours seems to be "m/d/yy"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it be a problem in future if we run tests on CI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need a way to set the env. variable LC_TIME=en_US.utf8
before starting the app under test to make sure its always the same in all test runs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've fixed the branch, now the tests work for me. I had to set the env. variable in test/gui/envvars
these are the variables that get passed on to the AUT see https://kb.froglogic.com/squish/howto/specifying-environment-variables-application/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the problem seems to be my location settings. my date format is set to "d/m/yy" yours seems to be "m/d/yy"
related to #8367 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, my system is set to Australian date format, and I believe @swoichha is set to US, so the app behaives correctly, I just had to adjust the app under test
if row[0] == 'expireDate': | ||
expDate = row[1].split("-") | ||
|
||
doubleClick(waitForObject(names.oCC_ShareLinkWidget_qt_spinbox_lineedit_QLineEdit), 5, 9, Qt.NoModifier, Qt.LeftButton) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doubleclick seems not to be needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doubleClick
is needed because we can only update the expiration date value by double clicking and selecting the current date and then typing the new value to replace the old value of dates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm when I try it manually I even need to triple click to select the complete date
c881050
to
4412955
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please rebase and squash the commits
3bddc9f
to
ac8b5f0
Compare
author swoichha <[email protected]> 1616749467 +0545 committer swoichha <[email protected]> 1617878403 +0545 [tests-only]added tests for public link share with expiration date
ac8b5f0
to
6e5df69
Compare
Kudos, SonarCloud Quality Gate passed! |
Description
This PR adds tests for sharing file with expiration dateusing public link.
Related Issue
#8501