Skip to content

Commit

Permalink
using the work around for clearing a text while running in linux server
Browse files Browse the repository at this point in the history
  • Loading branch information
Naresh Sekar committed Jul 26, 2020
1 parent 3658bb9 commit 4befc41
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/pageobjects/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,10 @@ module.exports = class Page {
open(path='') {
return browser.url(config.url + path);
}

emptyTextField(element) {
const valueLength = element.getValue().length;
const backSpaces = new Array(valueLength).fill('Backspace');
element.setValue(backSpaces);
}
};
2 changes: 2 additions & 0 deletions test/pageobjects/workspace.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class WorkSpace extends Page {
this.workspaceMoreOptionsButton(count).click();
this.workspaceRename.click();
assert.equal(this.newWorkspaceCreateNewWorkspaceButton.isEnabled(), false, 'Save button is not disabled before editing the values');
super.emptyTextField(this.newWorkspaceName);
this.newWorkspaceName.clearValue();
this.newWorkspaceName.setValue(name);
this.newWorkspaceCreateNewWorkspaceButton.click();
Expand All @@ -129,6 +130,7 @@ class WorkSpace extends Page {
this.workspaceMoreOptionsButton(count).click();
this.workspaceEditDescription.click();
assert.equal(this.newWorkspaceCreateNewWorkspaceButton.isEnabled(), false, 'Save button is not disabled before editing the values');
super.emptyTextField(this.newWorkspaceSummary);
this.newWorkspaceSummary.clearValue();
this.newWorkspaceSummary.setValue(description);
this.newWorkspaceCreateNewWorkspaceButton.click();
Expand Down

0 comments on commit 4befc41

Please sign in to comment.