Fix automation errors.

pull/37/head
Jonathan Frederic 12 years ago committed by Jonathan Frederic
parent d88daf1bb7
commit 329a387f4f

@ -300,7 +300,7 @@ class APITest(NotebookTestBase):
saved = resp.json()
self.assertEqual(saved['name'], 'a2.ipynb')
self.assertEqual(saved['path'], 'foo/bar')
assert os.path.isfile(pjoin(self.notebook_dir.name,'foo','progress-bar','a2.ipynb'))
assert os.path.isfile(pjoin(self.notebook_dir.name,'foo','bar','a2.ipynb'))
assert not os.path.isfile(pjoin(self.notebook_dir.name, 'foo', 'a.ipynb'))
with assert_http_error(404):
self.nb_api.read('a.ipynb', 'foo')

@ -20,7 +20,7 @@
* $([IPython.events]).on('app_initialized.NotebookApp', function(){
* IPython.toolbar.add_buttons_group([
* {
* 'label label-default' : 'run qtconsole',
* 'label' : 'run qtconsole',
* 'icon' : 'icon-terminal', // select your icon from http://fortawesome.github.io/Font-Awesome/icons
* 'callback': function () {
* IPython.notebook.kernel.execute('%qtconsole')

@ -144,7 +144,7 @@ var IPython = (function (IPython) {
* button.click(function(){
* var v = cell.metadata.foo;
* cell.metadata.foo = !v;
* button.button("option", "label label-default", String(!v));
* button.button("option", "label", String(!v));
* })
*
* // add the button to the DOM div.

@ -64,7 +64,7 @@
button.click(function(){
var v = cell.metadata.foo;
cell.metadata.foo = !v;
button.button("option","label label-default",String(!v));
button.button("option","label",String(!v));
})
button_container.append(button);
}

@ -116,9 +116,9 @@ var tour_style = "<div class='popover tour' style='position:relative'>\
<h3 class='popover-title'></h3>\
<div class='popover-content'></div>\
<div class='popover-navigation'>\
<button class='btn btn-default btn-default icon-step-backward' data-role='prev'></button>\
<button class='btn btn-default btn-default icon-step-forward pull-right' data-role='next'></button>\
<button id='tour-pause' class='btn btn-default btn-sm btn-default icon-pause' data-resume-text='' data-pause-text='' data-role='pause-resume'></button>\
<button class='btn btn-default icon-step-backward' data-role='prev'></button>\
<button class='btn btn-default icon-step-forward pull-right' data-role='next'></button>\
<button id='tour-pause' class='btn btn-sm btn-default icon-pause' data-resume-text='' data-pause-text='' data-role='pause-resume'></button>\
</div>\
</div>";

@ -15,7 +15,7 @@
padding: 0px;
padding-top: 3px;
}
.btn.btn-default {
.btn {
padding: 2px 8px;
}
}

@ -265,7 +265,7 @@ var IPython = (function (IPython) {
NotebookList.prototype.add_shutdown_button = function (item, session) {
var that = this;
var shutdown_button = $("<button/>").text("Shutdown").addClass("btn btn-default btn-xs btn-danger").
var shutdown_button = $("<button/>").text("Shutdown").addClass("btn btn-xs btn-danger").
click(function (e) {
var settings = {
processData : false,
@ -339,7 +339,7 @@ var IPython = (function (IPython) {
NotebookList.prototype.add_upload_button = function (item) {
var that = this;
var upload_button = $('<button/>').text("Upload")
.addClass('btn btn-default btn-primary btn-xs upload_button')
.addClass('btn btn-primary btn-xs upload_button')
.click(function (e) {
var nbname = item.find('.item_name > input').val();
if (nbname.slice(nbname.length-6, nbname.length) != ".ipynb") {

@ -165,7 +165,7 @@ define(["widgets/js/widget"], function(WidgetManager) {
this.$show_button = $('<button />')
.html("&nbsp;")
.addClass('btn btn-default btn-info widget-modal-show')
.addClass('btn btn-info widget-modal-show')
.appendTo(this.$el)
.click(function(){
that.show();

@ -31,7 +31,7 @@ casper.notebook_test(function () {
this.test.assert(this.cell_element_exists(index,
'.widget-area .widget-subarea .widget-hbox-single .widget-hlabel'),
'Checkbox label label-default exists.');
'Checkbox label exists.');
this.test.assert(this.cell_element_function(index,
'.widget-area .widget-subarea .widget-hbox-single .widget-hlabel', 'html')=="Title",

@ -15,7 +15,7 @@ casper.notebook_test(function () {
var selection_values = 'abcd';
var check_state = function(context, index, state){
if (0 <= index && index < selection_values.length) {
var multibtn_state = context.cell_element_function(selection_index, multibtn_selector + ' .btn.btn-default:nth-child(' + (index + 1) + ')', 'hasClass', ['active']);
var multibtn_state = context.cell_element_function(selection_index, multibtn_selector + ' .btn:nth-child(' + (index + 1) + ')', 'hasClass', ['active']);
var radio_state = context.cell_element_function(selection_index, radio_selector + ' .radio:nth-child(' + (index + 1) + ') input', 'prop', ['checked']);
var list_val = context.cell_element_function(selection_index, list_selector, 'val');
var combo_val = context.cell_element_function(selection_index, combo_selector, 'html');
@ -105,7 +105,7 @@ casper.notebook_test(function () {
this.test.assert(verify_selection(this, 2), 'List selection updated view states correctly.');
// Verify that selecting a multibutton option updates all of the others.
this.cell_element_function(selection_index, multibtn_selector + ' .btn.btn-default:nth-child(4)', 'click');
this.cell_element_function(selection_index, multibtn_selector + ' .btn:nth-child(4)', 'click');
});
this.wait_for_idle();
this.then(function () {

@ -83,11 +83,11 @@ casper.notebook_test(function () {
'Widget subarea exists.');
this.test.assert(this.cell_element_exists(index, multicontainer2_query),
'Widget panel-group exists.');
'Widget accordion exists.');
this.test.assert(this.cell_element_exists(index, multicontainer2_query +
' .panel.panel-default:nth-child(1) .panel-collapse'),
'First panel-group page exists.');
' .panel:nth-child(1) .panel-collapse'),
'First accordion page exists.');
// JQuery selector is 1 based
this.test.assert(this.cell_element_function(index, multicontainer2_query +
@ -95,7 +95,7 @@ casper.notebook_test(function () {
'html')=='good', 'Accordion page title set (before display).');
// JQuery selector is 1 based
this.click(multicontainer2_query + ' .panel.panel-default:nth-child(2) .panel-heading .accordion-toggle');
this.click(multicontainer2_query + ' .panel:nth-child(2) .panel-heading .accordion-toggle');
});
this.wait_for_idle();
@ -106,7 +106,7 @@ casper.notebook_test(function () {
'selected_index property updated with tab change.');
var is_collapsed = this.evaluate(function(s){
return $(s + ' div.panel.panel-default:nth-child(2) a').hasClass('collapsed'); // 1 based
return $(s + ' div.panel:nth-child(2) a').hasClass('collapsed'); // 1 based
}, {s: multicontainer2_query});
this.test.assertEquals(is_collapsed, false, 'Was tab actually opened?');
});

Loading…
Cancel
Save