mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
test unicode path in dashboard_nav
This commit is contained in:
parent
13fc9022d9
commit
7cb4321bfe
@ -18,9 +18,12 @@ casper.test_items = function (baseUrl) {
|
||||
if (!item.label.match('.ipynb$')) {
|
||||
var followed_url = baseUrl+item.link;
|
||||
if (!followed_url.match('/\.\.$')) {
|
||||
casper.thenOpen(baseUrl+item.link, function () {
|
||||
casper.thenOpen(followed_url, function () {
|
||||
casper.wait_for_dashboard();
|
||||
this.test.assertEquals(this.getCurrentUrl(), followed_url, 'Testing dashboard link: '+followed_url);
|
||||
// getCurrentUrl is with host, and url-decoded,
|
||||
// but item.link is without host, and url-encoded
|
||||
var expected = baseUrl + decodeURIComponent(item.link);
|
||||
this.test.assertEquals(this.getCurrentUrl(), expected, 'Testing dashboard link: ' + expected);
|
||||
casper.test_items(baseUrl);
|
||||
this.back();
|
||||
});
|
||||
@ -31,7 +34,7 @@ casper.test_items = function (baseUrl) {
|
||||
}
|
||||
|
||||
casper.dashboard_test(function () {
|
||||
baseUrl = this.get_notebook_server()
|
||||
baseUrl = this.get_notebook_server();
|
||||
casper.test_items(baseUrl);
|
||||
})
|
||||
|
||||
|
@ -181,8 +181,8 @@ class JSController(TestController):
|
||||
self.ipydir = TemporaryDirectory()
|
||||
self.nbdir = TemporaryDirectory()
|
||||
print("Running notebook tests in directory: %r" % self.nbdir.name)
|
||||
os.makedirs(os.path.join(self.nbdir.name, os.path.join('subdir1', 'subdir1a')))
|
||||
os.makedirs(os.path.join(self.nbdir.name, os.path.join('subdir2', 'subdir2a')))
|
||||
os.makedirs(os.path.join(self.nbdir.name, os.path.join(u'sub ∂ir1', u'sub ∂ir 1a')))
|
||||
os.makedirs(os.path.join(self.nbdir.name, os.path.join(u'sub ∂ir2', u'sub ∂ir 1b')))
|
||||
self.dirs.append(self.ipydir)
|
||||
self.dirs.append(self.nbdir)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user