Skip to content
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][full-ci] Bump commit ids for tests #5652

Merged
merged 2 commits into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .drone.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# The version of OCIS to use in pipelines that test against OCIS
OCIS_COMMITID=5c550ecbb4991651af40f657510eccbcf5f503a5
OCIS_COMMITID=eb0b805b639172d63c5510dad221235b54e8936d
OCIS_BRANCH=master

# The test runner source for API tests
CORE_COMMITID=61d609ceb9ce32b977c7a3e6ea1683643b98e40a
CORE_COMMITID=872358a4d06c8d2f3568bf8c170ec66a6d69d9af
CORE_BRANCH=master
4 changes: 2 additions & 2 deletions tests/acceptance/features/webUIUpload/upload.feature
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Feature: File Upload
And file "new-lorem.txt" should be listed on the webUI
And as "Alice" the content of "simple-folder/new-lorem.txt" should be the same as the content of local file "new-lorem.txt"

@smokeTest
@smokeTest @disablePreviews
Copy link
Member Author

@saw-jan saw-jan Aug 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#5652 (comment)
adding @disablePreviews makes the test pass. It seems that @disablePreviews tag reduces locking issue

Scenario: overwrite an existing file
When the user uploads overwriting file "lorem.txt" using the webUI
Then no message should be displayed on the webUI
Expand Down Expand Up @@ -148,7 +148,7 @@ Feature: File Upload
And file "lorem (2).txt" should be listed on the webUI
And as "Alice" the content of "lorem (2).txt" should be the same as the content of local file "lorem.txt"

@issue-ocis-2258
@issue-ocis-2258 @disablePreviews
Scenario: upload overwriting a file into a public share
Given user "Alice" has shared folder "simple-folder" with link with "read, update, create, delete" permissions and password "pass123"
When the public uses the webUI to access the last public link created by user "Alice" with password "pass123"
Expand Down
20 changes: 10 additions & 10 deletions tests/acceptance/stepDefinitions/generalContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,26 +143,26 @@ Then(

Then(
'as {string} the content of {string} should not be the same as the content of local file {string}',
function(userId, remoteFile, localFile) {
async function(userId, remoteFile, localFile) {
const fullPathOfLocalFile = client.globals.filesForUpload + localFile
return webdavHelper
.download(userId, remoteFile)
.then(body => assertContentOfLocalFileIsNot(fullPathOfLocalFile, body))
const body = await webdavHelper.download(userId, remoteFile)

assertContentOfLocalFileIsNot(fullPathOfLocalFile, body)
}
)

const assertContentOfLocalFileIs = function(fullPathOfLocalFile, expectedContent) {
const actualContent = fs.readFileSync(fullPathOfLocalFile, { encoding: 'utf-8' })
return client.assert.strictEqual(
const assertContentOfLocalFileIs = function(fullPathOfLocalFile, actualContent) {
const expectedContent = fs.readFileSync(fullPathOfLocalFile, { encoding: 'utf-8' })
return assert.strictEqual(
Comment on lines -154 to +156
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using node assert instead of nightwatchjs

actualContent,
expectedContent,
'asserting content of local file "' + fullPathOfLocalFile + '"'
)
}

const assertContentOfLocalFileIsNot = function(fullPathOfLocalFile, expectedContent) {
const actualContent = fs.readFileSync(fullPathOfLocalFile, { encoding: 'utf-8' })
return client.assert.notEqual(
const assertContentOfLocalFileIsNot = function(fullPathOfLocalFile, actualContent) {
const expectedContent = fs.readFileSync(fullPathOfLocalFile, { encoding: 'utf-8' })
return assert.notStrictEqual(
actualContent,
expectedContent,
'asserting content of local file "' + fullPathOfLocalFile + '"'
Expand Down