Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AutomationTestForUnibee
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joshua Yu
AutomationTestForUnibee
Commits
9f7acde3
Commit
9f7acde3
authored
Oct 01, 2024
by
Joshua Yu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'main' into 'master'
update See merge request
!24
parents
3b2caaeb
141e4d9e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
05_invoice.js
01_Web/TestCases/MerchantPortal/05_invoice.js
+1
-1
06_transaction.js
01_Web/TestCases/MerchantPortal/06_transaction.js
+9
-4
09_user_list.js
01_Web/TestCases/MerchantPortal/09_user_list.js
+1
-1
No files found.
01_Web/TestCases/MerchantPortal/05_invoice.js
View file @
9f7acde3
...
@@ -1134,7 +1134,7 @@ describe('case06: Filter => Success', function () {
...
@@ -1134,7 +1134,7 @@ describe('case06: Filter => Success', function () {
await
baseStep
.
screenShot
(
Driver
,
savaPath
+
'/09_filterStatus.jpeg'
);
await
baseStep
.
screenShot
(
Driver
,
savaPath
+
'/09_filterStatus.jpeg'
);
await
merchantInvoicePage
.
checkRecordInvoiceList
(
Driver
,
await
merchantInvoicePage
.
checkRecordInvoiceList
(
Driver
,
""
,
"Invoice"
,
"Cancelled"
,
"
Stripe
"
,
testUser
);
""
,
"Invoice"
,
"Cancelled"
,
""
,
testUser
);
done
();
done
();
}
catch
(
e
)
{
}
catch
(
e
)
{
...
...
01_Web/TestCases/MerchantPortal/06_transaction.js
View file @
9f7acde3
...
@@ -12,7 +12,7 @@ const baseStep = require('../../../CommonStep/Web/Web_Common_Step');
...
@@ -12,7 +12,7 @@ const baseStep = require('../../../CommonStep/Web/Web_Common_Step');
const
API_Object
=
require
(
"../../../CommonStep/API/API_Object"
);
const
API_Object
=
require
(
"../../../CommonStep/API/API_Object"
);
const
API_Env
=
require
(
"../../../CommonStep/API/API_Env"
);
const
API_Env
=
require
(
"../../../CommonStep/API/API_Env"
);
const
ApiReq
=
new
API_Object
(
"
"
);
const
ApiReq
=
new
API_Object
(
"
https://api.unibee.top
"
);
const
addContext
=
require
(
'mochawesome/addContext'
);
const
addContext
=
require
(
'mochawesome/addContext'
);
const
{
expect
}
=
require
(
"chai"
);
const
{
expect
}
=
require
(
"chai"
);
...
@@ -514,7 +514,10 @@ describe('case03: Transaction with Failed=> Success', function () {
...
@@ -514,7 +514,10 @@ describe('case03: Transaction with Failed=> Success', function () {
const
resBody
=
JSON
.
parse
(
res
.
body
);
const
resBody
=
JSON
.
parse
(
res
.
body
);
response
=
resBody
;
response
=
resBody
;
console
.
log
(
resBody
);
console
.
log
(
resBody
);
testData
[
'subId'
]
=
resBody
.
data
.
subscriptions
[
0
].
user
.
subscriptionId
;
for
(
let
i
=
0
;
i
<
3
;
i
++
){
testData
[
'subId_'
+
i
]
=
resBody
.
data
.
subscriptions
[
i
].
subscription
.
subscriptionId
;
}
done
();
done
();
});
});
},
1000
);
},
1000
);
...
@@ -523,11 +526,12 @@ describe('case03: Transaction with Failed=> Success', function () {
...
@@ -523,11 +526,12 @@ describe('case03: Transaction with Failed=> Success', function () {
}
}
});
});
for
(
let
i
=
0
;
i
<
3
;
i
++
){
it
(
'Case 03: cancel sub => Success'
,
(
done
)
=>
{
it
(
'Case 03: cancel sub => Success'
,
(
done
)
=>
{
try
{
try
{
setTimeout
(()
=>
{
//Wait syncTimeAPI*1000 seconds
setTimeout
(()
=>
{
//Wait syncTimeAPI*1000 seconds
ApiReq
.
cancelSubscription
(
API_Env
.
get
().
headerSet
,
{
ApiReq
.
cancelSubscription
(
API_Env
.
get
().
headerSet
,
{
"subscriptionId"
:
testData
[
'subId'
]
"subscriptionId"
:
testData
[
'subId_'
+
i
]
},
(
res
,
url
,
header
,
bodyObject
)
=>
{
},
(
res
,
url
,
header
,
bodyObject
)
=>
{
request
=
JSON
.
stringify
(
bodyObject
);
request
=
JSON
.
stringify
(
bodyObject
);
request
=
{
request
=
{
...
@@ -551,6 +555,7 @@ describe('case03: Transaction with Failed=> Success', function () {
...
@@ -551,6 +555,7 @@ describe('case03: Transaction with Failed=> Success', function () {
done
(
e
);
done
(
e
);
}
}
});
});
}
it
(
'case 05 - Transaction with failed => Success '
,
(
done
)
=>
{
it
(
'case 05 - Transaction with failed => Success '
,
(
done
)
=>
{
(
async
()
=>
{
(
async
()
=>
{
...
@@ -907,7 +912,7 @@ describe('case05: Transaction filter => Success', function () {
...
@@ -907,7 +912,7 @@ describe('case05: Transaction filter => Success', function () {
await
merchantTransactionPage
.
filterStatus
(
Driver
,
[
"Failed"
])
await
merchantTransactionPage
.
filterStatus
(
Driver
,
[
"Failed"
])
await
baseStep
.
wait
(
Driver
,
2000
);
await
baseStep
.
wait
(
Driver
,
2000
);
await
baseStep
.
screenShot
(
Driver
,
savaPath
+
'/05_RefundTransaction.jpeg'
);
await
baseStep
.
screenShot
(
Driver
,
savaPath
+
'/05_RefundTransaction.jpeg'
);
await
merchantTransactionPage
.
checkRecordTransactionList
(
Driver
,
""
,
"Failed"
,
"Payment"
,
"
Stripe
"
);
await
merchantTransactionPage
.
checkRecordTransactionList
(
Driver
,
""
,
"Failed"
,
"Payment"
,
""
);
done
();
done
();
...
...
01_Web/TestCases/MerchantPortal/09_user_list.js
View file @
9f7acde3
...
@@ -193,7 +193,6 @@ describe('case02: Assign subscription in user list=> Success', function () {
...
@@ -193,7 +193,6 @@ describe('case02: Assign subscription in user list=> Success', function () {
await
baseStep
.
click
(
Driver
,
userListPage
.
assign_OK_btn
);
await
baseStep
.
click
(
Driver
,
userListPage
.
assign_OK_btn
);
await
baseStep
.
wait
(
Driver
,
3000
);
await
baseStep
.
wait
(
Driver
,
3000
);
await
baseStep
.
screenShot
(
Driver
,
savaPath
+
"/08_assign_result.png"
);
await
baseStep
.
screenShot
(
Driver
,
savaPath
+
"/08_assign_result.png"
);
await
baseStep
.
compareText
(
Driver
,
userListPage
.
current_text
,
"Current Subscription"
);
await
baseStep
.
compareText
(
Driver
,
userListPage
.
current_plan
,
"Month Plan"
);
await
baseStep
.
compareText
(
Driver
,
userListPage
.
current_plan
,
"Month Plan"
);
await
baseStep
.
compareText
(
Driver
,
userListPage
.
current_plan_des
,
"Month Plan"
);
await
baseStep
.
compareText
(
Driver
,
userListPage
.
current_plan_des
,
"Month Plan"
);
await
baseStep
.
compareText
(
Driver
,
userListPage
.
current_status
,
"Incomplete"
);
await
baseStep
.
compareText
(
Driver
,
userListPage
.
current_status
,
"Incomplete"
);
...
@@ -698,6 +697,7 @@ describe('case08:Set country and vat number in user list=> Success', function ()
...
@@ -698,6 +697,7 @@ describe('case08:Set country and vat number in user list=> Success', function ()
await
baseStep
.
screenShot
(
Driver
,
savaPath
+
"/12_vat_number_country.png"
);
await
baseStep
.
screenShot
(
Driver
,
savaPath
+
"/12_vat_number_country.png"
);
await
baseStep
.
scrollIntoView
(
Driver
,
userListPage
.
save_btn
);
await
baseStep
.
scrollIntoView
(
Driver
,
userListPage
.
save_btn
);
await
baseStep
.
click
(
Driver
,
userListPage
.
save_btn
);
await
baseStep
.
click
(
Driver
,
userListPage
.
save_btn
);
await
baseStep
.
wait
(
Driver
,
1000
);
expect
(
await
baseStep
.
getText
(
Driver
,
userListPage
.
vat_error_message
)).
not
.
null
expect
(
await
baseStep
.
getText
(
Driver
,
userListPage
.
vat_error_message
)).
not
.
null
await
baseStep
.
wait
(
Driver
,
3000
);
await
baseStep
.
wait
(
Driver
,
3000
);
done
();
done
();
...
...
Write
Preview
Markdown
is supported
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