aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit
diff options
context:
space:
mode:
authorcarhartl <klaus.hartl@stilbuero.de>2010-04-20 02:38:04 +0800
committerRichard D. Worth <rdworth@gmail.com>2010-04-20 03:00:34 +0800
commit73adda414647c7ecbc16bd9a768a042ac2dcc41e (patch)
tree50f6e382132379db36d44166ffac03038e764994 /tests/unit
parent970ed9a67a533ab44b184babf52100dfbcfa7c96 (diff)
downloadjquery-ui-73adda414647c7ecbc16bd9a768a042ac2dcc41e.tar.gz
jquery-ui-73adda414647c7ecbc16bd9a768a042ac2dcc41e.zip
added tests for enable/disable
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/tabs/tabs_events.js41
-rw-r--r--tests/unit/tabs/tabs_methods.js56
2 files changed, 70 insertions, 27 deletions
diff --git a/tests/unit/tabs/tabs_events.js b/tests/unit/tabs/tabs_events.js
index 2c0eaac18..d0bc5fee2 100644
--- a/tests/unit/tabs/tabs_events.js
+++ b/tests/unit/tabs/tabs_events.js
@@ -22,15 +22,17 @@ test('show', function() {
uiObj = ui;
}
});
- ok(uiObj !== undefined, 'should fire show after init');
- equals(uiObj.tab, $('#tabs1 a')[0], 'should have tab as DOM anchor element');
- equals(uiObj.panel, $('#tabs1 div')[0], 'should have panel as DOM div element');
- equals(uiObj.index, 0, 'should have index');
-
+ ok(uiObj !== undefined, 'trigger callback after initialization');
+ equals(uiObj.tab, $('a', el)[0], 'contain tab as DOM anchor element');
+ equals(uiObj.panel, $('div', el)[0], 'contain panel as DOM div element');
+ equals(uiObj.index, 0, 'contain index');
+
});
test('add', function() {
+ // TODO move to methods, not at all event related...
+
var el = $('<div id="tabs"><ul></ul></div>').tabs();
equals(el.tabs('option', 'selected'), -1, 'Initially empty, no selected tab');
@@ -47,11 +49,36 @@ test('remove', function() {
});
test('enable', function() {
- ok(false, "missing test - untested code is broken code.");
+ expect(4);
+
+ var uiObj;
+ el = $('#tabs1').tabs({
+ disabled: [ 0, 1 ],
+ enable: function (event, ui) {
+ uiObj = ui;
+ }
+ });
+ el.tabs('enable', 1);
+ ok(uiObj !== undefined, 'trigger callback');
+ equals(uiObj.tab, $('a', el)[1], 'contain tab as DOM anchor element');
+ equals(uiObj.panel, $('div', el)[1], 'contain panel as DOM div element');
+ equals(uiObj.index, 1, 'contain index');
});
test('disable', function() {
- ok(false, "missing test - untested code is broken code.");
+ expect(4);
+
+ var uiObj;
+ el = $('#tabs1').tabs({
+ disable: function (event, ui) {
+ uiObj = ui;
+ }
+ });
+ el.tabs('disable', 1);
+ ok(uiObj !== undefined, 'trigger callback');
+ equals(uiObj.tab, $('a', el)[1], 'contain tab as DOM anchor element');
+ equals(uiObj.panel, $('div', el)[1], 'contain panel as DOM div element');
+ equals(uiObj.index, 1, 'contain index');
});
})(jQuery);
diff --git a/tests/unit/tabs/tabs_methods.js b/tests/unit/tabs/tabs_methods.js
index b1b5462a6..3eb627830 100644
--- a/tests/unit/tabs/tabs_methods.js
+++ b/tests/unit/tabs/tabs_methods.js
@@ -9,7 +9,7 @@ test('init', function() {
expect(9);
el = $('#tabs1').tabs();
-
+
ok(true, '.tabs() called on element');
ok( el.is('.ui-tabs.ui-widget.ui-widget-content.ui-corner-all'), 'attach classes to container');
ok( $('ul', el).is('.ui-tabs-nav.ui-helper-reset.ui-helper-clearfix.ui-widget-header.ui-corner-all'), 'attach classes to list' );
@@ -23,32 +23,48 @@ test('init', function() {
test('destroy', function() {
expect(6);
-
+
el = $('#tabs1').tabs({ collapsible: true });
$('li:eq(2)', el).simulate('mouseover').find('a').focus();
el.tabs('destroy');
-
+
ok( el.is(':not(.ui-tabs, .ui-widget, .ui-widget-content, .ui-corner-all, .ui-tabs-collapsible)'), 'remove classes from container');
ok( $('ul', el).is(':not(.ui-tabs-nav, .ui-helper-reset, .ui-helper-clearfix, .ui-widget-header, .ui-corner-all)'), 'remove classes from list' );
ok( $('div:eq(1)', el).is(':not(.ui-tabs-panel, .ui-widget-content, .ui-corner-bottom, .ui-tabs-hide)'), 'remove classes to panel' );
- ok( $('li:eq(0)', el).is(':not(.ui-tabs-selected, .ui-state-active, .ui-corner-top)'), 'remove classes from active li');
+ ok( $('li:eq(0)', el).is(':not(.ui-tabs-selected, .ui-state-active, .ui-corner-top)'), 'remove classes from active li');
ok( $('li:eq(1)', el).is(':not(.ui-state-default, .ui-corner-top)'), 'remove classes from inactive li');
ok( $('li:eq(2)', el).is(':not(.ui-state-hover, .ui-state-focus)'), 'remove classes from mouseovered or focused li');
});
test('enable', function() {
- ok(false, "missing test - untested code is broken code.");
+ expect(2);
+
+ el = $('#tabs1').tabs({ disabled: [ 0, 1 ] });
+ el.tabs("enable", 1);
+ ok( $('li:eq(1)', el).is(':not(.ui-state-disabled)'), 'remove class from li');
+ same(el.tabs('option', 'disabled'), [ ], 'update property');
});
test('disable', function() {
- ok(false, "missing test - untested code is broken code.");
+ expect(4);
+
+ // normal
+ el = $('#tabs1').tabs();
+ el.tabs('disable', 1);
+ ok( $('li:eq(1)', el).is('.ui-state-disabled'), 'add class to li');
+ same(el.tabs('option', 'disabled'), [ 1 ], 'update disabled property');
+
+ // attempt to disable selected has no effect
+ el.tabs('disable', 0);
+ ok( $('li:eq(0)', el).is(':not(.ui-state-disabled)'), 'not add class to li');
+ same(el.tabs('option', 'disabled'), [ 1 ], 'not update property');
});
test('add', function() {
expect(4);
-
+
el = $('#tabs1').tabs();
- el.tabs('add', "#new", 'New');
+ el.tabs('add', '#new', 'New');
var added = $('li:last', el).simulate('mouseover');
ok(added.is('.ui-state-hover'), 'should add mouseover handler to added tab');
@@ -56,9 +72,9 @@ test('add', function() {
var other = $('li:first', el).simulate('mouseover');
ok(other.is('.ui-state-hover'), 'should not remove mouseover handler from existing tab');
other.simulate('mouseout');
-
+
equals($('a', added).attr('href'), '#new', 'should not expand href to full url of current page');
-
+
ok(false, "missing test - untested code is broken code.");
});
@@ -66,25 +82,25 @@ test('remove', function() {
expect(4);
el = $('#tabs1').tabs();
-
+
el.tabs('remove', 0);
equals(el.tabs('length'), 2, 'remove tab');
equals($('li a[href$="fragment-1"]', el).length, 0, 'remove associated list item');
equals($('#fragment-1').length, 0, 'remove associated panel');
-
+
// TODO delete tab -> focus tab to right
// TODO delete last tab -> focus tab to left
-
+
el.tabs('select', 1);
el.tabs('remove', 1);
- equals(el.tabs('option', 'selected'), 0, 'update selected property');
+ equals(el.tabs('option', 'selected'), 0, 'update selected property');
});
test('select', function() {
expect(9);
-
+
el = $('#tabs1').tabs();
-
+
el.tabs('select', 1);
equals(el.tabs('option', 'selected'), 1, 'should select tab');
@@ -97,11 +113,11 @@ test('select', function() {
el.tabs({ collapsible: true });
el.tabs('select', -1);
equals(el.tabs('option', 'selected'), -1, 'should collapse tab passing in -1');
-
+
el.tabs('destroy');
el.tabs({ collapsible: true });
el.tabs('select', null);
- equals(el.tabs('option', 'selected'), -1, 'should collapse tab passing in null (deprecated)');
+ equals(el.tabs('option', 'selected'), -1, 'should collapse tab passing in null (deprecated)');
el.tabs('select', null);
equals(el.tabs('option', 'selected'), -1, 'should not select tab passing in null a second time (deprecated)');
@@ -113,7 +129,7 @@ test('select', function() {
equals(el.tabs('option', 'selected'), 0, 'should not collapse tab if collapsible is not set to true');
el.tabs('select', null);
equals(el.tabs('option', 'selected'), 0, 'should not collapse tab if collapsible is not set to true');
-
+
el.tabs('select', '#fragment-2');
equals(el.tabs('option', 'selected'), 1, 'should select tab by id');
});
@@ -128,7 +144,7 @@ test('url', function() {
test('length', function() {
expect(1);
-
+
el = $('#tabs1').tabs();
equals(el.tabs('length'), $('ul a', el).length, ' should return length');
});
on> Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
summaryrefslogtreecommitdiffstats
path: root/apps/files_external/l10n/ko.js
blob: 3bed24abe66134ae72721bce5bf56cbefc439627 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
OC.L10N.register(
    "files_external",
    {
    "Fetching request tokens failed. Verify that your app key and secret are correct." : "요청 토큰을 가져올 수 없습니다. 앱 키와 비밀 값이 올바른지 확인하십시오.",
    "Fetching access tokens failed. Verify that your app key and secret are correct." : "접근 토큰을 가져올 수 없습니다. 앱 키와 비밀 값이 올바른지 확인하십시오.",
    "Please provide a valid app key and secret." : "올바른 앱 키와 비밀 값을 입력하십시오.",
    "Step 1 failed. Exception: %s" : "1단계 실패. 예외: %s",
    "Step 2 failed. Exception: %s" : "2단계 실패. 예외: %s",
    "External storage" : "외부 저장소",
    "Storage with id \"%i\" not found" : "ID가 \"%i\"인 저장소를 찾을 수 없음",
    "Invalid backend or authentication mechanism class" : "백엔드나 인증 방식 클래스가 잘못됨",
    "Invalid mount point" : "잘못된 마운트 지점",
    "Objectstore forbidden" : "Objectstore에 접근 금지됨",
    "Invalid storage backend \"%s\"" : "잘못된 저장소 백엔드 \"%s\"",
    "Unsatisfied backend parameters" : "백엔드 인자가 부족함",
    "Unsatisfied authentication mechanism parameters" : "인증 방식 인자가 부족함",
    "Personal" : "개인",
    "System" : "시스템",
    "Grant access" : "접근 권한 부여",
    "Access granted" : "접근 허가됨",
    "Error configuring OAuth1" : "OAuth1 설정 오류",
    "Error configuring OAuth2" : "OAuth2 설정 오류",
    "Generate keys" : "키 생성",
    "Error generating key pair" : "키 쌍을 생성하는 중 오류 발생",
    "Enable encryption" : "암호화 사용",
    "Enable previews" : "미리 보기 사용",
    "Check for changes" : "변경 사항 감시",
    "Never" : "하지 않음",
    "Once every direct access" : "한 번 직접 접근할 때마다",
    "Every time the filesystem is used" : "파일 시스템을 사용할 때마다",
    "All users. Type to select user or group." : "모든 사용자입니다. 사용자나 그룹을 선택하려면 입력하십시오",
    "(group)" : "(그룹)",
    "Saved" : "저장됨",
    "Access key" : "접근 키",
    "Secret key" : "비밀 키",
    "Builtin" : "내장",
    "None" : "없음",
    "OAuth1" : "OAuth1",
    "App key" : "앱 키",
    "App secret" : "앱 비밀 값",
    "OAuth2" : "OAuth2",
    "Client ID" : "클라이언트 ID",
    "Client secret" : "클라이언트 비밀 값",
    "Username" : "사용자 이름",
    "Password" : "암호",
    "API key" : "API 키",
    "Username and password" : "사용자 이름과 암호",
    "Session credentials" : "세션 접근 정보",
    "Public key" : "공개 키",
    "Amazon S3" : "Amazon S3",
    "Bucket" : "버킷",
    "Hostname" : "호스트 이름",
    "Port" : "포트",
    "Region" : "지역",
    "Enable SSL" : "SSL 사용",
    "Enable Path Style" : "경로 스타일 사용",
    "WebDAV" : "WebDAV",
    "URL" : "URL",
    "Remote subfolder" : "원격 하위 폴더",
    "Secure https://" : "보안 https://",
    "Dropbox" : "Dropbox",
    "FTP" : "FTP",
    "Host" : "호스트",
    "Secure ftps://" : "보안 ftps://",
    "Google Drive" : "Google 드라이브",
    "Local" : "로컬",
    "Location" : "위치",
    "ownCloud" : "ownCloud",
    "SFTP" : "SFTP",
    "Root" : "루트",
    "SMB / CIFS" : "SMB/CIFS",
    "Share" : "공유",
    "Username as share" : "사용자 이름으로 공유",
    "OpenStack Object Storage" : "OpenStack 객체 저장소",
    "<b>Note:</b> " : "<b>메모:</b>",
    "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>메모:</b> PHP cURL 모듈이 비활성화되어 있거나 설치되어 있지 않습니다. %s을(를) 마운트할 수 없습니다. 시스템 관리자에게 설치를 요청하십시오.",
    "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>메모:</b> PHP FTP 모듈이 비활성화되어 있거나 설치되어 있지 않습니다. %s을(를) 마운트할 수 없습니다. 시스템 관리자에게 설치를 요청하십시오.",
    "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>메모:</b> \"%s\"이(가) 설치되어 있지 않습니다. %s을(를) 마운트할 수 없습니다. 시스템 관리자에게 설치를 요청하십시오.",
    "No external storage configured" : "외부 저장소가 설정되지 않았음",
    "You can add external storages in the personal settings" : "개인 설정에서 외부 저장소를 추가할 수 있습니다",
    "Name" : "이름",
    "Storage type" : "저장소 종류",
    "Scope" : "범위",
    "External Storage" : "외부 저장소",
    "Folder name" : "폴더 이름",
    "Authentication" : "인증",
    "Configuration" : "설정",
    "Available for" : "다음으로 사용 가능",
    "Advanced settings" : "고급 설정",
    "Delete" : "삭제",
    "Add storage" : "저장소 추가",
    "Enable User External Storage" : "사용자 외부 저장소 사용",
    "Allow users to mount the following external storage" : "사용자가 다음 외부 저장소를 마운트할 수 있도록 허용"
},
"nplurals=1; plural=0;");