Add: writing exam - save and update record (incompleted)
This commit is contained in:
+62
-1
@@ -1,3 +1,64 @@
|
||||
//////////////////////////////////////////////////
|
||||
// typing exam DB
|
||||
|
||||
QUnit.test( "TypingExam", function( assert ) {
|
||||
var dbService = new DBService();
|
||||
dbService.setMaestroID(3); // 삼화초
|
||||
dbService.setPlayerID(35); // 박지상
|
||||
|
||||
dbService.tddSetup(
|
||||
"deleteTypingExamRecordAll",
|
||||
(function(jsonData) { // onSucceeded
|
||||
console.log(jsonData);
|
||||
}).bind(this),
|
||||
(function(jsonData) { // onFailed
|
||||
console.log(jsonData);
|
||||
}).bind(this)
|
||||
);
|
||||
|
||||
dbService.addPrevHourTypingExamRecord(
|
||||
1, //writingRecord
|
||||
120.35, // record
|
||||
(function(jsonData) { // onSucceeded
|
||||
console.log(jsonData);
|
||||
}).bind(this),
|
||||
(function(jsonData) { // onFailed
|
||||
console.log(jsonData);
|
||||
}).bind(this)
|
||||
);
|
||||
|
||||
dbService.updateTypingExamRecord(
|
||||
1, //writingRecord
|
||||
105.53, // record
|
||||
(function(jsonData) { // onSucceeded
|
||||
console.log(jsonData);
|
||||
}).bind(this),
|
||||
(function(jsonData) { // onFailed
|
||||
console.log(jsonData);
|
||||
}).bind(this)
|
||||
);
|
||||
|
||||
/*
|
||||
var done = assert.async();
|
||||
setTimeout(function() {
|
||||
dbService.getHighestRecord(
|
||||
(function(jsonData) { // onSucceeded
|
||||
console.log(jsonData);
|
||||
|
||||
var record = jsonData["highestRecord"];
|
||||
assert.equal(record, 100, "highest record");
|
||||
done();
|
||||
}).bind(this),
|
||||
(function(jsonData) { // onFailed
|
||||
// console.log(jsonData);
|
||||
done();
|
||||
}).bind(this)
|
||||
);
|
||||
});
|
||||
*/
|
||||
});
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// DBConnector
|
||||
|
||||
@@ -10,7 +71,7 @@ QUnit.test( "DBConnector", function( assert ) {
|
||||
setTimeout(function() {
|
||||
dbService.requestWritingPlayerList(
|
||||
(jsonData) => { // onSucceeded
|
||||
console.log(jsonData);
|
||||
// console.log(jsonData);
|
||||
|
||||
var writingArray = jsonData["writingArray"];
|
||||
assert.equal(writingArray[0].name, "봄2", "name");
|
||||
|
||||
Reference in New Issue
Block a user