From 3321241b61766045a68a3d607b67e11a95014e87 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Thu, 20 Feb 2014 12:44:49 +0200 Subject: Require logins, removed jquery UI --- .../static/js/ui/tests/unit/progressbar/all.html | 30 --------- .../js/ui/tests/unit/progressbar/progressbar.html | 44 ------------- .../tests/unit/progressbar/progressbar_common.js | 12 ---- .../ui/tests/unit/progressbar/progressbar_core.js | 53 ---------------- .../tests/unit/progressbar/progressbar_events.js | 51 --------------- .../tests/unit/progressbar/progressbar_methods.js | 25 -------- .../tests/unit/progressbar/progressbar_options.js | 72 ---------------------- 7 files changed, 287 deletions(-) delete mode 100644 apps/it/static/js/ui/tests/unit/progressbar/all.html delete mode 100644 apps/it/static/js/ui/tests/unit/progressbar/progressbar.html delete mode 100644 apps/it/static/js/ui/tests/unit/progressbar/progressbar_common.js delete mode 100644 apps/it/static/js/ui/tests/unit/progressbar/progressbar_core.js delete mode 100644 apps/it/static/js/ui/tests/unit/progressbar/progressbar_events.js delete mode 100644 apps/it/static/js/ui/tests/unit/progressbar/progressbar_methods.js delete mode 100644 apps/it/static/js/ui/tests/unit/progressbar/progressbar_options.js (limited to 'apps/it/static/js/ui/tests/unit/progressbar') diff --git a/apps/it/static/js/ui/tests/unit/progressbar/all.html b/apps/it/static/js/ui/tests/unit/progressbar/all.html deleted file mode 100644 index ed17c36..0000000 --- a/apps/it/static/js/ui/tests/unit/progressbar/all.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - jQuery UI Progressbar Test Suite - - - - - - - - - - - - - -

jQuery UI Progressbar Test Suite

-

-
-

-
    -
    - -
    - - diff --git a/apps/it/static/js/ui/tests/unit/progressbar/progressbar.html b/apps/it/static/js/ui/tests/unit/progressbar/progressbar.html deleted file mode 100644 index 70a4abe..0000000 --- a/apps/it/static/js/ui/tests/unit/progressbar/progressbar.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - jQuery UI Progressbar Test Suite - - - - - - - - - - - - - - - - - - -

    jQuery UI Progressbar Test Suite

    -

    -
    -

    -
      -
      - -
      - -
      - - diff --git a/apps/it/static/js/ui/tests/unit/progressbar/progressbar_common.js b/apps/it/static/js/ui/tests/unit/progressbar/progressbar_common.js deleted file mode 100644 index 0768576..0000000 --- a/apps/it/static/js/ui/tests/unit/progressbar/progressbar_common.js +++ /dev/null @@ -1,12 +0,0 @@ -TestHelpers.commonWidgetTests( "progressbar", { - defaults: { - disabled: false, - max: 100, - value: 0, - - //callbacks - change: null, - complete: null, - create: null - } -}); diff --git a/apps/it/static/js/ui/tests/unit/progressbar/progressbar_core.js b/apps/it/static/js/ui/tests/unit/progressbar/progressbar_core.js deleted file mode 100644 index 8f4a138..0000000 --- a/apps/it/static/js/ui/tests/unit/progressbar/progressbar_core.js +++ /dev/null @@ -1,53 +0,0 @@ -module( "progressbar: core" ); - -test( "markup structure", function() { - expect( 5 ); - var element = $( "#progressbar" ).progressbar(); - ok( element.hasClass( "ui-progressbar" ), "main element is .ui-progressbar" ); - ok( !element.hasClass( "ui-progressbar-indeterminate" ), - "main element is not .ui-progressbar-indeterminate" ); - equal( element.children().length, 1, "main element contains one child" ); - ok( element.children().eq( 0 ).hasClass( "ui-progressbar-value" ), - "child is .ui-progressbar-value" ); - equal( element.children().children().length, 0, "no overlay div" ); -}); - -test( "markup structure - indeterminate", function() { - expect( 5 ); - var element = $( "#progressbar" ).progressbar({ value: false }); - ok( element.hasClass( "ui-progressbar" ), "main element is .ui-progressbar" ); - ok( element.hasClass( "ui-progressbar-indeterminate" ), - "main element is .ui-progressbar-indeterminate" ); - equal( element.children().length, 1, "main element contains one child" ); - ok( element.children().eq( 0 ).hasClass( "ui-progressbar-value" ), - "child is .ui-progressbar-value" ); - equal( element.children().children( ".ui-progressbar-overlay" ).length, 1, - ".ui-progressbar-value has .ui-progressbar-overlay" ); -}); - -test( "accessibility", function() { - expect( 11 ); - var element = $( "#progressbar" ).progressbar(); - - equal( element.attr( "role" ), "progressbar", "aria role" ); - equal( element.attr( "aria-valuemin" ), 0, "aria-valuemin" ); - equal( element.attr( "aria-valuemax" ), 100, "aria-valuemax" ); - equal( element.attr( "aria-valuenow" ), 0, "aria-valuenow initially" ); - - element.progressbar( "value", 77 ); - equal( element.attr( "aria-valuenow" ), 77, "aria-valuenow" ); - - element.progressbar( "option", "max", 150 ); - equal( element.attr( "aria-valuemax" ), 150, "aria-valuemax" ); - - element.progressbar( "disable" ); - equal( element.attr( "aria-disabled" ), "true", "aria-disabled on" ); - - element.progressbar( "enable" ); - equal( element.attr( "aria-disabled" ), "false", "aria-disabled off" ); - - element.progressbar( "option", "value", false ); - equal( element.attr( "aria-valuemin" ), 0, "aria-valuemin" ); - equal( element.attr( "aria-valuemax" ), 150, "aria-valuemax" ); - strictEqual( element.attr( "aria-valuenow" ), undefined, "aria-valuenow" ); -}); diff --git a/apps/it/static/js/ui/tests/unit/progressbar/progressbar_events.js b/apps/it/static/js/ui/tests/unit/progressbar/progressbar_events.js deleted file mode 100644 index 95effda..0000000 --- a/apps/it/static/js/ui/tests/unit/progressbar/progressbar_events.js +++ /dev/null @@ -1,51 +0,0 @@ -module( "progressbar: events" ); - -test( "create", function() { - expect( 1 ); - $( "#progressbar" ).progressbar({ - value: 5, - create: function() { - equal( $( this ).progressbar( "value" ), 5, "Correct value at create" ); - }, - change: function() { - ok( false, "create has triggered change()" ); - } - }); -}); - -test( "change", function() { - expect( 2 ); - var element = $( "#progressbar" ).progressbar(); - - element.one( "progressbarchange", function() { - equal( element.progressbar( "value" ), 5, "change triggered for middle value" ); - }); - element.progressbar( "value", 5 ); - element.one( "progressbarchange", function() { - equal( element.progressbar( "value" ), 100, "change triggered for final value" ); - }); - element.progressbar( "value", 100 ); -}); - -test( "complete", function() { - expect( 5 ); - var value, - changes = 0, - element = $( "#progressbar" ).progressbar({ - change: function() { - changes++; - equal( element.progressbar( "value" ), value, "change at " + value ); - }, - complete: function() { - equal( changes, 3, "complete triggered after change and not on indeterminate" ); - equal( element.progressbar( "value" ), 100, "value is 100" ); - } - }); - - value = 5; - element.progressbar( "value", value ); - value = false; - element.progressbar( "value", value ); - value = 100; - element.progressbar( "value", value ); -}); diff --git a/apps/it/static/js/ui/tests/unit/progressbar/progressbar_methods.js b/apps/it/static/js/ui/tests/unit/progressbar/progressbar_methods.js deleted file mode 100644 index cf7faf6..0000000 --- a/apps/it/static/js/ui/tests/unit/progressbar/progressbar_methods.js +++ /dev/null @@ -1,25 +0,0 @@ -module( "progressbar: methods" ); - -test( "destroy", function() { - expect( 1 ); - domEqual( "#progressbar", function() { - $( "#progressbar" ).progressbar().progressbar( "destroy" ); - }); -}); - -test( "value", function() { - expect( 3 ); - - var element = $( "
      " ).progressbar({ value: 20 }); - equal( element.progressbar( "value" ), 20, "correct value as getter" ); - strictEqual( element.progressbar( "value", 30 ), element, "chainable as setter" ); - equal( element.progressbar( "option", "value" ), 30, "correct value after setter" ); -}); - -test( "widget", function() { - expect( 2 ); - var element = $( "#progressbar" ).progressbar(), - widgetElement = element.progressbar( "widget" ); - equal( widgetElement.length, 1, "one element" ); - strictEqual( widgetElement[ 0 ], element[ 0 ], "same element" ); -}); diff --git a/apps/it/static/js/ui/tests/unit/progressbar/progressbar_options.js b/apps/it/static/js/ui/tests/unit/progressbar/progressbar_options.js deleted file mode 100644 index bc0b5d0..0000000 --- a/apps/it/static/js/ui/tests/unit/progressbar/progressbar_options.js +++ /dev/null @@ -1,72 +0,0 @@ -module( "progressbar: options" ); - -test( "{ value: 0 }, default", function() { - expect( 1 ); - $( "#progressbar" ).progressbar(); - equal( $( "#progressbar" ).progressbar( "value" ), 0 ); -}); - -// Ticket #7231 - valueDiv should be hidden when value is at 0% -test( "value: visibility of valueDiv", function() { - expect( 4 ); - var element = $( "#progressbar" ).progressbar({ - value: 0 - }); - ok( element.children( ".ui-progressbar-value" ).is( ":hidden" ), - "valueDiv hidden when value is initialized at 0" ); - element.progressbar( "value", 1 ); - ok( element.children( ".ui-progressbar-value" ).is( ":visible" ), - "valueDiv visible when value is set to 1" ); - element.progressbar( "value", 100 ); - ok( element.children( ".ui-progressbar-value" ).is( ":visible" ), - "valueDiv visible when value is set to 100" ); - element.progressbar( "value", 0 ); - ok( element.children( ".ui-progressbar-value" ).is( ":hidden" ), - "valueDiv hidden when value is set to 0" ); -}); - -test( "{ value: 5 }", function() { - expect( 1 ); - $( "#progressbar" ).progressbar({ - value: 5 - }); - equal( $( "#progressbar" ).progressbar( "value" ), 5 ); -}); - -test( "{ value: -5 }", function() { - expect( 1 ); - $( "#progressbar" ).progressbar({ - value: -5 - }); - equal( $( "#progressbar" ).progressbar( "value" ), 0, - "value constrained at min" ); -}); - -test( "{ value: 105 }", function() { - expect( 1 ); - $( "#progressbar" ).progressbar({ - value: 105 - }); - equal( $( "#progressbar" ).progressbar( "value" ), 100, - "value constrained at max" ); -}); - -test( "{ value: 10, max: 5 }", function() { - expect( 1 ); - $("#progressbar").progressbar({ - max: 5, - value: 10 - }); - equal( $( "#progressbar" ).progressbar( "value" ), 5, - "value constrained at max" ); -}); - -test( "change max below value", function() { - expect( 1 ); - $("#progressbar").progressbar({ - max: 10, - value: 10 - }).progressbar( "option", "max", 5 ); - equal( $( "#progressbar" ).progressbar( "value" ), 5, - "value constrained at max" ); -}); -- cgit v1.2.3