Skip to content

Commit

Permalink
Fix errors running Nightwatch's execute()
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio-Maranhao authored and big-r81 committed Jun 3, 2024
1 parent a293226 commit 62bc992
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion app/addons/databases/tests/nightwatch/deletesDatabase.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module.exports = {
.assert.elementPresent('a[href="database/' + newDatabaseName + '/_all_docs"]')

.waitForElementPresent('button[aria-label="Delete ' + newDatabaseName + '"]', waitTime, false)
.execute('button[aria-label="Delete ' + newDatabaseName + '"]").scrollIntoView();')
.execute(`document.querySelector("button[aria-label='Delete ${newDatabaseName}']").scrollIntoView();`)
.clickWhenVisible('button[aria-label="Delete ' + newDatabaseName + '"]', waitTime, false)

.waitForElementVisible('.delete-db-modal', waitTime, false)
Expand Down
2 changes: 1 addition & 1 deletion app/addons/documents/tests/nightwatch/deletesDocuments.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ module.exports = {
.clickWhenVisible('input[id="checkbox-_design/sidebar-update"][type="checkbox"]', waitTime, false)

.waitForElementPresent('.bulk-action-component-selector-group button.toolbar-btn[icon="fonticon-trash"]', waitTime, false)
.execute('document.querySelector(".bulk-action-component-selector-group button.toolbar-btn[icon="fonticon-trash"]").scrollIntoView();')
.execute('document.querySelector(".bulk-action-component-selector-group button.toolbar-btn[icon=\'fonticon-trash\']").scrollIntoView();')
.clickWhenVisible('.bulk-action-component-selector-group button.toolbar-btn[icon="fonticon-trash"]')
.acceptAlert()

Expand Down
48 changes: 24 additions & 24 deletions app/addons/replication/tests/nightwatch/replicationactivity.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ module.exports = {

const replicatorDoc = {
_id: 'existing-doc-id-view-doc',
source: "http://source-db.com",
target: "http://target-db.com"
source: "https://source-db.com",
target: "https://target-db.com"
};
client
.deleteDatabase('_replicator')
Expand All @@ -43,8 +43,8 @@ module.exports = {

const replicatorDoc = {
_id: 'existing-doc-id-edit-doc',
source: "http://source-db.com",
target: "http://target-db.com"
source: "https://source-db.com",
target: "https://target-db.com"
};
client
.deleteDatabase('_replicator')
Expand All @@ -68,14 +68,14 @@ module.exports = {

const replicatorDoc1 = {
_id: 'existing-doc-id-filter1',
source: "http://source-db.com",
target: "http://target-db.com"
source: "https://source-db.com",
target: "https://target-db.com"
};

const replicatorDoc2 = {
_id: 'existing-doc-filter2',
source: "http://source-db2.com",
target: "http://target-db.com"
source: "https://source-db2.com",
target: "https://target-db.com"
};
client
.deleteDatabase('_replicator')
Expand All @@ -102,14 +102,14 @@ module.exports = {

const replicatorDoc1 = {
_id: 'existing-doc-id-filter1',
source: "http://source-db.com",
target: "http://target-db.com"
source: "https://source-db.com",
target: "https://target-db.com"
};

const replicatorDoc2 = {
_id: 'existing-doc-filter2',
source: "http://source-db2.com",
target: "http://target-db.com"
source: "https://source-db2.com",
target: "https://target-db.com"
};
client
.deleteDatabase('_replicator')
Expand Down Expand Up @@ -139,38 +139,38 @@ module.exports = {

const replicatorDoc1 = {
_id: 'existing-doc-id-display',
source: "http://source-db.com",
target: "http://target-db.com"
source: "https://source-db.com",
target: "https://target-db.com"
};

const replicatorDoc2 = {
_id: 'existing-doc-id-display2',
source: "http://source-db2.com",
target: "http://target-db.com"
source: "https://source-db2.com",
target: "https://target-db.com"
};

const replicatorDoc3 = {
_id: 'existing-doc-id-display3',
source: "http://source-db3.com",
target: "http://target-db.com"
source: "https://source-db3.com",
target: "https://target-db.com"
};

const replicatorDoc4 = {
_id: 'existing-doc-id-display4',
source: "http://source-db4.com",
target: "http://target-db.com"
source: "https://source-db4.com",
target: "https://target-db.com"
};

const replicatorDoc5 = {
_id: 'existing-doc-id-display5',
source: "http://source-db5.com",
target: "http://target-db.com"
source: "https://source-db5.com",
target: "https://target-db.com"
};

const replicatorDoc6 = {
_id: 'existing-doc-id-display6',
source: "http://source-db6.com",
target: "http://target-db.com"
source: "https://source-db6.com",
target: "https://target-db.com"
};

client
Expand Down

0 comments on commit 62bc992

Please sign in to comment.