Skip to content

Conversation

@gerteck
Copy link
Member

@gerteck gerteck commented May 27, 2025

What is the purpose of this pull request?

  • Documentation update
  • Bug fix
  • Feature addition or enhancement
  • Code maintenance
  • DevOps
  • Improve developer experience
  • Others, please explain:

Overview of changes:

Update portfolio functional tests and also update
the portfolio test snapshots.

See #2720 for details.
Fixes #2720

NOTE:
Note that this PR #2721 will have merge conflicts with PR #2718. This is because of the page-vue-render.js files that are being checked and commited. After merging one, I will resolve the merge conflicts as needed for the other. It does not matter which PR is merged first.

It also looks like there are many files changed, but I only did two things:

  1. add portfolio into the list of test template sites.
  2. Update portfolio snapshot files

PR-reviewer would just have verify that any changes are due to these two steps, and there are no unrelated changes or regressions.

Anything you'd like to highlight/discuss:

I believe the files for the functional tests for portfolio may have been copied over manually previously when it was added, causing the setup of the functional tests for the portfolio template to be overlooked. This PR rectifies this.

Testing instructions:

npm run test in the packages/cli directory.

Ensure portfolio snapshot functional tests run, and pass.

Proposed commit message: (wrap lines at 72 characters)

Set up Portfolio Functional Tests

Update portfolio functional tests and update
portfolio test snapshots through updatetest.


Checklist: ☑️

  • Updated the documentation for feature additions and enhancements
  • Added tests for bug fixes or features
  • Linked all related issues
  • No unrelated changes

Reviewer checklist:

Indicate the SEMVER impact of the PR:

  • Major (when you make incompatible API changes)
  • Minor (when you add functionality in a backward compatible manner)
  • Patch (when you make backward compatible bug fixes)

At the end of the review, please label the PR with the appropriate label: r.Major, r.Minor, r.Patch.

Breaking change release note preparation (if applicable):

  • To be included in the release note for any feature that is made obsolete/breaking

Give a brief explanation note about:

  • what was the old feature that was made obsolete
  • any replacement feature (if any), and
  • how the author should modify his website to migrate from the old feature to the replacement feature (if possible).

Update portfolio functional tests and also update
the portfolio test snapshots.
@codecov
Copy link

codecov bot commented May 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.84%. Comparing base (1a74607) to head (6bac661).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #2721    +/-   ##
========================================
  Coverage   52.84%   52.84%            
========================================
  Files         130      130            
  Lines        7162     7162            
  Branches     1594     1503    -91     
========================================
  Hits         3785     3785            
+ Misses       3222     3072   -150     
- Partials      155      305   +150     

☔ 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.

@damithc damithc requested a review from Copilot May 30, 2025 13:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the portfolio functional tests by updating the snapshot files to reflect the new MarkBind 6.0.0 release and by adding the portfolio template to the testSites list. The key changes include:

  • Renaming a project key in the expected siteData.json.
  • Upgrading snapshot files (HTML, JS, and other assets) to MarkBind 6.0.0 while removing obsolete files.
  • Adding the portfolio template reference in testSites.js.

Reviewed Changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/cli/test/functional/test_site_templates/test_portfolio/expected/siteData.json Renamed the project key from "example-project-ip-for-cs2103" to "project-1" for clarity.
packages/cli/test/functional/test_site_templates/test_portfolio/expected/index.html Updated meta generator tag, script load order and content reflecting MarkBind 6.0.0 changes.
packages/cli/test/functional/test_site_templates/test_portfolio/expected/index.page-vue-render.js Replaced the old Vue render function with the new compiled render function via a dynamic Function.
packages/cli/test/functional/test_site_templates/test_portfolio/expected/* Removed several outdated snapshot files (e.g. index.md, skills.md, projects.md, etc.) which seem to be consolidated in the new snapshot design.
packages/cli/test/functional/testSites.js Added the portfolio test template to the list of test sites.
Comments suppressed due to low confidence (2)

packages/cli/test/functional/test_site_templates/test_portfolio/expected/siteData.json:12

  • Please confirm that renaming the project key from 'example-project-ip-for-cs2103' to 'project-1' is intentional and consistent with the naming conventions used across portfolio snapshots.
"project-1": "Example project: iP for CS2103",

packages/cli/test/functional/test_site_templates/test_portfolio/expected/index.html:7

  • Verify that the updated generator meta tag and the revised script loading order for MarkBind 6.0.0 are aligned with the latest documentation and provide the expected functionality in the portfolio tests.
<meta name="generator" content="MarkBind 6.0.0">

@gerteck gerteck requested a review from AgentHagu July 2, 2025 15:37
Copy link
Contributor

@AgentHagu AgentHagu left a comment

Choose a reason for hiding this comment

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

LGTM! The tests are running and passing as expected!

@gerteck gerteck marked this pull request as draft July 5, 2025 18:58
@gerteck
Copy link
Member Author

gerteck commented Jul 5, 2025

Need to update to account for ignore of render js files

@gerteck gerteck marked this pull request as ready for review July 6, 2025 10:25
@AgentHagu AgentHagu merged commit f681976 into MarkBind:master Jul 7, 2025
10 checks passed
@github-actions github-actions bot added the r.Patch Version resolver: increment by 0.0.1 label Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

r.Patch Version resolver: increment by 0.0.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set up testing for portfolio template page

2 participants