Skip to content

Commit

Permalink
Merge pull request #972 from spryker/feature/frw-9071/master-adjusted…
Browse files Browse the repository at this point in the history
…-validation-rules-demoshops

FRW-9071 Fixes for demoshops.
  • Loading branch information
asmarovydlo authored Dec 17, 2024
2 parents e6e6ae5 + 6da8edd commit e58912b
Show file tree
Hide file tree
Showing 47 changed files with 519 additions and 513 deletions.
20 changes: 19 additions & 1 deletion resources/environments/environments_api_b2b.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"first_name":"Sonia",
"last_name":"Wagner",
"password":"change123",
"password_new":"qweRTY_123",
"password_new":"qweRTY_123456",
"password_new_additional":"Change!23456",
"reference":"DE--21",
"salutation":"Ms"
},
Expand All @@ -39,6 +40,7 @@
"first_name":"Max",
"last_name":"Musterman",
"password":"change123",
"password_new":"Change!23456",
"salutation":"Mr"
},
"yves_fourth_user":{
Expand All @@ -57,6 +59,22 @@
"reference":"DE-17",
"salutation":"Ms"
},
"yves_eighth_user":{
"email":"[email protected]",
"password":"change123",
"password_new":"Change!23456",
"password_new_additional":"qweRTY_123456",
"reference":"DE--2"
},
"yves_ninth_user":{
"email":"[email protected]",
"first_name":"Maggie",
"last_name":"May",
"password":"Change!23456",
"password_new":"qweRTY_123456",
"reference":"DE--3",
"salutation":"Ms"
},
"yves_ottom_admin_user":{
"email":"[email protected]",
"first_name":"Andrew",
Expand Down
38 changes: 28 additions & 10 deletions resources/environments/environments_api_b2c.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"first_name":"Sonia",
"last_name":"Wagner",
"password":"change123",
"password_new":"Change@123",
"password_new":"qweRTY_123456",
"password_new_additional":"Change!23456",
"reference":"DE--21",
"salutation":"Ms"
},
Expand All @@ -32,12 +33,29 @@
"salutation":"Mr"
},
"yves_third_user":{
"first_name":"Jackie",
"last_name":"Chan",
"email":"[email protected]",
"first_name":"Max",
"last_name":"Musterman",
"password":"change123",
"gender_male":"Male",
"password_new":"Change!23456",
"salutation":"Mr"
},
"yves_eighth_user":{
"email":"[email protected]",
"password":"change123",
"password_new":"Change!23456",
"password_new_additional":"qweRTY_123456",
"reference":"DE--2"
},
"yves_ninth_user":{
"email":"[email protected]",
"first_name":"Maggie",
"last_name":"May",
"password":"Change!23456",
"password_new":"qweRTY_123456",
"reference":"DE--3",
"salutation":"Ms"
},
"gender":{
"female":"Female",
"male":"Male"
Expand Down Expand Up @@ -601,7 +619,7 @@
},
"dummy_api_key":"eba8110c9f9bf5685e8b5f4eba9b17c2",
"dummy_key_hash":"f683f48de788d57cd396fc212ef33fd146e1ff0b51cde37ecb4ddd77eeed1706",

"servicePoints": {
"servicePoints":[
{
Expand Down Expand Up @@ -640,21 +658,21 @@
]
},
"warehouses":{
"warehouses":
"warehouses":
{
"uuid": "test-warehouse",
"is_active": true,
"name": "Test warehouse"
}

},
"push_notifications": {
"push_notification_subscriptions": [
{
"providerName": "web-push-php",
"group": {
"name": "warehouse",
"identifier": ""
"identifier": ""
},
"payload": {
"endpoint": "endpoint",
Expand Down Expand Up @@ -684,7 +702,7 @@
"user_name_1":"[email protected]",
"user_first_name_1":"Admin",
"user_last_name_1":"Spryker"
},
},
"warehouse": {
"warehouse_uuid": "8e5f7bf2-ab97-595c-9b42-487392e2af9b",
"warehouse_uuid_budget_cameras": "86496ec7-0d44-518c-81e4-f472b9e8547d",
Expand All @@ -711,4 +729,4 @@
"zip": "10115"
}
}
}
}
20 changes: 19 additions & 1 deletion resources/environments/environments_api_mp_b2b.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"first_name":"Sonia",
"last_name":"Wagner",
"password":"change123",
"password_new":"qweRTY_123",
"password_new":"qweRTY_123456",
"password_new_additional":"Change!23456",
"reference":"DE--21",
"salutation":"Ms"
},
Expand All @@ -39,6 +40,7 @@
"first_name":"Max",
"last_name":"Musterman",
"password":"change123",
"password_new":"Change!23456",
"salutation":"Mr"
},
"yves_fourth_user":{
Expand All @@ -49,6 +51,22 @@
"reference":"DE-30",
"salutation":"Ms"
},
"yves_eighth_user":{
"email":"[email protected]",
"password":"change123",
"password_new":"Change!23456",
"password_new_additional":"qweRTY_123456",
"reference":"DE--2"
},
"yves_ninth_user":{
"email":"[email protected]",
"first_name":"Maggie",
"last_name":"May",
"password":"Change!23456",
"password_new":"qweRTY_123456",
"reference":"DE--3",
"salutation":"Ms"
},
"yves_ottom_admin_user":{
"email":"[email protected]",
"first_name":"Andrew",
Expand Down
31 changes: 28 additions & 3 deletions resources/environments/environments_api_mp_b2c.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"dataType":{
"array":[

]
},
"users":{
Expand All @@ -24,7 +24,8 @@
"first_name":"Sonia",
"last_name":"Wagner",
"password":"change123",
"password_new":"Change@123",
"password_new":"qweRTY_123456",
"password_new_additional":"Change!23456",
"reference":"DE--21",
"salutation":"Ms"
},
Expand All @@ -36,6 +37,30 @@
"reference":"DE--4",
"salutation":"Mr"
},
"yves_third_user":{
"email":"[email protected]",
"first_name":"Max",
"last_name":"Musterman",
"password":"change123",
"password_new":"Change!23456",
"salutation":"Mr"
},
"yves_eighth_user":{
"email":"[email protected]",
"password":"change123",
"password_new":"Change!23456",
"password_new_additional":"qweRTY_123456",
"reference":"DE--2"
},
"yves_ninth_user":{
"email":"[email protected]",
"first_name":"Maggie",
"last_name":"May",
"password":"Change!23456",
"password_new":"qweRTY_123456",
"reference":"DE--3",
"salutation":"Ms"
},
"zed_admin":{
"email":"[email protected]",
"password":"change123"
Expand Down Expand Up @@ -701,4 +726,4 @@
"zip":"10115"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,18 @@ Customer_confirmation_with_empty_type
And Response header parameter should be: Content-Type ${default_header_content_type}

Customer_confirmation_with_already_used_confirmation_key
[Setup] Run Keywords I send a POST request: /customers {"data":{"type":"customers","attributes":{"firstName":"${yves_user.first_name}","lastName":"${yves_user.last_name}","gender":"${gender.female}","salutation":"${yves_user.salutation}","email":"${yves_user.first_name}+${random}@spryker.com","password":"${yves_user.password}","confirmPassword":"${yves_user.password}","acceptedTerms":True}}}
[Setup] Run Keywords I send a POST request: /customers {"data":{"type":"customers","attributes":{"firstName":"${yves_third_user.first_name}","lastName":"${yves_third_user.last_name}","gender":"${gender.male}","salutation":"${yves_third_user.salutation}","email":"${yves_third_user.first_name}.${yves_third_user.last_name}${random}@spryker.com","password":"${yves_third_user.password_new}","confirmPassword":"${yves_third_user.password_new}","acceptedTerms":True}}}
... AND Response status code should be: 201
... AND Save value to a variable: [data][id] user_reference_id
... AND Save the result of a SELECT DB query to a variable: select registration_key from spy_customer where customer_reference = '${user_reference_id}' confirmation_key
... AND I send a POST request: /customer-confirmation {"data":{"type":"customer-confirmation","attributes":{"registrationKey":"${confirmation_key}"}}}
... AND I send a POST request: /customer-confirmation {"data":{"type":"customer-confirmation","attributes":{"registrationKey":"${confirmation_key}"}}}
... AND Response status code should be: 204
... AND Response reason should be: No Content
When I send a POST request:
... /customer-confirmation
... {"data":{"type":"customer-confirmation","attributes":{"registrationKey":"${confirmation_key}"}}}
When I send a POST request: /customer-confirmation {"data":{"type":"customer-confirmation","attributes":{"registrationKey":"${confirmation_key}"}}}
Then Response status code should be: 422
And Response should return error code: 423
And Response should return error message: This email confirmation code is invalid or has been already used.
[Teardown] Run Keywords I get access token for the customer: ${yves_user.first_name}+${random}@spryker.com
[Teardown] Run Keywords I get access token for the customer: ${yves_third_user.first_name}.${yves_third_user.last_name}${random}@spryker.com ${yves_third_user.password_new}
... AND I set Headers: Content-Type=${default_header_content_type} Authorization=${token}
... AND I send a DELETE request: /customers/${user_reference_id}
... AND Response status code should be: 204
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ ENABLER
API_test_setup

Customer_confirmation
[Setup] Run Keywords I send a POST request: /customers {"data":{"type":"customers","attributes":{"firstName":"${yves_user.first_name}","lastName":"${yves_user.last_name}","gender":"${gender.female}","salutation":"${yves_user.salutation}","email":"${yves_user.first_name}+${random}@spryker.com","password":"${yves_user.password}","confirmPassword":"${yves_user.password}","acceptedTerms":True}}}
[Setup] Run Keywords I send a POST request: /customers {"data":{"type":"customers","attributes":{"firstName":"${yves_third_user.first_name}","lastName":"${yves_third_user.last_name}","gender":"${gender.male}","salutation":"${yves_third_user.salutation}","email":"${yves_third_user.first_name}.${yves_third_user.last_name}${random}@spryker.com","password":"${yves_third_user.password_new}","confirmPassword":"${yves_third_user.password_new}","acceptedTerms":True}}}
... AND Response status code should be: 201
... AND Save value to a variable: [data][id] user_reference_id
... AND Save the result of a SELECT DB query to a variable: select registration_key from spy_customer where customer_reference = '${user_reference_id}' confirmation_key
When I send a POST request:
... /customer-confirmation
... {"data":{"type":"customer-confirmation","attributes":{"registrationKey":"${confirmation_key}"}}}
When I send a POST request: /customer-confirmation {"data":{"type":"customer-confirmation","attributes":{"registrationKey":"${confirmation_key}"}}}
Then Response status code should be: 204
And Response reason should be: No Content
[Teardown] Run Keywords I get access token for the customer: ${yves_user.first_name}+${random}@spryker.com
[Teardown] Run Keywords I get access token for the customer: ${yves_third_user.first_name}.${yves_third_user.last_name}${random}@spryker.com ${yves_third_user.password_new}
... AND I set Headers: Content-Type=${default_header_content_type} Authorization=${token}
... AND I send a DELETE request: /customers/${user_reference_id}
... AND Response status code should be: 204
Expand Down
Loading

0 comments on commit e58912b

Please sign in to comment.