OpenUnited / platform

Other
41 stars 66 forks source link

e2e tests: Claim Bounty #313

Closed sachintom999 closed 3 months ago

sachintom999 commented 4 months ago

Changes

Testing test_clain_bounty

endalkh commented 4 months ago

Changes

  • Refactored BaseE2ETest to be reused across all the tests which requires login. Inheriting BaseE2ETest will automatically creates a test user and login the test user into the application. Any such test only need to handle the functionality and checks after login .
  • Because of the above, refactored e2e/test_login.py
  • Added tests for Claim Bounty functionality

Testing test_clain_bounty test_clain_bounty

@sachintom999 Great job! Is that possible to use function-based? Thanks!

adrianmcphee commented 4 months ago

@sachintom999 are the changes requested by @endalkh sufficiently clear?

sachintom999 commented 4 months ago

@sachintom999 are the changes requested by @endalkh sufficiently clear?

@adrianmcphee , yes it clear . I got occupied and didnt get a chance to address it . Will push the changes in a couple of days .

sachintom999 commented 3 months ago

@endalkh, thanks for your review comments. Really appreciate it. Before I make the changes as per your last comments, I am planning to get the test pass in the pipeline. It is passing in my local, but somehow failing in the pipeline . Error - The assertion for BountyClaim record , on clicking Claim Bounty button is failing. I tried increasing the delay between the click and assertion , to make sure enough time for the db operation ( BountyClaim record creation) to complete.

If you have bandwidth, could you please try at your end as well ?

endalkh commented 3 months ago

@endalkh, thanks for your review comments. Really appreciate it. Before I make the changes as per your last comments, I am planning to get the test pass in the pipeline. It is passing in my local, but somehow failing in the pipeline . Error - The assertion for BountyClaim record , on clicking Claim Bounty button is failing. I tried increasing the delay between the click and assertion , to make sure enough time for the db operation ( BountyClaim record creation) to complete.

If you have bandwidth, could you please try at your end as well ?

Hey @sachintom999, Thank you, Sure! I'll check that.

Update Yeah, I have tested locally and worked fine but not on the GitHub action workflow. claim request action works fine on the staging. So, the problem is when the automation clicks the button to request the claim. Can you start the automation from bounty creation? This is the XPath of the button "/html/body/main/div/div[3]/p/a/button"

sachintom999 commented 3 months ago

@endalkh thanks for the input. I will check that and get back.