From 5aa89fd6af8391d239c9a53115c0496a2a4db682 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 13 Oct 2015 18:21:23 -0400 Subject: [PATCH] casper: Move common.js and test-credentials.js to casper-lib/. --- frontend_tests/{casper_tests => casper_lib}/.gitignore | 0 frontend_tests/{ => casper_lib}/common.js | 2 +- frontend_tests/casper_tests/00-login.js | 2 +- frontend_tests/casper_tests/01-site.js | 2 +- frontend_tests/casper_tests/02-narrow.js | 2 +- frontend_tests/casper_tests/03-compose.js | 2 +- frontend_tests/casper_tests/04-subscriptions.js | 2 +- frontend_tests/casper_tests/05-settings.js | 4 ++-- frontend_tests/casper_tests/07-stars.js | 2 +- frontend_tests/casper_tests/09-edit.js | 2 +- frontend_tests/casper_tests/10-navigation.js | 2 +- tools/generate-test-credentials | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) rename frontend_tests/{casper_tests => casper_lib}/.gitignore (100%) rename frontend_tests/{ => casper_lib}/common.js (98%) diff --git a/frontend_tests/casper_tests/.gitignore b/frontend_tests/casper_lib/.gitignore similarity index 100% rename from frontend_tests/casper_tests/.gitignore rename to frontend_tests/casper_lib/.gitignore diff --git a/frontend_tests/common.js b/frontend_tests/casper_lib/common.js similarity index 98% rename from frontend_tests/common.js rename to frontend_tests/casper_lib/common.js index 990d9c19d7..cde4328cad 100644 --- a/frontend_tests/common.js +++ b/frontend_tests/casper_lib/common.js @@ -2,7 +2,7 @@ var common = (function () { var exports = {}; -var test_credentials = require('../test_credentials.js').test_credentials; +var test_credentials = require('../casper_lib/test_credentials.js').test_credentials; function timestamp() { return new Date().getTime(); diff --git a/frontend_tests/casper_tests/00-login.js b/frontend_tests/casper_tests/00-login.js index f709bf7626..c085c5a310 100644 --- a/frontend_tests/casper_tests/00-login.js +++ b/frontend_tests/casper_tests/00-login.js @@ -1,4 +1,4 @@ -var common = require('../common.js').common; +var common = require('../casper_lib/common.js').common; // Start of test script. casper.start('http://localhost:9981/', common.initialize_casper); diff --git a/frontend_tests/casper_tests/01-site.js b/frontend_tests/casper_tests/01-site.js index 9b2f57fabb..5fe9fb2a6c 100644 --- a/frontend_tests/casper_tests/01-site.js +++ b/frontend_tests/casper_tests/01-site.js @@ -10,7 +10,7 @@ // For example, utils.dump() prints an Object with nice formatting. var utils = require('utils'); -var common = require('../common.js').common; +var common = require('../casper_lib/common.js').common; common.start_and_log_in(); diff --git a/frontend_tests/casper_tests/02-narrow.js b/frontend_tests/casper_tests/02-narrow.js index 7e49ca9948..844d6d7d0f 100644 --- a/frontend_tests/casper_tests/02-narrow.js +++ b/frontend_tests/casper_tests/02-narrow.js @@ -1,4 +1,4 @@ -var common = require('../common.js').common; +var common = require('../casper_lib/common.js').common; common.start_and_log_in(); diff --git a/frontend_tests/casper_tests/03-compose.js b/frontend_tests/casper_tests/03-compose.js index 309c62713e..33b4826305 100644 --- a/frontend_tests/casper_tests/03-compose.js +++ b/frontend_tests/casper_tests/03-compose.js @@ -1,4 +1,4 @@ -var common = require('../common.js').common; +var common = require('../casper_lib/common.js').common; common.start_and_log_in(); diff --git a/frontend_tests/casper_tests/04-subscriptions.js b/frontend_tests/casper_tests/04-subscriptions.js index 8d18bbe4f2..f9670b65b4 100644 --- a/frontend_tests/casper_tests/04-subscriptions.js +++ b/frontend_tests/casper_tests/04-subscriptions.js @@ -1,4 +1,4 @@ -var common = require('../common.js').common; +var common = require('../casper_lib/common.js').common; common.start_and_log_in(); diff --git a/frontend_tests/casper_tests/05-settings.js b/frontend_tests/casper_tests/05-settings.js index 7ec12c140a..8f61d69c4a 100644 --- a/frontend_tests/casper_tests/05-settings.js +++ b/frontend_tests/casper_tests/05-settings.js @@ -1,5 +1,5 @@ -var common = require('../common.js').common; -var test_credentials = require('./test_credentials.js').test_credentials; +var common = require('../casper_lib/common.js').common; +var test_credentials = require('../casper_lib/test_credentials.js').test_credentials; common.start_and_log_in(); diff --git a/frontend_tests/casper_tests/07-stars.js b/frontend_tests/casper_tests/07-stars.js index 90025db18a..927651dc63 100644 --- a/frontend_tests/casper_tests/07-stars.js +++ b/frontend_tests/casper_tests/07-stars.js @@ -1,4 +1,4 @@ -var common = require('../common.js').common; +var common = require('../casper_lib/common.js').common; function star_count() { return casper.evaluate(function () { diff --git a/frontend_tests/casper_tests/09-edit.js b/frontend_tests/casper_tests/09-edit.js index 534d984fa0..818e8954fa 100644 --- a/frontend_tests/casper_tests/09-edit.js +++ b/frontend_tests/casper_tests/09-edit.js @@ -1,4 +1,4 @@ -var common = require('../common.js').common; +var common = require('../casper_lib/common.js').common; common.start_and_log_in(); diff --git a/frontend_tests/casper_tests/10-navigation.js b/frontend_tests/casper_tests/10-navigation.js index 6757b9fd3f..b5c29e20f3 100644 --- a/frontend_tests/casper_tests/10-navigation.js +++ b/frontend_tests/casper_tests/10-navigation.js @@ -1,4 +1,4 @@ -var common = require('../common.js').common; +var common = require('../casper_lib/common.js').common; // Test basic tab navigation. diff --git a/tools/generate-test-credentials b/tools/generate-test-credentials index 5c39cf62ab..5c25eebebf 100755 --- a/tools/generate-test-credentials +++ b/tools/generate-test-credentials @@ -5,7 +5,7 @@ cd "$(dirname "$0")"/.. email=iago@zulip.com password=$(python manage.py print_initial_password "$email" | fgrep "$email" | awk '{ print $2 }') -cat > frontend_tests/casper_tests/test_credentials.js < frontend_tests/casper_lib/test_credentials.js <