Skip to content

Add e2e tests #3137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 50 commits into
base: master
Choose a base branch
from
Draft

Add e2e tests #3137

wants to merge 50 commits into from

Conversation

Nateowami
Copy link
Collaborator

@Nateowami Nateowami commented Apr 1, 2025

This change is Reviewable

}

// TODO add this to the test
async function addComment(page: Page, user: UserEmulator): Promise<void> {

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused function addComment.

Copilot Autofix

AI 16 days ago

The best way to fix this issue is to remove the unused addComment function entirely. This will eliminate the warning and improve code clarity. If the function is needed in the future, it can be re-added when the corresponding test or feature is implemented.


Suggested changeset 1
src/SIL.XForge.Scripture/ClientApp/e2e/workflows/community-checking.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/SIL.XForge.Scripture/ClientApp/e2e/workflows/community-checking.ts b/src/SIL.XForge.Scripture/ClientApp/e2e/workflows/community-checking.ts
--- a/src/SIL.XForge.Scripture/ClientApp/e2e/workflows/community-checking.ts
+++ b/src/SIL.XForge.Scripture/ClientApp/e2e/workflows/community-checking.ts
@@ -186,8 +186,2 @@
 
-// TODO add this to the test
-async function addComment(page: Page, user: UserEmulator): Promise<void> {
-  await user.click(page.getByRole('button', { name: /Show \d more unread answers/ }));
-  await user.click(page.getByRole('button', { name: 'Add a comment' }).first());
-  await user.type('This is a good answer.');
-  await user.click(page.getByRole('button', { name: 'Save' }));
-}
+// Removed unused function `addComment`.
EOF
@@ -186,8 +186,2 @@

// TODO add this to the test
async function addComment(page: Page, user: UserEmulator): Promise<void> {
await user.click(page.getByRole('button', { name: /Show \d more unread answers/ }));
await user.click(page.getByRole('button', { name: 'Add a comment' }).first());
await user.type('This is a good answer.');
await user.click(page.getByRole('button', { name: 'Save' }));
}
// Removed unused function `addComment`.
Copilot is powered by AI and may make mistakes. Always verify output.
Copy link

codecov bot commented Apr 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.05%. Comparing base (bd8c628) to head (afc686e).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3137   +/-   ##
=======================================
  Coverage   83.05%   83.05%           
=======================================
  Files         568      568           
  Lines       33062    33062           
  Branches     5339     5339           
=======================================
  Hits        27459    27459           
+ Misses       4811     4800   -11     
- Partials      792      803   +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Nateowami Nateowami force-pushed the feature/e2e-tests branch from c6ce63d to 511f1c6 Compare April 1, 2025 20:57
@Nateowami Nateowami force-pushed the feature/e2e-tests branch from 511f1c6 to 240ee13 Compare April 1, 2025 21:10
@Nateowami Nateowami force-pushed the feature/e2e-tests branch from 240ee13 to da62195 Compare April 1, 2025 21:23
@Nateowami Nateowami force-pushed the feature/e2e-tests branch from da62195 to 70c712a Compare April 1, 2025 21:28
@Nateowami Nateowami force-pushed the feature/e2e-tests branch from 70c712a to 05107a7 Compare April 1, 2025 22:00
@Nateowami Nateowami force-pushed the feature/e2e-tests branch from 05107a7 to ee77482 Compare April 1, 2025 22:01
@Nateowami Nateowami force-pushed the feature/e2e-tests branch from ee77482 to a868388 Compare April 1, 2025 22:03
@Nateowami Nateowami force-pushed the feature/e2e-tests branch from a868388 to 8f539c4 Compare April 1, 2025 22:15
@Nateowami Nateowami force-pushed the feature/e2e-tests branch from 8f539c4 to c7d706b Compare April 3, 2025 15:50
base64 --decode - <<< "${E2E_SECRETS_JSON_BASE64}" > ./ClientApp/e2e/secrets.json

- name: Set up Deno
uses: denoland/setup-deno@v2

Check failure

Code scanning / zizmor

action is not pinned to a hash (required by blanket policy) Error

action is not pinned to a hash (required by blanket policy)
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.

3 participants