-
Notifications
You must be signed in to change notification settings - Fork 0
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
BE-17318 e2e for Boost a Non Music Post #1
base: main
Are you sure you want to change the base?
Conversation
Hi @DivyaMoryani , thanks for the PR! |
From Slack, just for convenience: https://bandlab.atlassian.net/wiki/spaces/QA/pages/2698313926/Boost+Campaigns+Feature#Boost-Posts |
await boostPage.setBudgetAndDuration(); | ||
}) | ||
|
||
When (/^Complete the Boost payment process$/,async function (){ | ||
When(/^I complete the Boost payment process$/,async function (){ | ||
await helpers.waitForTimeout(page,5000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we need this timeout too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @aabrosimov-bl , i observed one thing for UI automation unlike API response which has a stable response time unless the API is heavy , the tests are very flaky... it needs some timeout for some tests otherwise its too fast, resulting in failure, Ive executed a couple of times & its uncertain when it passes/fails, so I added a delay where the tests were failing more often.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future we should look for UI cues to indicate certain events instead of just using delays, because constant delays are always at a risk of being insufficient during service slowdowns etc., but that would be much more complex, so for now it's OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @DivyaMoryani, I've left some comments.
Great work! And sorry again for the late review.
await campaignDashboardPage.campaignDashBoardButton(); | ||
}) | ||
|
||
Then (/^Boost Post Campaign is returned should be returned in the Campaign Dashboard$/,async function (){ | ||
Then(/^Boost Post campaign is returned should be returned in the Campaign Dashboard$/,async function (){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to receive a Boost Post campaign from a parallel/previous test?
If yes, is there any way to ensure, that we are verifying boost of the specific post, created in this test by the earlier step?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to find some x-path for this, but then it got super complicated, then I realised that the Boost locator will always click the first button which is always the post we created in Step 1 "Create a text post" , if that fails all tests will stop. So going with the simple logic for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, is it possible to fail on boosting a post, but still pass the Boost Post campaign is returned should be returned in the Campaign Dashboard
check because we have already a boosted post(for example, from the previous test run on the same account)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the review @stereohorse , yes to avoid this case to pass the "Boost Post campaign is returned should be returned in the Campaign Dashboard" step, What I did now is:
- Created a Text post with a Random test so everytime we have a unique post
- In Campaign Dashboard step - it will check for that unique post & pass/fail accordingly
Hope this makes sense :)
BE-17318 e2e for Boost a Non Music Post
Added a Test Case for Boost a Post.
Tested It Locally: