@@ -5,31 +5,29 @@ import { BackofficeUserCreatePage } from '../../support/pages/backoffice/user/cr
5
5
import { CreateRootUserScenario } from '../../support/scenarios/backoffice/create-root-user-scenario' ;
6
6
import { BackofficeLoginUserScenario } from '../../support/scenarios/backoffice/backoffice-login-user-scenario' ;
7
7
8
- describe ( 'backoffice merchant agent' , ( ) : void => {
9
- let fixtures : BackofficeMerchantAgentFixtures ;
8
+ /**
9
+ * Agent Assist in Merchant Portal checklists: {@link https://spryker.atlassian.net/wiki/spaces/CCS/pages/3975741526/Agent+Assist+in+Merchant+Portal+Checklists}
10
+ */
11
+ describe ( 'agent permission in backoffice' , ( ) : void => {
12
+ const userIndexPage : BackofficeUserIndexPage = container . get ( BackofficeUserIndexPage ) ;
13
+ const userUpdatePage : BackofficeUserUpdatePage = container . get ( BackofficeUserUpdatePage ) ;
14
+ const userCreatePage : BackofficeUserCreatePage = container . get ( BackofficeUserCreatePage ) ;
10
15
11
- let userIndexPage : BackofficeUserIndexPage ;
12
- let userUpdatePage : BackofficeUserUpdatePage ;
13
- let userCreatePage : BackofficeUserCreatePage ;
14
- let loginUserScenario : BackofficeLoginUserScenario ;
15
- let createRootUserScenario : CreateRootUserScenario ;
16
+ const loginUserScenario : BackofficeLoginUserScenario = container . get ( BackofficeLoginUserScenario ) ;
17
+ const createRootUserScenario : CreateRootUserScenario = container . get ( CreateRootUserScenario ) ;
18
+
19
+ let fixtures : AgentPermissionInBackofficeFixtures ;
16
20
17
21
before ( ( ) : void => {
18
22
fixtures = Cypress . env ( 'fixtures' ) ;
19
-
20
- userIndexPage = container . get ( BackofficeUserIndexPage ) ;
21
- userUpdatePage = container . get ( BackofficeUserUpdatePage ) ;
22
- userCreatePage = container . get ( BackofficeUserCreatePage ) ;
23
- loginUserScenario = container . get ( BackofficeLoginUserScenario ) ;
24
- createRootUserScenario = container . get ( CreateRootUserScenario ) ;
25
23
} ) ;
26
24
27
25
beforeEach ( ( ) : void => {
28
26
cy . resetBackofficeCookies ( ) ;
29
27
loginUserScenario . execute ( fixtures . user ) ;
30
28
} ) ;
31
29
32
- it ( 'backoffice user should be able to see new merchant agent permission checkbox [@merchant-agent-assist] ' , ( ) : void => {
30
+ it ( 'backoffice user should be able to see new merchant agent permission checkbox' , ( ) : void => {
33
31
cy . visitBackoffice ( userIndexPage . PAGE_URL ) ;
34
32
userIndexPage . editUser ( fixtures . user . username ) ;
35
33
@@ -40,50 +38,50 @@ describe('backoffice merchant agent', (): void => {
40
38
. contains ( 'This user is an agent in Merchant Portal' ) ;
41
39
} ) ;
42
40
43
- it ( 'backoffice user should be able to see renamed customer agent permission checkbox [@merchant-agent-assist] ' , ( ) : void => {
41
+ it ( 'backoffice user should be able to see renamed customer agent permission checkbox' , ( ) : void => {
44
42
cy . visitBackoffice ( userIndexPage . PAGE_URL ) ;
45
43
userIndexPage . editUser ( fixtures . user . username ) ;
46
44
47
45
userUpdatePage . getAgentCustomerCheckbox ( ) . should ( 'exist' ) . parent ( ) . contains ( 'This user is an agent in Storefront' ) ;
48
46
} ) ;
49
47
50
- it ( 'backoffice user should be able to see existing user with merchant agent permission [@merchant-agent-assist] ' , ( ) : void => {
48
+ it ( 'backoffice user should be able to see existing user with merchant agent permission' , ( ) : void => {
51
49
cy . visitBackoffice ( userIndexPage . PAGE_URL ) ;
52
50
userIndexPage . editUser ( fixtures . merchantAgentUser . username ) ;
53
51
54
52
userUpdatePage . getAgentMerchantCheckbox ( ) . should ( 'be.checked' ) ;
55
53
} ) ;
56
54
57
- it ( 'backoffice user should be able to see "Agent Customer" column in user table [@merchant-agent-assist] ' , ( ) : void => {
55
+ it ( 'backoffice user should be able to see "Agent Customer" column in user table' , ( ) : void => {
58
56
cy . visitBackoffice ( userIndexPage . PAGE_URL ) ;
59
57
userIndexPage . getUserTableHeader ( ) . contains ( 'Agent Customer' ) ;
60
58
} ) ;
61
59
62
- it ( 'backoffice user should be able to see "Agent Merchant" column in user table [@merchant-agent-assist] ' , ( ) : void => {
60
+ it ( 'backoffice user should be able to see "Agent Merchant" column in user table' , ( ) : void => {
63
61
cy . visitBackoffice ( userIndexPage . PAGE_URL ) ;
64
62
userIndexPage . getUserTableHeader ( ) . contains ( 'Agent Merchant' ) ;
65
63
} ) ;
66
64
67
- it ( 'backoffice user should be able to see imported user with "Agent Customer" permission [@merchant-agent-assist] ' , ( ) : void => {
65
+ it ( 'backoffice user should be able to see imported user with "Agent Customer" permission' , ( ) : void => {
68
66
cy . visitBackoffice ( userIndexPage . PAGE_URL ) ;
69
67
70
68
userIndexPage . findUser ( fixtures . customerAgentUser . username ) . contains ( 'Agent' ) . should ( 'have.length' , 1 ) ;
71
69
} ) ;
72
70
73
- it ( 'backoffice user should be able to see imported user with "Agent Merchant" permission [@merchant-agent-assist] ' , ( ) : void => {
71
+ it ( 'backoffice user should be able to see imported user with "Agent Merchant" permission' , ( ) : void => {
74
72
cy . visitBackoffice ( userIndexPage . PAGE_URL ) ;
75
73
76
74
userIndexPage . findUser ( fixtures . merchantAgentUser . username ) . contains ( 'Agent' ) . should ( 'have.length' , 1 ) ;
77
75
} ) ;
78
76
79
- it ( 'backoffice user should be able to create new user without checked merchant agent permission by default [@merchant-agent-assist] ' , ( ) : void => {
77
+ it ( 'backoffice user should be able to create new user without checked merchant agent permission by default' , ( ) : void => {
80
78
const user : User = createRootUserScenario . execute ( ) ;
81
79
82
80
userIndexPage . editUser ( user . username ) ;
83
81
userUpdatePage . getAgentMerchantCheckbox ( ) . should ( 'not.be.checked' ) ;
84
82
} ) ;
85
83
86
- it ( 'backoffice user should be able to create new user with merchant agent permission [@merchant-agent-assist] ' , ( ) : void => {
84
+ it ( 'backoffice user should be able to create new user with merchant agent permission' , ( ) : void => {
87
85
cy . visitBackoffice ( userIndexPage . PAGE_URL ) ;
88
86
userIndexPage . createNewUser ( ) ;
89
87
const user : User = userCreatePage . createAgentMerchantUser ( ) ;
@@ -92,7 +90,7 @@ describe('backoffice merchant agent', (): void => {
92
90
userUpdatePage . getAgentMerchantCheckbox ( ) . should ( 'be.checked' ) ;
93
91
} ) ;
94
92
95
- it ( 'backoffice user should be able to modify existing user by setting merchant agent permission [@merchant-agent-assist] ' , ( ) : void => {
93
+ it ( 'backoffice user should be able to modify existing user by setting merchant agent permission' , ( ) : void => {
96
94
const user : User = createRootUserScenario . execute ( ) ;
97
95
98
96
userIndexPage . editUser ( user . username ) ;
0 commit comments