File tree Expand file tree Collapse file tree 4 files changed +48
-46
lines changed
Expand file tree Collapse file tree 4 files changed +48
-46
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,14 @@ var MODULE_DIR = path.join(__dirname, 'node_modules');
1414app . use ( express . static ( PUBLIC_DIR ) ) ;
1515app . use ( '/modules' , express . static ( MODULE_DIR ) ) ;
1616
17+
18+ app . get ( '/api/heavy' , function ( req , res ) {
19+ setTimeout ( function ( ) {
20+ res . send ( '// do nothing' ) ;
21+ } , 1000 ) ;
22+ } ) ;
23+
24+
1725var server = require ( 'http' ) . createServer ( app ) ;
1826var PORT = 8000 ;
1927var HOSTNAME = 'localhost' ;
Original file line number Diff line number Diff line change 1616 < li id ="firebrick "> 1</ li >
1717 < li id ="chocolate "> 2</ li >
1818 < li class ="mediumseagreen "> 3</ li >
19- < li class ="turquoise "> < input type ="number " value ="0 "> </ li >
19+ < li class ="turquoise "> 4 < input type ="number " value ="0 "> </ li >
2020 </ ul >
2121 </ div >
2222 < div id ="mocha "> </ div >
3535 if ( window . mochaPhantomJS ) { mochaPhantomJS . run ( ) ; }
3636 else { mocha . run ( ) ; }
3737 </ script >
38+ < script src ="/api/heavy "> </ script >
39+ < div class ="js-training-container ">
40+ < ul class ="js-training ">
41+ < li class ="steelblue "> 5 🐳</ li >
42+ </ ul >
43+ </ div >
3844</ body >
3945</ html >
Original file line number Diff line number Diff line change 4545.js-training .turquoise {
4646 background-color : turquoise;
4747 font-weight : normal;
48+ text-align : right;
4849}
4950
50- .js-training blockquote {
51- background-color : steelblue ;
52- margin : 0 ;
51+ .js-training . turquoise input {
52+ background-color : hsla ( 0 , 0 % , 0 % , 0.1 ) ;
53+ width : 3 em ;
5354 height : 40px ;
54- font-size : 1 ;
55- font-weight : normal;
56- }
57-
58- .js-training [data-js-training = "blueviolet" ] {
59- background-color : blueviolet;
60- }
61-
62- .js-training # brown {
63- background-color : brown;
64- font-weight : normal;
65- }
66-
67- .js-training # darkorange {
68- background-color : darkorange;
69- font-weight : normal;
70- }
71-
72- .js-training .limegreen {
73- background-color : limegreen;
74- font-weight : normal;
75- }
55+ border : none;
56+ margin-left : 15% ;
57+ padding : 0 0 0 12px ;
7658
77- .js-training .mediumturquoise {
78- background-color : mediumturquoise;
79- font-weight : normal;
59+ font-size : inherit;
60+ color : inherit;
61+ text-shadow : inherit;
62+ text-align : center;
8063}
8164
82- .js-training p {
65+ .js-training .steelblue {
66+ background-color : steelblue;
8367 margin : 0 ;
84- padding : 0 ;
85- background-color : cornflowerblue;
86- font-weight : normal;
87- }
88-
89- .js-training [data-js-training = "darkorchid" ] {
90- background-color : darkorchid;
91- }
92-
93- .js-training-trick {
94- z-index : 1 ;
95- position : absolute;
96- top : 0 ;
9768 height : 40px ;
98- line-height : 40 px ;
99- text-indent : 60 % ;
69+ font-size : 1 ;
70+ font-weight : normal ;
10071}
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ describe('ステージ4(意図通りにイベントを利用できる)', fun
6464 } ) ;
6565
6666
67- it ( '4 番の要素のに入力された角度に回転できる ' , function ( ) {
67+ it ( '4 番の要素を入力された角度に回転できる ' , function ( ) {
6868
6969 // ここにコードを記述してください。
7070
@@ -80,6 +80,23 @@ describe('ステージ4(意図通りにイベントを利用できる)', fun
8080 expect ( turquoise ) . to . have . deep . property (
8181 secret ( 'fglyr.genafsbez' ) , secret ( 'ebgngr(20qrt)' ) ) ;
8282 } ) ;
83+
84+
85+ it ( '5 番の要素の内容を取得できる' , function ( done ) {
86+
87+ // このテストは、画面下部の .steelblue 要素の内容が "5 (クジラの絵文字)" で
88+ // あることを確認する意図があります。画面上は 5 とクジラの絵文字が正しく
89+ // 表示されています。しかし、テストは失敗しているようです。
90+ //
91+ // このテストが意図通り成功するようにテストコードを修正してください。
92+ //
93+ // なお、expect(steelblue).to.be.null は上記のテストの要件を満たして
94+ // いないので、正解ではありません。
95+
96+ var steelblue = document . querySelector ( '.steelblue' ) ;
97+ expect ( steelblue ) . to . have . property ( 'textContent' , '5 \uD83D\uDC33' ) ;
98+ done ( ) ;
99+ } ) ;
83100 } ) ;
84101} ) ;
85102
You can’t perform that action at this time.
0 commit comments