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 55 commits into
base: master
Choose a base branch
from
Draft

Add e2e tests #3137

wants to merge 55 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

Unused function addComment.

Copilot Autofix

AI 3 days ago

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


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
@@ -189,8 +189,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 the unused `addComment` function)
EOF
@@ -189,8 +189,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 the unused `addComment` function)
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.00%. Comparing base (ed9d826) to head (d606624).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3137   +/-   ##
=======================================
  Coverage   83.00%   83.00%           
=======================================
  Files         569      569           
  Lines       33177    33177           
  Branches     5325     5342   +17     
=======================================
  Hits        27540    27540           
+ Misses       4844     4833   -11     
- Partials      793      804   +11     

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

🚀 New features to boost your workflow:
  • 📦 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
@Nateowami Nateowami force-pushed the feature/e2e-tests branch from d606624 to dde93bb Compare May 7, 2025 23:18
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