Skip to content

Commit

Permalink
Merge pull request #3059 from Talank/fixErrorMessageTestCode
Browse files Browse the repository at this point in the history
[Tests-only] addressing issue 3055
  • Loading branch information
kiranparajuli589 authored Feb 19, 2020
2 parents 3add97e + d22ab12 commit 7547172
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ Feature: create files

Scenario: try to create a file that already exists
When the user tries to create a file with already existing name "lorem.txt" using the webUI
Then an error message "lorem.txt already exists" should be visible
Then the error message "lorem.txt already exists" should be displayed on the webUI dialog prompt
And the create file button should be disabled
10 changes: 0 additions & 10 deletions tests/acceptance/pageObjects/filesPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,6 @@ module.exports = {
.waitForElementVisible('@newFileInput')
.setValue('@newFileInput', fileName)
},
waitForErrorMessage: function (callback) {
return this.waitForElementVisible('@fileAlreadyExistAlert')
.getText('@fileAlreadyExistAlert', result => {
return callback(result.value)
})
},
checkForButtonDisabled: function () {
return this.waitForElementVisible('@createFileOkButtonDisabled')
},
Expand Down Expand Up @@ -342,10 +336,6 @@ module.exports = {
selector: "//div[@id='new-file-dialog']//span[contains(text(),'Ok')]",
locateStrategy: 'xpath'
},
fileAlreadyExistAlert: {
selector: "//div[@id='new-file-dialog']//div[contains(@class, 'alert-danger')]",
locateStrategy: 'xpath'
},
permalinkCopyButton: {
selector: '#files-permalink-copy'
},
Expand Down
6 changes: 0 additions & 6 deletions tests/acceptance/stepDefinitions/filesContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -796,12 +796,6 @@ When('the user tries to create a file with already existing name {string} using
return client.page.filesPage().triesToCreateExistingFile(fileName)
})

Then('an error message {string} should be visible', function (errorMessage) {
return client.page.filesPage().waitForErrorMessage((exactErrorMessage) => {
assert.strictEqual(errorMessage, exactErrorMessage)
})
})

Then('the create file button should be disabled', function () {
return client.page.filesPage().checkForButtonDisabled()
})
Expand Down

0 comments on commit 7547172

Please sign in to comment.