Update preview image generation. Update unit tests.
[bookreader.git] / BookReaderIA / test / unit / JSLocate.js
1 // Tests for BookReaderJSLocate.php
2
3 // Depends on common.js
4
5 module("JSLocate");
6
7 asyncTest("JSLocate for notesonsubmarine00grea", function() {
8     expect(1);
9     $.getScript( jsLocateURL('notesonsubmarine00grea'),
10         function(data, textStatus) {
11             equals(window.br.titleLeaf, 5, 'Metadata loaded.  See https://bugs.launchpad.net/bookreader/+bug/517424. Title leaf');
12             start();
13         }
14     );
15 });
16
17 asyncTest("JSLocate for photographingclo00carprich", function() {
18     expect(1);
19     $.getScript( jsLocateURL('photographingclo00carprich'),
20         function(data, textStatus) {
21             equals(window.br.bookTitle, 'Photographing clouds from an airplane',  'Title of book');
22             start();
23         }
24     );
25 });
26
27 asyncTest("JSLocate for salmoncookbookho00panaiala", function() {
28     expect(1);
29     $.getScript( jsLocateURL('salmoncookbookho00panaiala'),
30         function(data, textStatus) {
31             equals(window.br.numLeafs, 40,  'Number of pages');
32             start();
33         }
34     );
35 });