diff options
author | JinweiClarkChao <[email protected]> | 2014-09-23 22:34:14 +0800 |
---|---|---|
committer | Jinwei Zhao <[email protected]> | 2017-01-13 15:07:44 +0800 |
commit | b214f38d2c24a890ce36512a0c8bab965e27a508 (patch) | |
tree | 1522b651444407cbf120798e79be4657f1b472ab /Code/Blocks/syntax/tests/cases/007_collapse_interaction.html | |
parent | e13882d1656b143533cec307a19425e0a56ec999 (diff) | |
download | jinwei.me-b214f38d2c24a890ce36512a0c8bab965e27a508.tar.gz |
README
Diffstat (limited to 'Code/Blocks/syntax/tests/cases/007_collapse_interaction.html')
-rw-r--r-- | Code/Blocks/syntax/tests/cases/007_collapse_interaction.html | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Code/Blocks/syntax/tests/cases/007_collapse_interaction.html b/Code/Blocks/syntax/tests/cases/007_collapse_interaction.html new file mode 100644 index 0000000..ea72046 --- /dev/null +++ b/Code/Blocks/syntax/tests/cases/007_collapse_interaction.html | |||
@@ -0,0 +1,44 @@ | |||
1 | <script type="text/javascript"> | ||
2 | queue(function() | ||
3 | { | ||
4 | var $sh; | ||
5 | |||
6 | module('007_collapse_interaction'); | ||
7 | |||
8 | function clickA($a) | ||
9 | { | ||
10 | SyntaxHighlighter.toolbar.handler({ | ||
11 | target: $a[0], | ||
12 | preventDefault: function() {} | ||
13 | }); | ||
14 | }; | ||
15 | |||
16 | test('expand collapsed block with title', function() | ||
17 | { | ||
18 | $sh = $('#sh_007_collapse_a'); | ||
19 | |||
20 | ok_sh($sh); | ||
21 | ok_toolbar($sh); | ||
22 | ok_collapsed($sh); | ||
23 | |||
24 | var $a = $sh.find('.toolbar a.toolbar_item.command_expandSource'); | ||
25 | clickA($a); | ||
26 | ok($a.not(':visible'), 'Expand not visible'); | ||
27 | ok_code($sh); | ||
28 | }); | ||
29 | |||
30 | test('expand collapsed block without title', function() | ||
31 | { | ||
32 | $sh = $('#sh_007_collapse_b'); | ||
33 | |||
34 | ok_sh($sh); | ||
35 | ok_toolbar($sh); | ||
36 | ok_collapsed($sh); | ||
37 | |||
38 | var $a = $sh.find('.toolbar a.toolbar_item.command_expandSource'); | ||
39 | clickA($a); | ||
40 | ok($a.not(':visible'), 'Expand not visible'); | ||
41 | ok_code($sh); | ||
42 | }); | ||
43 | }); | ||
44 | </script> | ||