Show extra content to customerIT

See also Advise product based on customer profileIT

Contents

Show to customers product image and description so they can have a better idea of what they are buying

Specification

Given the availability of a "Salame 'Nduja Calabrese"
With variety of salumi "'Nduja" with image link "0/00/Nduja.jpg"


When requesting best offer for a customer

Then the suggestion for customer is a "'Nduja" type of salumi
And contains an image link with url "https://upload.wikimedia.org/wikipedia/commons/0/00/Nduja.jpg"
And a product description link with url "https://it.wikipedia.org/w/api.php?format=xml&action=query&prop=extracts&exintro=&explaintext=&titles='Nduja"

Test results:

Test passed

request from Customer to Supplier

http://localhost:8081/salume/supplier/advise/for/Magic

response from Supplier to Customer

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <product-advisor> <products> <product> <id>375</id> <name>Salame 'Nduja Calabrese</name> <price>EUR 11,11</price> <reputation>special</reputation> <variety>'Nduja</variety> <image>https://upload.wikimedia.org/wikipedia/commons/0/00/Nduja.jpg</image> <description>https://it.wikipedia.org/w/api.php?format=xml&amp;action=query&amp;prop=extracts&amp;exintro=&amp;explaintext=&amp;titles='Nduja</description> <fat-percentage>49,99</fat-percentage> </product> </products> </product-advisor>

Sequence Diagram

Customer Customer Supplier Supplier request response

Return default image url when there is no image link

Specification

Given the availability of a "Salame 'Nduja Calabrese"
With variety of salumi "'Nduja" with no image link


When requesting best offer for a customer

Then the suggestion for customer is a "'Nduja" type of salumi
And contains an image link with url "https://upload.wikimedia.org/wikipedia/commons/b/b5/Formaggi_e_salumi_sardi.jpg"
And a product description link with url "https://it.wikipedia.org/w/api.php?format=xml&action=query&prop=extracts&exintro=&explaintext=&titles='Nduja"

Test results:

Test passed

request from Customer to Supplier

http://localhost:8081/salume/supplier/advise/for/Magic

response from Supplier to Customer

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <product-advisor> <products> <product> <id>376</id> <name>Salame 'Nduja Calabrese</name> <price>EUR 11,11</price> <reputation>special</reputation> <variety>'Nduja</variety> <image>https://upload.wikimedia.org/wikipedia/commons/b/b5/Formaggi_e_salumi_sardi.jpg</image> <description>https://it.wikipedia.org/w/api.php?format=xml&amp;action=query&amp;prop=extracts&amp;exintro=&amp;explaintext=&amp;titles='Nduja</description> <fat-percentage>49,99</fat-percentage> </product> </products> </product-advisor>

Sequence Diagram

Customer Customer Supplier Supplier request response