Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Api] Add validation for add to cart command #11906

Merged

Conversation

AdamKasp
Copy link
Contributor

@AdamKasp AdamKasp commented Oct 4, 2020

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
License MIT

@AdamKasp AdamKasp requested a review from a team as a code owner October 4, 2020 15:22
@AdamKasp AdamKasp force-pushed the api-add-validation-to-add-to-cart-command branch from 840d35e to a7c9bf7 Compare October 5, 2020 05:41
@GSadee GSadee added the API APIs related issues and PRs. label Oct 5, 2020
@AdamKasp AdamKasp force-pushed the api-add-validation-to-add-to-cart-command branch from a7c9bf7 to 72dcd7b Compare October 5, 2020 20:48
@AdamKasp AdamKasp force-pushed the api-add-validation-to-add-to-cart-command branch from 72dcd7b to 2f6da52 Compare October 5, 2020 20:50
@@ -234,6 +247,17 @@ public function thereShouldBeOneItemInMyCart(): void
$this->sharedStorage->set('item', $items[0]);
}

/**
* @Then /^there should be (\d+) item in my (cart)$/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @Then /^there should be (\d+) item in my (cart)$/
* @Then /^there should be (\d+) item(?:|s) in my (cart)$/

Comment on lines +255 to +256
$response = $this->cartsClient->show($cartToken);
$items = $this->responseChecker->getValue($response, 'items');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$response = $this->cartsClient->show($cartToken);
$items = $this->responseChecker->getValue($response, 'items');
$items = $this->responseChecker->getValue($this->cartsClient->show($cartToken), 'items');

?

@GSadee GSadee merged commit 0c21d42 into Sylius:master Oct 14, 2020
@GSadee
Copy link
Member

GSadee commented Oct 14, 2020

Thanks, Adam! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API APIs related issues and PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants