@echo "Examples: "
@echo ""
@echo "make phantomjs PHANTOMJS_PATH=${PHANTOMJS_PATH}"
- @echo "DEBUG=0 APACHE_PORT=5050 make -s phantomjs PHANTOMJS_TIMEOUT=12 PHANTOMJS_PATH=${PHANTOMJS_PATH}"
+ @echo "DEBUG=0 APACHE_PORT=5050 make -s phantomjs PHANTOMJS_TIMEOUT=16 PHANTOMJS_PATH=${PHANTOMJS_PATH}"
@echo "DEBUG=2 make phantomjs PHANTOMJS_TIMEOUT=12 PHANTOMJS_URL=${PHANTOMJS_URL}"
@echo ""
@echo "make APACHE_PORT=5050 apache-start"
$SIG{ALRM} = sub {
my $pgid = getpgrp();
+ warn "Alarm handler got called after $timeout seconds\n";
+ warn "Kill now the process group...\n\n";
+
# kill process group
kill "INT", -$pgid;
};
--- /dev/null
+/* Copyright (c) 2013 Index Data ApS. http://indexdata.com
+ *
+ * async check
+ *
+ */
+describe("Asynchronous check", function () {
+ it("contains spec with an expectation", function () {
+ expect(true).toBe(true);
+ });
+
+ // Asynchronous part
+ it("simple check", function () {
+ var max_time = 1;
+ var timer = 0;
+
+ function found(time, none) {
+ setTimeout(function () {
+ timer = time;
+ }, time * 1000);
+ expect(time >= 0).toBeTruthy();
+ }
+
+ runs(function () {
+ // check hit counter after N seconds
+ found(0, true);
+ found(0.2);
+ found(0.4);
+ found(0.5);
+ found(0.7);
+ found(max_time);
+ });
+
+ waitsFor(function () {
+ // console.log("waits for ... " + timer);
+ return timer == max_time ? true : false;
+ }, "The Value should be N seconds", max_time * 1000);
+
+ runs(function () {
+ expect(timer).toEqual(max_time);
+ });
+ });
+
+
+ it("double async check", function () {
+ var max_time = 0.5;
+ var timer = 0;
+
+ function found(time, none) {
+ setTimeout(function () {
+ timer = time;
+ }, time * 1000);
+ expect(time >= 0).toBeTruthy();
+ }
+
+ runs(function () {
+ found(0);
+ found(0.2);
+ found(max_time - 0.1);
+ });
+
+ waitsFor(function () {
+ return timer == max_time - 0.1 ? true : false;
+ }, "The Value should be N seconds", max_time * 1000);
+
+ runs(function () {
+ expect(timer <= max_time).toBeTruthy();
+ });
+
+ timer = 0;
+ runs(function () {
+ found(0.1);
+ found(max_time);
+ });
+
+ waitsFor(function () {
+ // console.log("waits for ... " + timer);
+ return timer == max_time ? true : false;
+ }, "The Value should be N seconds", max_time * 1000);
+
+ runs(function () {
+ expect(timer <= max_time).toBeTruthy();
+ });
+ });
+
+});
+++ /dev/null
-/* Copyright (c) 2013 Index Data ApS. http://indexdata.com
- *
- * async check
- *
- */
-describe("Asynchronous check", function () {
- it("contains spec with an expectation", function () {
- expect(true).toBe(true);
- });
-
- // Asynchronous part
- it("simple check", function () {
- var max_time = 1;
- var timer = 0;
-
- function found(time, none) {
- setTimeout(function () {
- timer = time;
- }, time * 1000);
- expect(time >= 0).toBeTruthy();
- }
-
- runs(function () {
- // check hit counter after N seconds
- found(0, true);
- found(0.2);
- found(0.4);
- found(0.5);
- found(0.7);
- found(max_time);
- });
-
- waitsFor(function () {
- // console.log("waits for ... " + timer);
- return timer == max_time ? true : false;
- }, "The Value should be N seconds", max_time * 1000);
-
- runs(function () {
- expect(timer).toEqual(max_time);
- });
- });
-
-
- it("double async check", function () {
- var max_time = 0.5;
- var timer = 0;
-
- function found(time, none) {
- setTimeout(function () {
- timer = time;
- }, time * 1000);
- expect(time >= 0).toBeTruthy();
- }
-
- runs(function () {
- found(0);
- found(0.2);
- found(max_time - 0.1);
- });
-
- waitsFor(function () {
- return timer == max_time - 0.1 ? true : false;
- }, "The Value should be N seconds", max_time * 1000);
-
- runs(function () {
- expect(timer <= max_time).toBeTruthy();
- });
-
- timer = 0;
- runs(function () {
- found(0.1);
- found(max_time);
- });
-
- waitsFor(function () {
- // console.log("waits for ... " + timer);
- return timer == max_time ? true : false;
- }, "The Value should be N seconds", max_time * 1000);
-
- runs(function () {
- expect(timer <= max_time).toBeTruthy();
- });
- });
-
-});
var waitcount = 0;
var sort_value = 'title:1';
var per_page_number = 20;
+
+ // keep current title list
var title_list_old = title_list("xxx ");
function title_list(prefix) {
var list = [];
- var terms = $("div.mkws-records > div.mkws-summary");
+ var terms = $("div.mkws-records > div.mkws-summary > div.mkws-field-data span.mkws-field-title");
for (var i = 0; i < terms.length; i++) {
var term = $(terms[i]).text().trim();
list.push(term);