Skip to content

test: add unit tests for CardSearchResultEntity Event and User#1

Draft
lalmulai wants to merge 250 commits into
mainfrom
fix/card-tests-only
Draft

test: add unit tests for CardSearchResultEntity Event and User#1
lalmulai wants to merge 250 commits into
mainfrom
fix/card-tests-only

Conversation

@lalmulai
Copy link
Copy Markdown
Owner

@lalmulai lalmulai commented Dec 8, 2025

Contributor checklist


Description

Related issue

kirthiry and others added 30 commits November 11, 2025 10:06
extra file
Currently translated at 29.6% (195 of 658 strings)

Translation: activist/activist
Translate-URL: https://hosted.weblate.org/projects/activist/activist/uk/

Co-authored-by: mayumo <newnazarchik2020@gmail.com>
Currently translated at 30.6% (202 of 658 strings)

Translation: activist/activist
Translate-URL: https://hosted.weblate.org/projects/activist/activist/uk/

Co-authored-by: mayumo <newnazarchik2020@gmail.com>
…ist-org#1706)

* created authenticated_client fixture in mainn conftest.py file

* began refactoring in authentication tests

* reformatted code

* Fix/ignore mypy error

* reverted test_pwreset

* refactored test_user_flag_delete_does_not_exist

* added session to authenticated_client fixture

* refactored flag tests

* refactored session tests

* refactored group_faq_update

* refactored test_event_text_update.py

* refactored test_group_resource_create.py

* refactored groups test

* refactored test_org_flag_create.py

* initial refactor of communities tests

* coomuities test refactor

* refactored test_resource_flag_create

* refactored resource flag tests

* refactored event tests

* refactored event tests

* finished refactoring test for authenticated users

---------

Co-authored-by: Giuseppe Elefante <giuseppe.elefante-cic@ibm.com>
Co-authored-by: Andrew Tavis McAllister <andrew.t.mcallister@gmail.com>
…st-org#1736)

* chore(frontend):updated topics combobox with new requirements

* Minor changes and removing unneeded code

---------

Co-authored-by: Andrew Tavis McAllister <andrew.t.mcallister@gmail.com>
* fixed prettier issues

* addressed a couple comments

* used infinite scroll comp and make code similar to events page

* implemented comments

* code changes based on review

* Fixes to organization filtering based on updates to topic dropdown

* Fixes for vitest for organization list

---------

Co-authored-by: Andrew Tavis McAllister <andrew.t.mcallister@gmail.com>
) (activist-org#1657)

* test: add unit tests for Sidebar and useSidebar logic (activist-org#1652)

* Fixes for tests to use sidebar composable in tests

---------

Co-authored-by: Ayush Srivastava <ayushsrivastava@Ayushs-MacBook-Air.local>
Co-authored-by: Nicole <31940739+nicki182@users.noreply.github.com>
Co-authored-by: Andrew Tavis McAllister <andrew.t.mcallister@gmail.com>
…activist-org#1716)

* test: add unit tests for useBreakpoint composable (activist-org#1695)

* Add license header, formatting and remove anys

---------

Co-authored-by: Andrew Tavis McAllister <andrew.t.mcallister@gmail.com>
…mponent (activist-org#1743)

Removes duplicate data-testid attribute from draggable component in organization FAQ page to fix Playwright strict mode violation in E2E tests.
…g#1748)

Fixes FAQ creation by using params.groupId instead of params.eventId. This was causing groupId to be empty, preventing FAQ creation from working.
…e nested interactive controls (activist-org#1745)

* fix: move edit/delete buttons outside FAQ disclosure button to resolve nested interactive controls

Moves IconEdit and IconDelete buttons outside the DisclosureButton component to fix WCAG nested-interactive accessibility violation. Also adds tabindex="-1" to drag handle to ensure it's not focusable.

* Add focus brand, IconDelete is a button, a11y fixes

---------

Co-authored-by: Andrew Tavis McAllister <andrew.t.mcallister@gmail.com>
ShivaniNR and others added 30 commits March 20, 2026 20:47
…ctivist-org#2033)

* fix: QR code modal not opening from share modal (activist-org#2022)

* remove unnecesary render-modal prop

* fix e2e qr code button click

* fix e2e qr code button click

---------

Co-authored-by: Nicole <31940739+nicki182@users.noreply.github.com>
Co-authored-by: nicki182 <Nicky.stru@gmail.com>
…#2028)

Bumps [h3](https://github.com/h3js/h3) from 1.15.5 to 1.15.8.
- [Release notes](https://github.com/h3js/h3/releases)
- [Changelog](https://github.com/h3js/h3/blob/main/CHANGELOG.md)
- [Commits](h3js/h3@v1.15.5...v1.15.8)

---
updated-dependencies:
- dependency-name: h3
  dependency-version: 1.15.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Tavis McAllister <andrew.t.mcallister@gmail.com>
…#2038)

Bumps [h3](https://github.com/h3js/h3) from 1.15.8 to 1.15.9.
- [Release notes](https://github.com/h3js/h3/releases)
- [Changelog](https://github.com/h3js/h3/blob/v1.15.9/CHANGELOG.md)
- [Commits](h3js/h3@v1.15.8...v1.15.9)

---
updated-dependencies:
- dependency-name: h3
  dependency-version: 1.15.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…org#2037)

Bumps [flatted](https://github.com/WebReflection/flatted) from 3.3.3 to 3.4.2.
- [Commits](WebReflection/flatted@v3.3.3...v3.4.2)

---
updated-dependencies:
- dependency-name: flatted
  dependency-version: 3.4.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… toast (activist-org#2044)

* test(e2e): event create modal 500 handling and combobox helpers

- Close org/topic comboboxes with Escape (Headless UI)
- Add create event API error route + toast assertion

* test(e2e): event create modal — close org/topic combobox via trigger + hidden

Replace Escape with second trigger click and expect options hidden (prior pattern).

* fix prettier and lint
…rg#2042)

* test(e2e): events list and event about API error coverage

- events-list-api-errors: mock GET /api/public/events/events — 500 + toast +
  empty state; 200 empty results without error toast (P0 §4.1–4.2)
- event-about-api-errors: mock detail GET — 500/404/403 → Nuxt error.vue
  with status, message, return home (P0 §5.1–5.2)

* test(e2e): wrap server-error and group flows in withTestStep

- Delegate withTestStep to Playwright test.step for clearer traces
- Add steps to FAQ/resources server-error specs (events, orgs, groups)
- Add steps to group FAQ/resources management and about content/social specs

* Revert "test(e2e): wrap server-error and group flows in withTestStep"

This reverts commit f0c0a3f.

* chore(e2e): remove withTestStep from events list and about API error specs

Align with reverting test.step trace work on this branch; keep scenarios unchanged.

* fix prettier

---------

Co-authored-by: Nicole <31940739+nicki182@users.noreply.github.com>
* fix qrcode image

* Remove qrcode.vue and add qrcode back in + minor nits

* Pin vueuse/integrations

---------

Co-authored-by: Andrew Tavis McAllister <andrew.t.mcallister@gmail.com>
activist-org#2026)

* fix issue with pagination when coming back from a page + refactor stores to make it more maintanable and modular with factory stores

* fix nuxt type check

* Misc fixes for formatting

* Fix pagination of events - default view is now list

* Fix first pagination load for events and orgs

---------

Co-authored-by: Andrew Tavis McAllister <andrew.t.mcallister@gmail.com>
…rg#1958)

* feat(dev): add Mailhog to dev stack for email capture

Add Mailhog as a Docker Compose service so outbound emails are captured
locally instead of discarded, unblocking E2E tests for sign-up and
password reset flows.

- Add mailhog service to docker-compose.yml (SMTP :1025, API :8025)
- Set backend depends_on mailhog and forward EMAIL_* env vars
- Update .env.dev to use Mailhog (smtp backend, host, port, no TLS/auth)
- Make EMAIL_BACKEND env-driven in settings.py (console fallback retained)
- Add frontend/test-e2e/utils/mailhog.ts utility for use in future specs

Made-with: Cursor

* Add sign-up E2E tests and fix sign-up page a11y violations

- Add SignUpPage page object mirroring SignInPage pattern
- Add sign-up-validation.spec.ts: password strength, toggle visibility,
  captcha, mismatched/weak password errors, navigation, accessibility
- Add sign-up-authentication.spec.ts: full sign-up → email confirm →
  sign-in flow via Mailhog, and unconfirmed user error handling
- Add mailhog.ts utility: waitAndConfirmEmail navigates the confirmation
  link in-browser for full frontend flow coverage
- Fix aria-prohibited-attr: add role="img" to confirm password icon span
- Fix missing label: associate terms checkbox with its label via aria-labelledby

Made-with: Cursor

* fix prettier

* fix(lint): fix attribute order on Icon in sign-up.vue

Made-with: Cursor

---------

Co-authored-by: Andrew Tavis McAllister <andrew.t.mcallister@gmail.com>
Wait for DELETE /events/event_faqs/ after confirm; assert 200/204. Poll FAQ count to initialFaqCount with longer timeout and intervals — ModalAlert does not await async parent delete + refetch.
…dening (activist-org#2048)

* test(e2e): password reset MailHog flow and mailhog helpers

- mailhog: derive API base from MAILHOG_API_URL (origin); add findPasswordResetEmail and waitAndOpenPasswordResetLink; parse pwreset links with optional locale segment.

- Add PasswordResetPage page objects and password-reset-authentication.spec (serial MailHog E2E, invalid-email validation, reset-password index navigation).

* refactor(e2e): DRY MailHog polling and extract pwreset landing helper

- mailhog: shared fetchMailhogMessages, itemToEmail, pollMailhogUntil; getLatestEmail and waitAndConfirmEmail reuse them; findPasswordResetEmail uses linear scan for newest match.

- Add passwordResetNavigation.isPostPasswordRequestLanding for reuse from password-reset spec.

- Drop redundant URL expect after waitAndOpenPasswordResetLink.

* test(e2e): MailHog poll speedups; deterministic event FAQ/resources permissions

- mailhog: cache API base; fast-then-slow poll sleeps; confirm-email uses batch+newest match; extract*FromDecoded + single decode on chosen mail.

- Add ensureAtLeastOneEventResource + admin beforeEach on event-resources-permissions.

- event-faq-permissions admin: ensureMinimumFAQs(1) beforeEach; align card assertion timeouts with resources.

* fix prettier and lint

---------

Co-authored-by: Nicole <31940739+nicki182@users.noreply.github.com>
…#2018) (activist-org#2029)

* refactor: abstract ModalQRCode component to be reusable

* refactor: abstract ModalQRCodeBtn; change component call; removed any type

* refactor: use useLinkUrl composable in CardDetails

* refactor: use useLinkUrl composable in CardAboutGroup and CardAboutOrganization

* test: add QR code new props tests

* fix typing and refactoring based on new refacordered modal

* fix prettier

* fix typecheck

* fix vitests

---------

Co-authored-by: Nicole <31940739+nicki182@users.noreply.github.com>
Co-authored-by: nicki182 <Nicky.stru@gmail.com>
activist-org#2032)

* refactor error management through a composable and added redirect after creating organization and event

* fix threshold of unit tests

* Misc fixes to code

---------

Co-authored-by: Andrew Tavis McAllister <andrew.t.mcallister@gmail.com>
activist-org#2063)

Add comprehensive tests covering:

useMenuEntriesState:
- Returns correct ref structure (organizationEntry, eventEntry)
- Organization entries have basePath 'organizations'
- Event entries have basePath 'events'
- Expected menu items are present for both contexts
- Each entry has label, routeUrl, iconUrl, selected, id, basePath
- Route URLs contain the correct basePath
- Cleanup on unmount

useQRCode:
- Returns expected interface (showTooltip, availableFormats, downloadQRCode, onImageClick, qrcode)
- showTooltip initializes as false and can be toggled
- availableFormats lists PNG, JPEG, SVG
- Pixel dimensions included in format strings when qrcode is set
- Correct aspect ratio computation for non-square QR codes

Closes activist-org#2058, closes activist-org#2059
…ctivist-org#2069)

* ci(e2e): bump GitHub Actions to Node 24 runtimes

- actions/checkout@v4 -> @v5
- actions/setup-node@v4 -> @v5
- actions/upload-artifact@v4 -> @v6

Applies only to Playwright desktop and mobile workflows; addresses
Node 20 deprecation warnings for those actions.

* fix failing/flaky tests
* added useMap.spec.ts

* added more test for buttons

* fixed issues

* fixed some issues and fixed formatting

* fixed license header

* sorted imports

* Fix comments on useMap tests

---------

Co-authored-by: Andrew Tavis McAllister <andrew.t.mcallister@gmail.com>
…t-org#2055)

* build(deps): bump requests from 2.32.5 to 2.33.0 in /backend

Bumps [requests](https://github.com/psf/requests) from 2.32.5 to 2.33.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](psf/requests@v2.32.5...v2.33.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.33.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update dev dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Tavis McAllister <andrew.t.mcallister@gmail.com>
…t-org#2067)

Bumps [pygments](https://github.com/pygments/pygments) from 2.19.2 to 2.20.0.
- [Release notes](https://github.com/pygments/pygments/releases)
- [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES)
- [Commits](pygments/pygments@2.19.2...2.20.0)

---
updated-dependencies:
- dependency-name: pygments
  dependency-version: 2.20.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Tavis McAllister <andrew.t.mcallister@gmail.com>
…E2E utils (activist-org#2074)

* feat(e2e): empty states for event FAQ and resources

Wire EmptyState permission to canEdit(event) on event FAQ and resources pages so copy matches who can add content. Add Playwright specs that mock GET /api/public/events/events/:id (embedded faqEntries/resources) for admin, non-editor member, and non-empty lists. Add mockPublicEventDetail helper for route + payload shape.

* chore(e2e): kebab-case names for test-e2e utils

Rename multi-word Playwright helper modules to kebab-case (aligned with server-readiness.ts and spec filenames). Update all ~/test-e2e/utils imports accordingly.

* fix prettier

* test(e2e): stabilize event FAQ CRUD spec initial count

Wait for first FAQ card or empty state before reading initialFaqCount so the count matches loaded seed data and the post-delete poll is reliable.

* fix prettier

---------

Co-authored-by: Andrew Tavis McAllister <andrew.t.mcallister@gmail.com>
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.