Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F176B10AA6 for ; Wed, 19 Nov 2014 12:25:12 +0000 (UTC) Received: (qmail 61278 invoked by uid 500); 19 Nov 2014 12:25:12 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 61233 invoked by uid 500); 19 Nov 2014 12:25:12 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 61224 invoked by uid 99); 19 Nov 2014 12:25:12 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Nov 2014 12:25:12 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id C392C9AAFAA; Wed, 19 Nov 2014 12:25:11 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: robertkowalski@apache.org To: commits@couchdb.apache.org Message-Id: <6c092a52be3f40abac22a63c4fd6cbb6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: fauxton commit: updated refs/heads/master to 96f99b7 Date: Wed, 19 Nov 2014 12:25:11 +0000 (UTC) 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 Authored: Tue Nov 18 17:17:21 2014 +0100 Committer: Robert Kowalski 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(); + } +};