Skip to content

Commit

Permalink
Add @disablePreview tag to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
saw-jan committed Aug 12, 2021
1 parent 98f4b41 commit d825216
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
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=e4b7c633cd76ee1dbe2f85c43f4608ae230c9181
OCIS_COMMITID=eb0b805b639172d63c5510dad221235b54e8936d
OCIS_BRANCH=master

# The test runner source for API tests
CORE_COMMITID=bafc216216471439b15a1cfbeffcf612406177ce
CORE_COMMITID=872358a4d06c8d2f3568bf8c170ec66a6d69d9af
CORE_BRANCH=master
2 changes: 1 addition & 1 deletion 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
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
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(
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

0 comments on commit d825216

Please sign in to comment.