bcgov / bc-wallet-mobile

BC Wallet to hold Verifiable Credentials
Apache License 2.0
62 stars 50 forks source link

TestIDs different on iOS Cred Offer for BC VC Pilot Invitation Credential #894

Closed nodlesh closed 1 year ago

nodlesh commented 1 year ago

Steps to Reproduce

Given the app is running  on iOS
And I have a gone through the process of getting a BC VC Pilot Invitation credential
 | https://bcvcpilot-issuer-admin-test.apps.silver.devops.gov.bc.ca |
When I am on the Credential Offer page with that credential there
Then the the structure of the TestIDs on the page is different for the BC VC Pilot Invitation credential than other credentials 
And is missing `com.ariesbifold:id/CredentialCardHeader`

The structure of the Credential Offer page with the Pilot Invitation Credential is as follows:

<XCUIElementTypeOther type="XCUIElementTypeOther" name="com.ariesbifold:id/CredentialCard" label="DITP Pilot Invitation Issued: Feb 9, 2023" enabled="true" visible="true" accessible="false" x="15" y="106" width="360" height="195" index="0">\n                                                            <XCUIElementTypeOther type="XCUIElementTypeOther" name="DITP Pilot Invitation Issued: Feb 9, 2023" label="DITP Pilot Invitation Issued: Feb 9, 2023" enabled="true" visible="true" accessible="false" x="15" y="106" width="360" height="195" index="0">\n                                                            <XCUIElementTypeOther type="XCUIElementTypeOther" name="DITP Pilot Invitation" label="DITP Pilot Invitation" enabled="true" visible="true" accessible="false" x="15" y="106" width="360" height="57" index="0"/>\n                                                            <XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" accessible="false" x="15" y="106" width="360" height="195" index="1"/>\n                                                            <XCUIElementTypeOther type="XCUIElementTypeOther" name="com.ariesbifold:id/CredentialCardBody" enabled="true" visible="true" accessible="false" x="15" y="162" width="360" height="100" index="2"/>\n                                                            <XCUIElementTypeOther type="XCUIElementTypeOther" name="com.ariesbifold:id/CredentialCardFooter" label="Issued: Feb 9, 2023" enabled="true" visible="true" accessible="false" x="15" y="261" width="360" height="41" index="3"/>\n                                                            </XCUIElementTypeOther>\n                                                            </XCUIElementTypeOther>\n                                                            </XCUIElementTypeOther>\n                                                            </XCUIElementTypeOther>\n                                                            </XCUIElementTypeOther>\n                                                            </XCUIElementTypeOther>\n                                                            </XCUIElementTypeOther>\n                                                            <XCUIElementTypeOther type="XCUIElementTypeOther" value="0%" name="Vertical scroll bar, 1 page" label="Vertical scroll bar, 1 page" enabled="true" visible="true" accessible="false" x="357" y="91" width="30" height="255" index="1"/>\n                                                            <XCUIElementTypeOther type="XCUIElementTypeOther" value="0%" name="Horizontal scroll bar, 1 page" label="Horizontal scroll bar, 1 page" enabled="true" visible="true" accessible="false" x="0" y="313" width="390" height="30" index="2"/>\n                                   

Note: Android has no difference in the testIDs between these Credentials, so there is no problem there.

Expected Result

All credentials, no matter what issuer the credential came from (even the Pilot Invitation Credential) will have the same TestIDs for pulling the elements for testing.

The structure of the Credential Offer page with other Credential and is expected for the Pilot Invitation is as follows:

<XCUIElementTypeOther type="XCUIElementTypeOther" name="08373559-21b6-474a-8278-ee18bd444bad Unverified Person Issued: Feb 9, 2023" label="08373559-21b6-474a-8278-ee18bd444bad Unverified Person Issued: Feb 9, 2023" enabled="true" visible="true" accessible="true" x="15" y="107" width="384" height="207" index="0">\n                                                            <XCUIElementTypeOther type="XCUIElementTypeOther" name="com.ariesbifold:id/CredentialCard" label="08373559-21b6-474a-8278-ee18bd444bad Unverified Person Issued: Feb 9, 2023" enabled="true" visible="true" accessible="false" x="15" y="107" width="384" height="207" index="0">\n                                                            <XCUIElementTypeOther type="XCUIElementTypeOther" name="08373559-21b6-474a-8278-ee18bd444bad Unverified Person" label="08373559-21b6-474a-8278-ee18bd444bad Unverified Person" enabled="true" visible="true" accessible="false" x="15" y="107" width="384" height="60" index="0">\n                                                            <XCUIElementTypeOther type="XCUIElementTypeOther" name="com.ariesbifold:id/CredentialCardHeader" label="08373559-21b6-474a-8278-ee18bd444bad Unverified Person" enabled="true" visible="true" accessible="false" x="23" y="115" width="368" height="52" index="0"/>\n                                                            </XCUIElementTypeOther>\n                                                            <XCUIElementTypeOther type="XCUIElementTypeOther" name="com.ariesbifold:id/CredentialCardBody" enabled="true" visible="true" accessible="false" x="15" y="167" width="384" height="108" index="1"/>\n                                                            <XCUIElementTypeOther type="XCUIElementTypeOther" name="com.ariesbifold:id/CredentialCardFooter" label="Issued: Feb 9, 2023" enabled="true" visible="true" accessible="false" x="15" y="274" width="384" height="40" index="2">\n                                                            <XCUIElementTypeStaticText type="XCUIElementTypeStaticText" value="Issued: Feb 9, 2023" name="com.ariesbifold:id/CredentialIssued" label="Issued: Feb 9, 2023" enabled="true" visible="true" accessible="false" x="25" y="284" width="127" height="21" index="0"/>\n     

Environment

BC Wallet build 691 All iOS devices

Workaround

I could pass test context to the page objects and have a condition if running BC VC tests, use a different TestID but that would break the patterns used in the test harness, and violate separation of concerns.

Severity

Medium

Priority

Medium

Screenshots or Video

Screenshot 2023-02-09 at 3.33.55 PM.png

Test Impact

T001-BCSC, T002-BCSC

hiteshgh commented 1 year ago

@nodlesh - can you pls re-test and close if working

nodlesh commented 1 year ago

Cannot test yet until test refactoring. Test is failing and not getting as far as needed to verify this issue.

nodlesh commented 1 year ago

Closing. This page has testID issues, but this particular problem is not happening anymore.