Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
willdesk_apiauto
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
29
Issues
29
List
Boards
Labels
Service Desk
Milestones
Merge Requests
29
Merge Requests
29
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
桦生 詹
willdesk_apiauto
Commits
c1dfa4af
Commit
c1dfa4af
authored
Apr 29, 2024
by
zhanhuasheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
a35c1b18
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
1 deletion
+75
-1
TestCase/setting/test_08_notification.py
TestCase/setting/test_08_notification.py
+13
-0
TestData/setting/notification_test_data.py
TestData/setting/notification_test_data.py
+5
-0
TestFile/setting/shopifyIntegration/shopifyIntegration_shop_num_select.py
.../shopifyIntegration/shopifyIntegration_shop_num_select.py
+6
-0
YamlCase/account/account.yaml
YamlCase/account/account.yaml
+1
-1
YamlCase/setting/notification.yaml
YamlCase/setting/notification.yaml
+50
-0
No files found.
TestCase/setting/test_08_notification.py
0 → 100644
View file @
c1dfa4af
import
pytest
from
Utils
import
yaml_handler
from
Utils
import
req_handler
from
TestData.setting.notification_test_data
import
notifycationData
class
TestNotifycation
:
yaml_path
=
r
'setting/notification.yaml'
yaml_data
=
yaml_handler
.
yaml_handler
.
get_case
(
yaml_path
)
@
pytest
.
mark
.
flaky
(
reruns
=
notifycationData
.
rerun
,
reruns_delay
=
notifycationData
.
rerun_delay
)
@
pytest
.
mark
.
parametrize
(
'case'
,
yaml_data
)
def
test_notifycation
(
self
,
case
):
req_handler
.
ReqHandler
.
send_requests
(
case
=
case
,
var_class
=
notifycationData
)
TestData/setting/notification_test_data.py
0 → 100644
View file @
c1dfa4af
from
Utils.global_variate
import
Global
class
notifycationData
(
Global
):
insert_team_name
=
'autotest_insert_team'
insert_room_id
=
501307576659487524
\ No newline at end of file
TestFile/setting/shopifyIntegration/shopifyIntegration_shop_num_select.py
0 → 100644
View file @
c1dfa4af
from
Utils.sql_handler
import
test_env_conn
from
TestData.setting.shopify_integration_test_data
import
shopifyIntegrationData
shopify_shop_select_sql
=
f
'select * from `shop` where brand_id =
{
shopifyIntegrationData
.
brandId
}
and source in (1,2) and is_delete in (0,2)'
shopify_shop_select_result
=
test_env_conn
.
select_many_value
(
shopify_shop_select_sql
)
shopify_shop_num
=
len
(
shopify_shop_select_result
)
setattr
(
shopifyIntegrationData
,
'shop_num'
,
shopify_shop_num
)
\ No newline at end of file
YamlCase/account/account.yaml
View file @
c1dfa4af
...
...
@@ -47,13 +47,13 @@ api6:
url
:
/api/v1/customerService/updateCustomerServiceAccount
method
:
post
data
:
{
"
id"
:
"
${userId}"
,
"
localLang"
:
"
${target_language}"
,
"
profile"
:
"
${picUrl}"
,
"
v"
:
"
${v}"
}
after_sql
:
/account/account_selectLanguage.py
expected
:
-
eq
:
{
"
$.code"
:
0
}
api7
:
title
:
检查设置语言
url
:
/api/v1/customerService/getCustomerServiceInfo?v=${v}
before_sql
:
/account/account_selectLanguage.py
method
:
get
expected
:
-
eq
:
{
"
$.code"
:
0
}
...
...
YamlCase/setting/notification.yaml
0 → 100644
View file @
c1dfa4af
api1
:
title
:
关闭所有消息通知
url
:
/api/v1/setting/updateShopSetting
method
:
post
data
:
{
"
item"
:[{
"
itemId"
:
102
,
"
itemName"
:
"
messageNotifyToAll"
,
"
itemValue"
:
"
0"
,
"
shopId"
:
"
0"
},{
"
itemId"
:
103
,
"
itemName"
:
"
messageNotifyToTeam"
,
"
itemValue"
:
"
0"
,
"
shopId"
:
"
0"
}],
"
v"
:
"
${v}"
}
expected
:
-
eq
:
{
"
$.code"
:
0
}
api2
:
title
:
检查是否关闭所有消息通知
url
:
/api/v1/setting/getShopSetting?v=${v}
method
:
get
expected
:
-
eq
:
{
"
$.code"
:
0
}
-
eq
:
{
"
$.data.settingInfoMap.mapList.0.settings[?(@.itemId
==
102)].itemValue"
:
"
0"
}
-
eq
:
{
"
$.data.settingInfoMap.mapList.0.settings[?(@.itemId
==
103)].itemValue"
:
"
0"
}
api3
:
title
:
开启仅针对分配给您的团队的通知
url
:
/api/v1/setting/updateShopSetting
method
:
post
data
:
{
"
item"
:[{
"
itemId"
:
102
,
"
itemName"
:
"
messageNotifyToAll"
,
"
itemValue"
:
"
0"
,
"
shopId"
:
"
0"
},{
"
itemId"
:
103
,
"
itemName"
:
"
messageNotifyToTeam"
,
"
itemValue"
:
"
1"
,
"
shopId"
:
"
0"
}],
"
v"
:
"
${v}"
}
expected
:
-
eq
:
{
"
$.code"
:
0
}
api4
:
title
:
检查是否开启仅针对分配给您的团队的通知
url
:
/api/v1/setting/getShopSetting?v=${v}
method
:
get
expected
:
-
eq
:
{
"
$.code"
:
0
}
-
eq
:
{
"
$.data.settingInfoMap.mapList.0.settings[?(@.itemId
==
102)].itemValue"
:
"
0"
}
-
eq
:
{
"
$.data.settingInfoMap.mapList.0.settings[?(@.itemId
==
103)].itemValue"
:
"
1"
}
api5
:
title
:
开启所有消息通知
url
:
/api/v1/setting/updateShopSetting
method
:
post
data
:
{
"
item"
:[{
"
itemId"
:
102
,
"
itemName"
:
"
messageNotifyToAll"
,
"
itemValue"
:
"
1"
,
"
shopId"
:
"
0"
},{
"
itemId"
:
103
,
"
itemName"
:
"
messageNotifyToTeam"
,
"
itemValue"
:
"
0"
,
"
shopId"
:
"
0"
}],
"
v"
:
"
${v}"
}
expected
:
-
eq
:
{
"
$.code"
:
0
}
api6
:
title
:
检查是否开启所有消息通知
url
:
/api/v1/setting/getShopSetting?v=${v}
method
:
get
expected
:
-
eq
:
{
"
$.code"
:
0
}
-
eq
:
{
"
$.data.settingInfoMap.mapList.0.settings[?(@.itemId
==
102)].itemValue"
:
"
1"
}
-
eq
:
{
"
$.data.settingInfoMap.mapList.0.settings[?(@.itemId
==
103)].itemValue"
:
"
0"
}
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