Fix: load how to play from server
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
|
||||
<script src="../src/game/lib/string_util.js"></script>
|
||||
<script src="../src/game/lib/date_util.js"></script>
|
||||
<script src="../src/game/lib/app_info_manager.js"></script>
|
||||
<script src="../src/game/lib/session_storage_manager.js"></script>
|
||||
<script src="../src/game/global/global_variables.js"></script>
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ QUnit.test( "User login", function( assert ) {
|
||||
QUnit.test( "Player history", function( assert ) {
|
||||
sessionStorageManager.maestroID = 1; // jisangs
|
||||
sessionStorageManager.playerUserID = "8"; // 부현율
|
||||
sessionStorageManager.playingAppID = 9;
|
||||
sessionStorageManager.playingAppID = 30;
|
||||
let date = "2018-05-16";
|
||||
|
||||
let done = assert.async();
|
||||
@@ -35,7 +35,7 @@ QUnit.test( "Player history", function( assert ) {
|
||||
1, // maestroID for jisangs
|
||||
date,
|
||||
(historyRecordManager) => {
|
||||
console.log(historyRecordManager);
|
||||
// console.log(historyRecordManager);
|
||||
|
||||
assert.equal(historyRecordManager.getAppNameAt(0), "korean_word");
|
||||
assert.equal(historyRecordManager.getDateAt(0), "2018-05-14");
|
||||
@@ -53,7 +53,7 @@ QUnit.test( "Player history", function( assert ) {
|
||||
|
||||
QUnit.test( "Player ranking", function( assert ) {
|
||||
sessionStorageManager.maestroID = 1; // jisangs
|
||||
sessionStorageManager.playingAppID = 9;
|
||||
sessionStorageManager.playingAppID = 30;
|
||||
let date = "2018-05-16";
|
||||
let time = "14:50:00";
|
||||
|
||||
@@ -126,3 +126,37 @@ QUnit.test( "Player ranking", function( assert ) {
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
QUnit.test( "HowToPlay", function( assert ) {
|
||||
let howToPlayForSpaceInvaders = "외계인이 나타났다!\\n마우스 왼쪽 버튼으로\\n외계인을 클릭해서 물리쳐 주세요.";
|
||||
|
||||
let done = assert.async(2);
|
||||
setTimeout(function() {
|
||||
dbConnectManager.requestHowToPlay(
|
||||
101, // space_invaders app ID
|
||||
(jsonData) => {
|
||||
howToPlay = jsonData["HowToPlay"];
|
||||
assert.equal(howToPlay, howToPlayForSpaceInvaders);
|
||||
done();
|
||||
},
|
||||
(jsonData) => {
|
||||
console.log(jsonData);
|
||||
done();
|
||||
}
|
||||
);
|
||||
|
||||
dbConnectManager.requestHowToPlay(
|
||||
1, // korean basic typing
|
||||
(jsonData) => {
|
||||
howToPlay = jsonData["HowToPlay"];
|
||||
assert.equal(howToPlay, "");
|
||||
done();
|
||||
},
|
||||
(jsonData) => {
|
||||
console.log(jsonData);
|
||||
done();
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user