couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject fauxton commit: updated refs/heads/master to 96f99b7
Date Wed, 19 Nov 2014 12:25:11 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master c1e01b8c2 -> 96f99b7c2


bulkdelete: add basic integration test

This adds a basic integration test for bulk-deletion of docs

COUCHDB-2462


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/96f99b7c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/96f99b7c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/96f99b7c

Branch: refs/heads/master
Commit: 96f99b7c291a75c671e6016105ff8522220667bf
Parents: c1e01b8
Author: Robert Kowalski <robertkowalski@apache.org>
Authored: Tue Nov 18 17:17:21 2014 +0100
Committer: Robert Kowalski <robertkowalski@apache.org>
Committed: Wed Nov 19 13:19:11 2014 +0100

----------------------------------------------------------------------
 .../documents/tests/nightwatch/bulkDelete.js    | 38 ++++++++++++++++++++
 1 file changed, 38 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/96f99b7c/app/addons/documents/tests/nightwatch/bulkDelete.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/bulkDelete.js b/app/addons/documents/tests/nightwatch/bulkDelete.js
new file mode 100644
index 0000000..0c1db41
--- /dev/null
+++ b/app/addons/documents/tests/nightwatch/bulkDelete.js
@@ -0,0 +1,38 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+module.exports = {
+  'Bulk deletes': function (client) {
+    var waitTime = 10000,
+        newDatabaseName = client.globals.testDatabaseName,
+        newDocumentName1 = 'bulktest1',
+        newDocumentName2 = 'bulktest2',
+        baseUrl = client.globals.baseUrl;
+
+    client
+      .loginToGUI()
+      .url(baseUrl + '/#/database/' + newDatabaseName + '/_all_docs')
+      .waitForElementPresent('.all', waitTime, false)
+      .click('.all')
+      .click('.js-bulk-delete')
+      .getText('body', function (result) {
+        var data = result.value,
+            isPresentFirstDoc = data.indexOf(newDocumentName1) !== -1,
+            isPresentSecondDoc = data.indexOf(newDocumentName2) !== -1,
+            bothMissing = !isPresentFirstDoc && !isPresentSecondDoc;
+
+        this.verify.ok(bothMissing,
+          'Checking if documents were deleted');
+      })
+      .end();
+  }
+};


Mime
View raw message