Skip to content

Commit

Permalink
Merge pull request #223 from nodlesh/feature/bcw-showcase-test-dev
Browse files Browse the repository at this point in the history
Debugging BCW Showcase failures in Pipeline
  • Loading branch information
nodlesh authored Dec 7, 2023
2 parents 33fc070 + 9d32f3a commit d3785ea
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
with:
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
directDomains: aries-mediator-agent.vonx.io,apple.com
directDomains: aries-mediator-agent.vonx.io,apple.com,*.apple.com,ppq.apple.com,bc-wallet-demo-dev.apps.silver.devops.gov.bc.ca

# tunnelIdentifier: github-action-tunnel
# region: us-west-1
Expand Down Expand Up @@ -223,7 +223,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: test-screenshots_from_main
path: aries-mobile-test-harness/aries-mobile-tests/*.png
path: *.png
retention-days: 7


Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-test-harness/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ runs:
uses: actions/upload-artifact@v3
with:
name: test-screenshots_from_run_action
path: aries-mobile-test-harness/aries-mobile-tests/*.png
path: *.png
retention-days: 7

branding:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
import base64
import io
import time
from agent_factory.issuer_agent_interface import IssuerAgentInterface
from agent_test_utils import add_border_to_qr_code
from sys import platform
Expand Down Expand Up @@ -82,6 +83,8 @@ def send_credential(self, actor:str, credential_offer=None, version=1, schema=No
self._who_do_you_want_to_be_page = self._bc_wallet_showcase_main_page.select_get_started()
#self.driver.minimize_window()
self.driver.maximize_window()
#pause 3 second to let page loads
time.sleep(3)
self.driver.save_screenshot('who_do_you_want_to_be_page.png')
if actor == "Student":
self._who_do_you_want_to_be_page.select_student()
Expand All @@ -91,14 +94,22 @@ def send_credential(self, actor:str, credential_offer=None, version=1, schema=No
raise Exception(f"Unknown actor type {actor}")
#self.driver.minimize_window()
self.driver.maximize_window()
#pause 3 second to let page loads
time.sleep(3)
self.driver.save_screenshot('who_do_you_want_to_be_page_actor_select.png')
self._lets_get_started_page = self._who_do_you_want_to_be_page.select_next()
#pause 3 second to let page loads
time.sleep(3)
self.driver.save_screenshot('lets_get_started_page.png')
self._install_bc_wallet_page = self._lets_get_started_page.select_next()
#pause 3 second to let page loads
time.sleep(3)
self.driver.save_screenshot('install_bc_wallet_page.png')
self._connect_with_best_bc_college_page = self._install_bc_wallet_page.select_skip()
#self.driver.minimize_window()
self.driver.maximize_window()
#pause 3 second to let page loads
time.sleep(3)
self.driver.save_screenshot('connect_with_best_bc_college_page.png')
qrcode = self._connect_with_best_bc_college_page.get_qr_code()
return add_border_to_qr_code(qrcode)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""

from asyncio import sleep
import time
from agent_factory.verifier_agent_interface import VerifierAgentInterface
from agent_test_utils import add_border_to_qr_code
from sys import platform
Expand Down Expand Up @@ -89,6 +90,8 @@ def connected(self):
def send_proof_request(self, actor:str, proof:str, version=1, request_for_proof=None, connectionless=False):
"""create a proof request """
self._who_do_you_want_to_be_page = self._bc_wallet_showcase_main_page.select_get_started()
#pause 3 second to let page loads
time.sleep(3)
self.driver.save_screenshot('Verifier_who_do_you_want_to_be_page.png')
#self.driver.minimize_window()
self.driver.maximize_window()
Expand All @@ -101,34 +104,52 @@ def send_proof_request(self, actor:str, proof:str, version=1, request_for_proof=
#self.driver.minimize_window()
self.driver.maximize_window()
self._lets_get_started_page = self._who_do_you_want_to_be_page.select_next()
#pause 3 second to let page loads
time.sleep(3)
self.driver.save_screenshot('Verifier_lets_get_started_page.png')
self._install_bc_wallet_page = self._lets_get_started_page.select_next()
#pause 3 second to let page loads
time.sleep(3)
self.driver.save_screenshot('Verifier_install_bc_wallet_page.png')
self._connect_with_best_bc_college_page = self._install_bc_wallet_page.select_skip()
#pause 3 second to let page loads
time.sleep(3)
self.driver.save_screenshot('Verifier_connect_with_best_bc_college_page.png')
#self.driver.minimize_window()
self.driver.maximize_window()
self._youre_all_set_page = self._connect_with_best_bc_college_page.select_i_already_have_my_credential()
#pause 3 second to let page loads
time.sleep(3)
self.driver.save_screenshot('Verifier_youre_all_set_page.png')
self._using_your_credentials_page = self._youre_all_set_page.select_finish()
#pause 3 second to let page loads
time.sleep(3)
self.driver.save_screenshot('Verifier_using_your_credentials_page.png')

if proof == "Cool Clothes Online":
self._getting_a_student_discount_page = self._using_your_credentials_page.select_cool_clothes_online_start()
#pause 3 second to let page loads
time.sleep(3)
self.driver.save_screenshot('Verifier_getting_a_student_discount_page.png')
#self.driver.minimize_window()
self.driver.maximize_window()
self._start_proving_youre_a_student_page = self._getting_a_student_discount_page.select_start()
#pause 3 second to let page loads
time.sleep(3)
self.driver.save_screenshot('Verifier_start_proving_youre_a_student_page.png')
#self.driver.minimize_window()
self.driver.maximize_window()
qrcode = self._start_proving_youre_a_student_page.get_qr_code()
elif proof == "BestBC College":
self._book_a_study_room_page = self._using_your_credentials_page.select_bestbc_college_start()
#pause 3 second to let page loads
time.sleep(3)
self.driver.save_screenshot('Verifier_book_a_study_room_page.png')
#self.driver.minimize_window()
self.driver.maximize_window()
self._start_booking_the_room_page = self._book_a_study_room_page.select_start()
#pause 3 second to let page loads
time.sleep(3)
self.driver.save_screenshot('Verifier_start_booking_the_room_page.png')
#self.driver.minimize_window()
self.driver.maximize_window()
Expand Down
2 changes: 0 additions & 2 deletions aries-mobile-tests/features/steps/bc_wallet/bc_showcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def step_impl(context):
context.device_service_handler.inject_qrcode(qrcode)
context.execute_steps('''
Given they Scan the credential offer QR Code
When the holder opens the credential offer
Then holder is brought to the credential offer screen
When they select Accept
And the holder is informed that their credential is on the way with an indication of loading
Expand All @@ -44,7 +43,6 @@ def step_impl(context):
context.device_service_handler.inject_qrcode(qrcode)
context.execute_steps('''
Given they Scan the proof request QR Code
When the holder opens the proof request
Then holder is brought to the proof request
''')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,19 @@ def step_impl(context):
@then('once the credential arrives they are informed that the Credential is added to your wallet')
@when('once the credential arrives they are informed that the Credential is added to your wallet')
def step_impl(context):
# Check if we are already on the credential added page. This happens if comms is fast enough.
context.thisCredentialAddedPage = CredentialAddedPage(context.driver)
if context.thisCredentialAddedPage.on_this_page():
return

try:
context.thisCredentialAddedPage = context.thisCredentialOnTheWayPage.wait_for_credential()
assert context.thisCredentialAddedPage.on_this_page()
except Exception as e:
if "Unable to accept credential offer" in str(e) or "TimeoutException" in str(e):
raise e
context.thisHomePage = context.thisCredentialOnTheWayPage.select_home()
#context.issuer.driver.save_screenshot('Didnt_get_credential.png')


@then('they select Done')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def select_home(self):
else:
raise Exception(f"App not on the {type(self)} page")

def wait_for_credential(self, timeout=300):
def wait_for_credential(self, timeout=120):

# Wait for the Credential On the way indicator to disappear
try:
Expand Down

0 comments on commit d3785ea

Please sign in to comment.