Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
620dcdde
Kaydet (Commit)
620dcdde
authored
Ara 19, 2016
tarafından
Tim Graham
Kaydeden (comit)
GitHub
Ara 19, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Updated to QUnit 2.0.1.
üst
a85e8421
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
182 additions
and
72 deletions
+182
-72
DateTimeShortcuts.test.js
js_tests/admin/DateTimeShortcuts.test.js
+3
-3
RelatedObjectLookups.test.js
js_tests/admin/RelatedObjectLookups.test.js
+4
-4
SelectBox.test.js
js_tests/admin/SelectBox.test.js
+4
-4
SelectFilter2.test.js
js_tests/admin/SelectFilter2.test.js
+3
-3
actions.test.js
js_tests/admin/actions.test.js
+3
-3
core.test.js
js_tests/admin/core.test.js
+13
-13
inlines.test.js
js_tests/admin/inlines.test.js
+6
-6
timeparse.test.js
js_tests/admin/timeparse.test.js
+3
-3
mapwidget.test.js
js_tests/gis/mapwidget.test.js
+7
-7
qunit.css
js_tests/qunit/qunit.css
+136
-26
qunit.js
js_tests/qunit/qunit.js
+0
-0
No files found.
js_tests/admin/DateTimeShortcuts.test.js
Dosyayı görüntüle @
620dcdde
/* global
module, tes
t, DateTimeShortcuts */
/* global
QUni
t, DateTimeShortcuts */
/* eslint global-strict: 0, strict: 0 */
'use strict'
;
module
(
'admin.DateTimeShortcuts'
);
QUnit
.
module
(
'admin.DateTimeShortcuts'
);
test
(
'init'
,
function
(
assert
)
{
QUnit
.
test
(
'init'
,
function
(
assert
)
{
var
$
=
django
.
jQuery
;
var
dateField
=
$
(
'<input type="text" class="vDateField" value="2015-03-16"><br>'
);
...
...
js_tests/admin/RelatedObjectLookups.test.js
Dosyayı görüntüle @
620dcdde
/* global
module, tes
t, id_to_windowname,
/* global
QUni
t, id_to_windowname,
windowname_to_id */
/* eslint global-strict: 0, strict: 0 */
'use strict'
;
module
(
'admin.RelatedObjectLookups'
);
QUnit
.
module
(
'admin.RelatedObjectLookups'
);
test
(
'id_to_windowname'
,
function
(
assert
)
{
QUnit
.
test
(
'id_to_windowname'
,
function
(
assert
)
{
assert
.
equal
(
id_to_windowname
(
'.test'
),
'__dot__test'
);
assert
.
equal
(
id_to_windowname
(
'misc-test'
),
'misc__dash__test'
);
});
test
(
'windowname_to_id'
,
function
(
assert
)
{
QUnit
.
test
(
'windowname_to_id'
,
function
(
assert
)
{
assert
.
equal
(
windowname_to_id
(
'__dot__test'
),
'.test'
);
assert
.
equal
(
windowname_to_id
(
'misc__dash__test'
),
'misc-test'
);
});
js_tests/admin/SelectBox.test.js
Dosyayı görüntüle @
620dcdde
/* global
module, tes
t, SelectBox */
/* global
QUni
t, SelectBox */
/* eslint global-strict: 0, strict: 0 */
'use strict'
;
module
(
'admin.SelectBox'
);
QUnit
.
module
(
'admin.SelectBox'
);
test
(
'init: no options'
,
function
(
assert
)
{
QUnit
.
test
(
'init: no options'
,
function
(
assert
)
{
var
$
=
django
.
jQuery
;
$
(
'<select id="id"></select>'
).
appendTo
(
'#qunit-fixture'
);
SelectBox
.
init
(
'id'
);
assert
.
equal
(
SelectBox
.
cache
.
id
.
length
,
0
);
});
test
(
'filter'
,
function
(
assert
)
{
QUnit
.
test
(
'filter'
,
function
(
assert
)
{
var
$
=
django
.
jQuery
;
$
(
'<select id="id"></select>'
).
appendTo
(
'#qunit-fixture'
);
$
(
'<option value="0">A</option>'
).
appendTo
(
'#id'
);
...
...
js_tests/admin/SelectFilter2.test.js
Dosyayı görüntüle @
620dcdde
/* global
module, tes
t, SelectFilter */
/* global
QUni
t, SelectFilter */
/* eslint global-strict: 0, strict: 0 */
'use strict'
;
module
(
'admin.SelectFilter2'
);
QUnit
.
module
(
'admin.SelectFilter2'
);
test
(
'init'
,
function
(
assert
)
{
QUnit
.
test
(
'init'
,
function
(
assert
)
{
var
$
=
django
.
jQuery
;
$
(
'<form><select id="id"></select></form>'
).
appendTo
(
'#qunit-fixture'
);
$
(
'<option value="0">A</option>'
).
appendTo
(
'#id'
);
...
...
js_tests/admin/actions.test.js
Dosyayı görüntüle @
620dcdde
/* global
module, tes
t */
/* global
QUni
t */
/* eslint global-strict: 0, strict: 0 */
'use strict'
;
module
(
'admin.actions'
,
{
QUnit
.
module
(
'admin.actions'
,
{
beforeEach
:
function
()
{
// Number of results shown on page
/* eslint-disable */
...
...
@@ -16,7 +16,7 @@ module('admin.actions', {
}
});
test
(
'check'
,
function
(
assert
)
{
QUnit
.
test
(
'check'
,
function
(
assert
)
{
var
$
=
django
.
jQuery
;
assert
.
notOk
(
$
(
'.action-select'
).
is
(
':checked'
));
$
(
'#action-toggle'
).
click
();
...
...
js_tests/admin/core.test.js
Dosyayı görüntüle @
620dcdde
/* global
module, tes
t */
/* global
QUni
t */
/* eslint global-strict: 0, strict: 0 */
'use strict'
;
module
(
'admin.core'
);
QUnit
.
module
(
'admin.core'
);
test
(
'Date.getTwelveHours'
,
function
(
assert
)
{
QUnit
.
test
(
'Date.getTwelveHours'
,
function
(
assert
)
{
assert
.
equal
(
new
Date
(
2011
,
0
,
1
,
0
,
0
).
getTwelveHours
(),
12
,
'0:00'
);
assert
.
equal
(
new
Date
(
2011
,
0
,
1
,
11
,
0
).
getTwelveHours
(),
11
,
'11:00'
);
assert
.
equal
(
new
Date
(
2011
,
0
,
1
,
16
,
0
).
getTwelveHours
(),
4
,
'16:00'
);
});
test
(
'Date.getTwoDigitMonth'
,
function
(
assert
)
{
QUnit
.
test
(
'Date.getTwoDigitMonth'
,
function
(
assert
)
{
assert
.
equal
(
new
Date
(
2011
,
0
,
1
).
getTwoDigitMonth
(),
'01'
,
'jan 1'
);
assert
.
equal
(
new
Date
(
2011
,
9
,
1
).
getTwoDigitMonth
(),
'10'
,
'oct 1'
);
});
test
(
'Date.getTwoDigitDate'
,
function
(
assert
)
{
QUnit
.
test
(
'Date.getTwoDigitDate'
,
function
(
assert
)
{
assert
.
equal
(
new
Date
(
2011
,
0
,
1
).
getTwoDigitDate
(),
'01'
,
'jan 1'
);
assert
.
equal
(
new
Date
(
2011
,
0
,
15
).
getTwoDigitDate
(),
'15'
,
'jan 15'
);
});
test
(
'Date.getTwoDigitTwelveHour'
,
function
(
assert
)
{
QUnit
.
test
(
'Date.getTwoDigitTwelveHour'
,
function
(
assert
)
{
assert
.
equal
(
new
Date
(
2011
,
0
,
1
,
0
,
0
).
getTwoDigitTwelveHour
(),
'12'
,
'0:00'
);
assert
.
equal
(
new
Date
(
2011
,
0
,
1
,
4
,
0
).
getTwoDigitTwelveHour
(),
'04'
,
'4:00'
);
assert
.
equal
(
new
Date
(
2011
,
0
,
1
,
22
,
0
).
getTwoDigitTwelveHour
(),
'10'
,
'22:00'
);
});
test
(
'Date.getTwoDigitHour'
,
function
(
assert
)
{
QUnit
.
test
(
'Date.getTwoDigitHour'
,
function
(
assert
)
{
assert
.
equal
(
new
Date
(
2014
,
6
,
1
,
9
,
0
).
getTwoDigitHour
(),
'09'
,
'9:00 am is 09'
);
assert
.
equal
(
new
Date
(
2014
,
6
,
1
,
11
,
0
).
getTwoDigitHour
(),
'11'
,
'11:00 am is 11'
);
});
test
(
'Date.getTwoDigitMinute'
,
function
(
assert
)
{
QUnit
.
test
(
'Date.getTwoDigitMinute'
,
function
(
assert
)
{
assert
.
equal
(
new
Date
(
2014
,
6
,
1
,
0
,
5
).
getTwoDigitMinute
(),
'05'
,
'12:05 am is 05'
);
assert
.
equal
(
new
Date
(
2014
,
6
,
1
,
0
,
15
).
getTwoDigitMinute
(),
'15'
,
'12:15 am is 15'
);
});
test
(
'Date.getTwoDigitSecond'
,
function
(
assert
)
{
QUnit
.
test
(
'Date.getTwoDigitSecond'
,
function
(
assert
)
{
assert
.
equal
(
new
Date
(
2014
,
6
,
1
,
0
,
0
,
2
).
getTwoDigitSecond
(),
'02'
,
'12:00:02 am is 02'
);
assert
.
equal
(
new
Date
(
2014
,
6
,
1
,
0
,
0
,
20
).
getTwoDigitSecond
(),
'20'
,
'12:00:20 am is 20'
);
});
test
(
'Date.getHourMinute'
,
function
(
assert
)
{
QUnit
.
test
(
'Date.getHourMinute'
,
function
(
assert
)
{
assert
.
equal
(
new
Date
(
2014
,
6
,
1
,
11
,
0
).
getHourMinute
(),
'11:00'
,
'11:00 am is 11:00'
);
assert
.
equal
(
new
Date
(
2014
,
6
,
1
,
13
,
25
).
getHourMinute
(),
'13:25'
,
'1:25 pm is 13:25'
);
});
test
(
'Date.getHourMinuteSecond'
,
function
(
assert
)
{
QUnit
.
test
(
'Date.getHourMinuteSecond'
,
function
(
assert
)
{
assert
.
equal
(
new
Date
(
2014
,
6
,
1
,
11
,
0
,
0
).
getHourMinuteSecond
(),
'11:00:00'
,
'11:00 am is 11:00:00'
);
assert
.
equal
(
new
Date
(
2014
,
6
,
1
,
17
,
45
,
30
).
getHourMinuteSecond
(),
'17:45:30'
,
'5:45:30 pm is 17:45:30'
);
});
test
(
'Date.strftime'
,
function
(
assert
)
{
QUnit
.
test
(
'Date.strftime'
,
function
(
assert
)
{
var
date
=
new
Date
(
2014
,
6
,
1
,
11
,
0
,
5
);
assert
.
equal
(
date
.
strftime
(
'%Y-%m-%d %H:%M:%S'
),
'2014-07-01 11:00:05'
);
assert
.
equal
(
date
.
strftime
(
'%B %d, %Y'
),
'July 01, 2014'
);
});
test
(
'String.strptime'
,
function
(
assert
)
{
QUnit
.
test
(
'String.strptime'
,
function
(
assert
)
{
// Use UTC functions for extracting dates since the calendar uses them as
// well. Month numbering starts with 0 (January).
var
firstParsedDate
=
'1988-02-26'
.
strptime
(
'%Y-%m-%d'
);
...
...
js_tests/admin/inlines.test.js
Dosyayı görüntüle @
620dcdde
/* global
module, tes
t */
/* global
QUni
t */
/* eslint global-strict: 0, strict: 0 */
'use strict'
;
module
(
'admin.inlines: tabular formsets'
,
{
QUnit
.
module
(
'admin.inlines: tabular formsets'
,
{
beforeEach
:
function
()
{
var
$
=
django
.
jQuery
;
var
that
=
this
;
...
...
@@ -19,19 +19,19 @@ module('admin.inlines: tabular formsets', {
}
});
test
(
'no forms'
,
function
(
assert
)
{
QUnit
.
test
(
'no forms'
,
function
(
assert
)
{
assert
.
ok
(
this
.
inlineRow
.
hasClass
(
'dynamic-first'
));
assert
.
equal
(
this
.
table
.
find
(
'.add-row a'
).
text
(),
this
.
addText
);
});
test
(
'add form'
,
function
(
assert
)
{
QUnit
.
test
(
'add form'
,
function
(
assert
)
{
var
addButton
=
this
.
table
.
find
(
'.add-row a'
);
assert
.
equal
(
addButton
.
text
(),
this
.
addText
);
addButton
.
click
();
assert
.
ok
(
this
.
table
.
find
(
'#first-1'
).
hasClass
(
'row2'
));
});
test
(
'add/remove form events'
,
function
(
assert
)
{
QUnit
.
test
(
'add/remove form events'
,
function
(
assert
)
{
assert
.
expect
(
6
);
var
$
=
django
.
jQuery
;
var
$document
=
$
(
document
);
...
...
@@ -52,7 +52,7 @@ test('add/remove form events', function(assert) {
deleteLink
.
click
();
});
test
(
'existing add button'
,
function
(
assert
)
{
QUnit
.
test
(
'existing add button'
,
function
(
assert
)
{
var
$
=
django
.
jQuery
;
$
(
'#qunit-fixture'
).
empty
();
// Clear the table added in beforeEach
$
(
'#qunit-fixture'
).
append
(
$
(
'#tabular-formset'
).
text
());
...
...
js_tests/admin/timeparse.test.js
Dosyayı görüntüle @
620dcdde
/* global
module, tes
t, parseTimeString */
/* global
QUni
t, parseTimeString */
/* eslint global-strict: 0, strict: 0 */
'use strict'
;
module
(
'admin.timeparse'
);
QUnit
.
module
(
'admin.timeparse'
);
test
(
'parseTimeString'
,
function
(
assert
)
{
QUnit
.
test
(
'parseTimeString'
,
function
(
assert
)
{
function
time
(
then
,
expected
)
{
assert
.
equal
(
parseTimeString
(
then
),
expected
);
}
...
...
js_tests/gis/mapwidget.test.js
Dosyayı görüntüle @
620dcdde
/* global
module, tes
t, MapWidget */
/* global
QUni
t, MapWidget */
/* eslint global-strict: 0, strict: 0 */
'use strict'
;
module
(
'gis.OLMapWidget'
);
QUnit
.
module
(
'gis.OLMapWidget'
);
test
(
'MapWidget.featureAdded'
,
function
(
assert
)
{
QUnit
.
test
(
'MapWidget.featureAdded'
,
function
(
assert
)
{
var
options
=
{
id
:
'id_point'
,
map_id
:
'id_point_map'
,
geom_name
:
'Point'
};
var
widget
=
new
MapWidget
(
options
);
assert
.
equal
(
widget
.
layers
.
vector
.
features
.
length
,
1
);
...
...
@@ -15,13 +15,13 @@ test('MapWidget.featureAdded', function(assert) {
);
});
test
(
'MapWidget.map_srid'
,
function
(
assert
)
{
QUnit
.
test
(
'MapWidget.map_srid'
,
function
(
assert
)
{
var
options
=
{
id
:
'id_point'
,
map_id
:
'id_point_map'
,
geom_name
:
'Point'
};
var
widget
=
new
MapWidget
(
options
);
assert
.
equal
(
widget
.
options
.
map_srid
,
4326
,
'SRID 4326'
);
});
test
(
'MapWidget.defaultCenter'
,
function
(
assert
)
{
QUnit
.
test
(
'MapWidget.defaultCenter'
,
function
(
assert
)
{
var
options
=
{
id
:
'id_point'
,
map_id
:
'id_point_map'
,
geom_name
:
'Point'
};
var
widget
=
new
MapWidget
(
options
);
assert
.
equal
(
widget
.
defaultCenter
().
toString
(),
'lon=0,lat=0'
,
'Default center at 0, 0'
);
...
...
@@ -35,7 +35,7 @@ test('MapWidget.defaultCenter', function(assert) {
);
});
test
(
'MapWidget.getControls'
,
function
(
assert
)
{
QUnit
.
test
(
'MapWidget.getControls'
,
function
(
assert
)
{
var
options
=
{
id
:
'id_point'
,
map_id
:
'id_point_map'
,
geom_name
:
'Point'
};
var
widget
=
new
MapWidget
(
options
);
widget
.
getControls
(
widget
.
layers
.
vector
);
...
...
@@ -45,7 +45,7 @@ test('MapWidget.getControls', function(assert) {
assert
.
equal
(
widget
.
controls
[
2
].
displayClass
,
'olControlModifyFeature'
,
'Modify control'
);
});
test
(
'MapWidget.IsCollection'
,
function
(
assert
)
{
QUnit
.
test
(
'MapWidget.IsCollection'
,
function
(
assert
)
{
var
options
=
{
id
:
'id_point'
,
map_id
:
'id_point_map'
,
geom_name
:
'Point'
};
var
widget
=
new
MapWidget
(
options
);
assert
.
notOk
(
widget
.
options
.
is_collection
);
...
...
js_tests/qunit/qunit.css
Dosyayı görüntüle @
620dcdde
/*!
* QUnit
1.23
.1
* QUnit
2.0
.1
* https://qunitjs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2016-0
4-12T17:2
9Z
* Date: 2016-0
7-23T19:3
9Z
*/
/** Font Family and Sizes */
...
...
@@ -27,7 +27,7 @@
}
/** Header */
/** Header
(excluding toolbar)
*/
#qunit-header
{
padding
:
0.5em
0
0.5em
1em
;
...
...
@@ -52,51 +52,161 @@
color
:
#FFF
;
}
#qunit-testrunner-toolbar
label
{
display
:
inline-block
;
padding
:
0
0.5em
0
0.1em
;
}
#qunit-banner
{
height
:
5px
;
}
#qunit-testrunner-toolbar
{
padding
:
0.5em
1em
0.5em
1em
;
color
:
#5E740B
;
background-color
:
#EEE
;
overflow
:
hidden
;
}
#qunit-filteredTest
{
padding
:
0.5em
1em
0.5em
1em
;
background-color
:
#F4FF77
;
color
:
#366097
;
background-color
:
#F4FF77
;
}
#qunit-userAgent
{
padding
:
0.5em
1em
0.5em
1em
;
background-color
:
#2B81AF
;
color
:
#FFF
;
background-color
:
#2B81AF
;
text-shadow
:
rgba
(
0
,
0
,
0
,
0.5
)
2px
2px
1px
;
}
#qunit-modulefilter-container
{
float
:
right
;
padding
:
0.2em
;
/** Toolbar */
#qunit-testrunner-toolbar
{
padding
:
0.5em
1em
0.5em
1em
;
color
:
#5E740B
;
background-color
:
#EEE
;
}
#qunit-testrunner-toolbar
.clearfix
{
height
:
0
;
clear
:
both
;
}
.qunit-url-config
{
#qunit-testrunner-toolbar
label
{
display
:
inline-block
;
padding
:
0.1em
;
}
.qunit-filter
{
display
:
block
;
#qunit-testrunner-toolbar
input
[
type
=
checkbox
],
#qunit-testrunner-toolbar
input
[
type
=
radio
]
{
margin
:
3px
;
vertical-align
:
-2px
;
}
#qunit-testrunner-toolbar
input
[
type
=
text
]
{
box-sizing
:
border-box
;
height
:
1.6em
;
}
.qunit-url-config
,
.qunit-filter
,
#qunit-modulefilter
{
display
:
inline-block
;
line-height
:
2.1em
;
}
.qunit-filter
,
#qunit-modulefilter
{
float
:
right
;
position
:
relative
;
margin-left
:
1em
;
}
.qunit-url-config
label
{
margin-right
:
0.5em
;
}
#qunit-modulefilter-search
{
box-sizing
:
border-box
;
width
:
400px
;
}
#qunit-modulefilter-search-container
:after
{
position
:
absolute
;
right
:
0.3em
;
content
:
"\25bc"
;
color
:
black
;
}
#qunit-modulefilter-dropdown
{
/* align with #qunit-modulefilter-search */
box-sizing
:
border-box
;
width
:
400px
;
position
:
absolute
;
right
:
0
;
top
:
50%
;
margin-top
:
0.8em
;
border
:
1px
solid
#D3D3D3
;
border-top
:
none
;
border-radius
:
0
0
.25em
.25em
;
color
:
#000
;
background-color
:
#F5F5F5
;
z-index
:
99
;
}
#qunit-modulefilter-dropdown
a
{
color
:
inherit
;
text-decoration
:
none
;
}
#qunit-modulefilter-dropdown
.clickable.checked
{
font-weight
:
bold
;
color
:
#000
;
background-color
:
#D2E0E6
;
}
#qunit-modulefilter-dropdown
.clickable
:hover
{
color
:
#FFF
;
background-color
:
#0D3349
;
}
#qunit-modulefilter-actions
{
display
:
block
;
overflow
:
auto
;
/* align with #qunit-modulefilter-dropdown-list */
font
:
smaller
/
1.5em
sans-serif
;
}
#qunit-modulefilter-dropdown
#qunit-modulefilter-actions
>
*
{
box-sizing
:
border-box
;
max-height
:
2.8em
;
display
:
block
;
padding
:
0.4em
;
}
#qunit-modulefilter-dropdown
#qunit-modulefilter-actions
>
button
{
float
:
right
;
font
:
inherit
;
}
#qunit-modulefilter-dropdown
#qunit-modulefilter-actions
>
:last-child
{
/* insert padding to align with checkbox margins */
padding-left
:
3px
;
}
#qunit-modulefilter-dropdown-list
{
max-height
:
200px
;
overflow-y
:
auto
;
margin
:
0
;
border-top
:
2px
groove
threedhighlight
;
padding
:
0.4em
0
0
;
font
:
smaller
/
1.5em
sans-serif
;
}
#qunit-modulefilter-dropdown-list
li
{
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
#qunit-modulefilter-dropdown-list
.clickable
{
display
:
block
;
padding-left
:
0.15em
;
}
/** Tests: Pass/Fail */
#qunit-tests
{
...
...
@@ -202,14 +312,14 @@
}
#qunit-tests
del
{
background-color
:
#E0F2BE
;
color
:
#374E0C
;
background-color
:
#E0F2BE
;
text-decoration
:
none
;
}
#qunit-tests
ins
{
background-color
:
#FFCACA
;
color
:
#500
;
background-color
:
#FFCACA
;
text-decoration
:
none
;
}
...
...
js_tests/qunit/qunit.js
Dosyayı görüntüle @
620dcdde
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment