Skip to content

Conversation

@YoussifGoda
Copy link

Purpose

This pull request adds the Harvest button to the FarmData2 Launcher Page under the "Others" category.
The new button appears to the left of the Transplanting button, as requested in Issue #282.

Verification Steps

To verify the functionality manually:

  1. Log in to FarmData2 as an manager1 user.
  2. Navigate to FarmData2 → Main (the Launcher page).
  3. Under the "Others" category:
    • Confirm that a Harvest button appears to the left of the Transplanting button.
    • Verify that the button displays the correct text and icon.
  4. Click the Harvest button.
    • Confirm that it navigates to /fd2/harvest.
  5. Ensure no UI layout issues appear in the "Others" category.

To run automated verification:

test.bash --fd2 --live --e2e --glob="modules/farm_fd2/**/main/*.e2e.cy.js" --gui

Approach

  • Updated modules/farm_fd2/src/entrypoints/main/App.vue to:

    • Add the new Harvest button inside the "Others" category.
    • Insert the button to the left of the existing Transplanting button.
    • Include and register the new Harvest icon, converted to image/svg+xml;base64 format—consistent with how other icons are defined.
  • Maintained naming conventions:

    • data-cy="harvest-button"
    • data-cy="harvest-text"
    • data-cy="harvest-icon"
  • Ensured that the new route /fd2/harvest matches existing navigation patterns used for other forms.

Testing

  • Updated the E2E test file main.exists.e2e.cy.js to:

    • Include Harvest inside the “Others” category’s button array.
    • Verify presence, visibility, correct label text, alt text, and icon.
    • Add a navigation test confirming that clicking the Harvest button loads the correct page.
  • Confirmed the test suite continues to detect missing icons or broken routes, ensuring consistency for future regressions.

All updated tests pass after adding the new button and correcting test paths.

Related Issues

Licensing Certification

FarmData2 is a Free Cultural Work and all accepted contributions are licensed as described in the LICENSE.md file. This requires that the contributor holds the rights to do so. By submitting this pull request I certify that I satisfy the terms of the Developer Certificate of Origin for its contents.

Copy link

@braughtg braughtg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good. Nicely done!

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.

Add Harvest to the FarmData2 "Launcher" page.

3 participants