diff --git a/cypress/support/api/requests/Customer.js b/cypress/support/api/requests/Customer.js index 310137467..f51faba36 100644 --- a/cypress/support/api/requests/Customer.js +++ b/cypress/support/api/requests/Customer.js @@ -33,11 +33,13 @@ export function createCustomer(email, customerName, address, isActive = false) { } export function deleteCustomersStartsWith(startsWith) { - getCustomers(startsWith).then(resp => { + const serverStoredEmail = startsWith.toLowerCase(); + + getCustomers(serverStoredEmail).then(resp => { if (resp.body.data.customers) { const customers = resp.body.data.customers.edges; customers.forEach(element => { - if (element.node.email.includes(startsWith)) { + if (element.node.email.includes(serverStoredEmail)) { deleteCustomer(element.node.id); } });