Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
agetic
microservicio_tarjetas
Commits
b642bf82
Commit
b642bf82
authored
Feb 17, 2020
by
Arturo Hernandez
Browse files
fix write function tests
parent
f4dc789c
Changes
1
Show whitespace changes
Inline
Side-by-side
src/www/test.html
View file @
b642bf82
...
@@ -156,7 +156,7 @@ $(function() {
...
@@ -156,7 +156,7 @@ $(function() {
$
.
ajax
(
'
https://127.0.0.1:8000/api/read-card
'
,
{
$
.
ajax
(
'
https://127.0.0.1:8000/api/read-card
'
,
{
method
:
'
GET
'
,
method
:
'
GET
'
,
timeout
:
2000
timeout
:
2000
}).
done
(
parse_data
).
fail
(
fail
);
}).
then
(
parse_data
).
fail
(
fail
);
}
}
function
read_card_data
(){
function
read_card_data
(){
spin
();
spin
();
...
@@ -174,7 +174,7 @@ $(function() {
...
@@ -174,7 +174,7 @@ $(function() {
method
:
'
POST
'
,
method
:
'
POST
'
,
data
:{
uuid
:
uiid
},
data
:{
uuid
:
uiid
},
timeout
:
2000
}
timeout
:
2000
}
).
done
(
parse_data
).
fail
(
fail
);
).
then
(
parse_data
).
fail
(
fail
);
}
}
function
write_card
(){
function
write_card
(){
let
uiid
=
check_uiid
();
let
uiid
=
check_uiid
();
...
@@ -188,7 +188,7 @@ $(function() {
...
@@ -188,7 +188,7 @@ $(function() {
data
:
DEFAULT_TEST_DATA
data
:
DEFAULT_TEST_DATA
},
},
timeout
:
2000
}
timeout
:
2000
}
).
done
(
parse_data
).
done
(
read_card_data
).
fail
(
fail
);
).
then
(
parse_data
).
then
(
read_card_data
).
fail
(
fail
);
}
}
function
erase_card
(){
function
erase_card
(){
let
uiid
=
check_uiid
();
let
uiid
=
check_uiid
();
...
@@ -202,7 +202,7 @@ $(function() {
...
@@ -202,7 +202,7 @@ $(function() {
data
:
DEFAULT_ERASE
data
:
DEFAULT_ERASE
},
},
timeout
:
2000
}
timeout
:
2000
}
).
done
(
parse_data
).
done
(
read_card_data
).
fail
(
fail
);
).
then
(
parse_data
).
then
(
read_card_data
).
fail
(
fail
);
}
}
function
write_value
(){
function
write_value
(){
let
uiid
=
check_uiid
();
let
uiid
=
check_uiid
();
...
@@ -217,7 +217,7 @@ $(function() {
...
@@ -217,7 +217,7 @@ $(function() {
value_adr
:
DEFAULT_TEST_VALUE_ADR
value_adr
:
DEFAULT_TEST_VALUE_ADR
},
},
timeout
:
2000
}
timeout
:
2000
}
).
done
(
parse_data
).
done
(
read_card_data
).
fail
(
fail
);
).
then
(
parse_data
).
then
(
read_card_data
).
fail
(
fail
);
}
}
function
increment_value
(){
function
increment_value
(){
let
uiid
=
check_uiid
();
let
uiid
=
check_uiid
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment