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

#items in cart not matching expected value for 'problem_user' #6

Open
pramam opened this issue Feb 9, 2022 · 1 comment
Open

#items in cart not matching expected value for 'problem_user' #6

pramam opened this issue Feb 9, 2022 · 1 comment

Comments

@pramam
Copy link
Owner

pramam commented Feb 9, 2022

Bug found in automated tests on branch3-continueworking This branch was not submitted in the pull request.

User Account: problem_user
Likely related to issue #3.

In various tests cases, after adding X number of items to cart, it is found that the Cart Icon on top is showing a different number of items.
Test cases that reproduce this (on branch3-continueworking):
TestCase_3: Added 3 items to cart.
Expectation: To find 3 times in cart.
Actual: Found 2 items in cart.
Line in code that shows the error:
CartPage.checkNumCartItems: has 2 expecting 3 Error: CartPage.checkNumCartItems: has 2 expecting 3 at CartPage.checkNumCartItems (C:\pallavi\code\webdriverio\sdet-candidate-ui-pallavi-2\test\pageobjects\cart.page.js:36:19) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Context.<anonymous> (C:\pallavi\code\webdriverio\sdet-candidate-ui-pallavi-2\test\specs\checkout3.e2e.js:37:9)

TestCase_5:
Added 5 items to cart
Expectation: To find 5 items in cart
Actual: Found 3 items in cart
Line in code that shows the error:
CartPage.checkNumCartItems: has 3 expecting 5 Error: CartPage.checkNumCartItems: has 3 expecting 5 at CartPage.checkNumCartItems (C:\pallavi\code\webdriverio\sdet-candidate-ui-pallavi-2\test\pageobjects\cart.page.js:36:19) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Context.<anonymous> (C:\pallavi\code\webdriverio\sdet-candidate-ui-pallavi-2\test\specs\checkout5.e2e.js:37:9)

TestCase_6:
Added 3 items to cart.
Expectation: To find 3 items in cart
Actual: Found 1 item in cart
Line in code that shows the error:

Error: CartPage.checkNumCartItems: has 1 expecting 3
                    at CartPage.checkNumCartItems (C:\pallavi\code\webdriverio\sdet-candidate-ui-pallavi-2\test\pageobjects\cart.page.js:36:19)
                    at processTicksAndRejections (internal/process/task_queues.js:93:5)
                    at async Context.<anonymous> (C:\pallavi\code\webdriverio\sdet-candidate-ui-pallavi-2\test\specs\checkout6.e2e.js:36:9)```
@pramam
Copy link
Owner Author

pramam commented Feb 9, 2022

On manual testing as problem_user, the cart count was checked. +1 means cart count is updated on clicking 'Add To Cart'. +0 means it did not update cart count as expected.

<style type="text/css"></style>
Cart Count id of item
+1 add-to-cart-sauce-labs-backpack
+1 add-to-cart-sauce-labs-bike-light
+0 add-to-cart-sauce-labs-bolt-t-shirt
+0 add-to-cart-sauce-labs-fleece-jacket
+1 add-to-cart-sauce-labs-onesie
+0 add-to-cart-test.allthethings()-t-shirt-(red)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant