-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from miya0001/update-tests
Update tests
- Loading branch information
Showing
6 changed files
with
82 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ rm -rf .git | |
rm -r .gitignore | ||
|
||
echo ".bowerrc | ||
.editorconfig | ||
.travis.yml | ||
bin | ||
bower.json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<!--INSERT-BASE--> | ||
<meta charset='UTF-8'> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no" > | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="description" content="sandbox version of gsimaps"> | ||
<title>sandmaps</title> | ||
<link rel="shortcut icon" href="../favicon.ico"> | ||
<link rel="apple-touch-icon" sizes="152x152" href="https://avatars1.githubusercontent.com/u/15714839?v=3&s=152"> | ||
<meta name="apple-mobile-web-app-capable" content="yes"> | ||
<meta name="apple-mobile-web-app-status-bar-style" content="black"> | ||
<link rel="stylesheet" href="../leaflet-0.7.3/leaflet.css"> | ||
<link rel="stylesheet" href="../jquery/jquery-ui.min.css"> | ||
<link rel="stylesheet" href="../jquery/colorpicker/jquery.simple-color-picker.css"/> | ||
<link rel="stylesheet" href="../leaflet-plugin/leaflet.label/leaflet.label-gsi.css"/> | ||
<link rel="stylesheet" href="../leaflet-plugin/leaflet.draw/leaflet.draw-gsi.css"/> | ||
<link rel="stylesheet" href="../css/gsimaps.css"/> | ||
<script src="../leaflet-0.7.3/leaflet-src.js"></script> | ||
<script src="../jquery/jquery-1.11.1.min.js"></script> | ||
<script src="../jquery/ZeroClipboard2.0.2/ZeroClipboard.js"></script> | ||
<script src="../jquery/jquery.xdomainrequest.min.js"></script> | ||
<script src="../jquery/jquery-ui.min.js"></script> | ||
<script src="../jquery/jquery.ui.touch-punch.js"></script> | ||
<script src="../jquery/colorpicker/jquery.simple-color-picker.js"></script> | ||
<script src="../jquery/ah-placeholder/jquery.ah-placeholder.js"></script> | ||
<script src="../js/proj4js-combined.js"></script> | ||
<script src="../leaflet-plugin/leaflet.label/leaflet.label.js"></script> | ||
<script src="../leaflet-plugin/TileLayer.GeoJSON/TileLayer.GeoJSON-gsi.js"></script> | ||
<script src="../leaflet-plugin/leaflet-omnivore/leaflet-omnivore.min.js"></script> | ||
<script src="../leaflet-plugin/leaflet.draw/leaflet.draw-gsi.js"></script> | ||
<script src="../leaflet-plugin/leaflet-hash/leaflet-hash-gsi.js"></script> | ||
<script src="../js/gsimaps.min.js"></script> | ||
<!-- ここから地図共有時使用 ※変更・削除しないでください --> | ||
<script type="text/javascript"> | ||
/*INSERT-SCRIPT*/ | ||
</script> | ||
<!-- ここまで地図共有時使用 --> | ||
</head> | ||
<body> | ||
|
||
<div id="map"></div> | ||
|
||
<script type='text/javascript' src='http://code.jquery.com/qunit/qunit-1.20.0.js'></script> | ||
<script type='text/javascript' src='tests.js'></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
$( window ).on( 'load', function(){ | ||
test( 'Tests for #map', function( assert ){ | ||
// 地図がロードされた後に#mapオブジェクトの各属性の値を検査する。 | ||
assert.ok( $( '#map' ).hasClass( 'leaflet-container' ), '#map should has class "leaflet-container"' ); | ||
assert.ok( $( '#map' ).hasClass( 'leaflet-fade-anim' ), '#map should has class "leaflet-fade-anim"' ); | ||
assert.ok( "0" === $( '#map' ).attr( 'tabindex' ), 'tabindex of #map should be "0"' ); | ||
assert.equal( "0px", $( '#map' ).css( 'top' ), '#map should has style "top: 0px"' ); | ||
|
||
// 地図が表示された時のURLに含まれるハッシュの値を検査。 | ||
assert.equal( "#5/35.362222/138.731389", location.hash, 'URL should has hash "#5/35.362222/138.731389"' ); | ||
|
||
// 初期状態ではlayers以下のメニューは非表示 | ||
assert.equal( "none", $( '.menu_item_frame:eq(0)' ).css( 'display' ), '.menu_item_frame:eq(0) should be hide' ); | ||
} ); | ||
|
||
test( 'Tests for Navigations', function( assert ){ | ||
// layersボタンをクリックした際にメニューが表示されるかどうかをテスト | ||
$( '.leaflet-control-container .menu_btn:eq(0)' ).on( 'click', function(){ | ||
assert.equal( "block", $( '.menu_item_frame:eq(0)' ).css( 'display' ), '.menu_item_frame:eq(0) should be block' ); | ||
} ) | ||
$( '.leaflet-control-container .menu_btn:eq(0)' ).trigger( 'click' ); // layersボタンクリックを強制的に発火 | ||
} ); | ||
} ); |