Skip to content

test: add admin permission tests for library, research, and news#4651

Open
GMetaxakis wants to merge 4 commits intoONEARMY:masterfrom
GMetaxakis:test/admin-permission-library-research-news
Open

test: add admin permission tests for library, research, and news#4651
GMetaxakis wants to merge 4 commits intoONEARMY:masterfrom
GMetaxakis:test/admin-permission-library-research-news

Conversation

@GMetaxakis
Copy link
Copy Markdown
Contributor

PR Checklist

  • - Unit and/or e2e tests for the changes that have been added (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Refactoring (no functional changes)
  • Documentation
  • Other: E2E tests

What is the new behavior?

Adds [By Admin] Cypress E2E tests to library, research, and news write specs, verifying that admins can edit content created by other users. Follows the same pattern established in the questions [By Admin] test (#4630).

Each test:

  1. Signs in as demo_admin
  2. Visits a seeded item not authored by the admin
  3. Asserts the edit button is visible and accessible
  4. Edits a form field and submits
  5. Verifies the edit appears on the detail page

Does this PR introduce a DB Schema Change or Migration?

  • Yes
  • No

Git Issues

Closes #4210

@cypress
Copy link
Copy Markdown

cypress bot commented Mar 3, 2026

onearmy-community-platform    Run #9009

Run Properties:  status check failed Failed #9009  •  git commit 980b92ce31: Merge remote-tracking branch 'origin/master' into test/admin-permission-library-...
Project onearmy-community-platform
Branch Review pull/4651
Run status status check failed Failed #9009
Run duration 13m 52s
Commit git commit 980b92ce31: Merge remote-tracking branch 'origin/master' into test/admin-permission-library-...
Committer Mário Nunes
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 97
View all changes introduced in this branch ↗︎

Tests for review

Failed  src/integration/news/write.spec.ts • 1 failed test • ci-chrome

View Output Video

Test Artifacts
[News.Write] > [Create a news item] > [By Admin] Test Replay Screenshots Video
Flakiness  src/integration/profileList.spec.ts • 1 flaky test • ci-chrome

View Output Video

Test Artifacts
[ProfileList Modal] > [Opens the useful voters modal] Test Replay Screenshots Video

@GMetaxakis GMetaxakis marked this pull request as ready for review March 5, 2026 16:49
@GMetaxakis GMetaxakis requested a review from a team as a code owner March 5, 2026 16:49
@mariojsnunes
Copy link
Copy Markdown
Contributor

I fixed the conflicts, but seems like the tests need to be updated

@benfurber benfurber moved this to In progress in Core Team - BAU list Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status
Status: In progress

Development

Successfully merging this pull request may close these issues.

[testing] What can an admin actually do?

3 participants