Skip to content

test(e2e): org logos use their stored S3/CloudFront URL (ParakhAI-frontend#470) - #26

Draft
saqibmanan wants to merge 2 commits into
mainfrom
test-sync/ParakhAI-frontend-pr470
Draft

saqibmanan wants to merge 2 commits into
mainfrom
test-sync/ParakhAI-frontend-pr470

Conversation

@saqibmanan

Copy link
Copy Markdown
Contributor

What changed

ParakhAI-frontend#470 (merged to dev 2026-11-04) stops building org logo URLs as NEXT_PUBLIC_DATASPACE_API_URL + logoUrl. Logos are now absolute S3/CloudFront URLs, and they are rendered through a new MediaImage (via mediaUrl()), which falls back to the ParakhAI logo when a load fails.

Test added

tests/e2e/test_ai_maker_dashboard.py::TestOrgCardLogos::test_org_card_logos_load_from_their_own_url (markers e2e, regression, auth):

  • Reads the account's orgs with myOrganizations { name logoUrl }. On dev, 50 have an absolute logo URL.

  • Asserts that each of those orgs' card on /dashboard/ai-maker renders <img src> equal to the stored URL.

  • That one check catches both failure modes:

    • a host glued in front of the URL (the old code)
    • a load failure hidden by MediaImage's fallback

    A plain "image loaded" check would pass in the second case, because the fallback image loads fine.

New code follows the three-layer layout:

  • locator: AIMakerLocators.ORG_CARD_LOGO
  • page method: AIMakerPage.org_card_logos()

Validation on dev (2026-11-06)

  • Green 3 times in a row: 1 passed.
  • Red proofs:
    • Every src prefixed the way the old code did:
      AssertionError: 50 of 50 org logos do not use their stored URL as-is …: {'AGAMI logo': ['https://dev.api.civicdataspace.inhttps://d19fu942vtibly.cloudfront.net/dev…
      
    • CloudFront answering 404, so MediaImage falls back:
      AssertionError: 50 of 50 org logos do not use their stored URL as-is …
      

@saqibmanan saqibmanan self-assigned this Nov 6, 2026
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

Successfully merging this pull request may close these issues.

1 participant