Skip to content

Develop#3911

Open
nastiaserkh wants to merge 2 commits into
mate-academy:masterfrom
nastiaserkh:develop
Open

Develop#3911
nastiaserkh wants to merge 2 commits into
mate-academy:masterfrom
nastiaserkh:develop

Conversation

@nastiaserkh
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Review Summary

I’m requesting changes due to a critical checklist violation that blocks acceptance. In src/components/Sum/Sum.jsx, the paragraph currently renders as separate text and JSX nodes: Sum of {a} and {b} is {a + b} (see the line where the <p> is returned). This violates [CHECKLIST ITEM #2] which requires the paragraph content to be a single interpolated string expression. Please update that line to use template interpolation, for example: <p>{Sum of ${a} and ${b} is ${a + b}}</p>. This will produce the identical output while satisfying the required style rule.

Everything else looks solid: the component uses named export, defaults a and b to 0, and the App renders the five required cases with passing tests. Once the interpolation format is fixed, this should be good to approve. Keep up the good work!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread src/components/Sum/Sum.jsx Outdated
Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Review Summary

I’m requesting changes due to a critical runtime blocker in the Cypress support files.

  • Critical issue: In cypress/support/commands.js, the declare global { ... } block (e.g., lines containing declare global and login(email: string, password: string): Chainable<void>) uses TypeScript-only syntax in a .js file. This will throw a syntax error when Node/Cypress loads the file and break both cypress/support/component.js and cypress/support/e2e.js which import it.
  • Why it’s wrong: JavaScript does not support declare or type annotations; support files must be valid JavaScript to run. This violates the requirement that tests/support code run without runtime errors.
  • How to fix:
    1. Quick fix: comment out or remove the entire declare global { ... } block in cypress/support/commands.js.
    2. Alternative: move the type declarations into a new cypress/support/commands.d.ts file and keep commands.js pure JS.
    3. Or convert commands.js to TypeScript (commands.ts) and configure Cypress/Node to handle TS.

What’s good: The Sum component and App meet all functional requirements and the tests look correct. After resolving the commands file, your Cypress support imports should load and tests should run. Great work overall—this is a small but important fix to unblock CI/tests.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread cypress/support/commands.js
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands';
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This line imports ./commands. Currently that file contains a declare global { ... } block and TypeScript type annotations which are invalid in a plain JavaScript file — importing it will cause a syntax error at runtime. Fix options:

  • Remove or comment out the declare global / type-annotation block in cypress/support/commands.js.
  • Or convert cypress/support/commands.js to TypeScript (rename to .ts/.d.ts) and adjust project config so TS files are supported.
  • Alternatively, move only the type declarations into a separate .d.ts file and keep commands.js pure JS.

See the problematic content in cypress/support/commands.js for details 【}.

Comment thread cypress/support/component.js
Comment thread cypress/support/e2e.js
@nastiaserkh nastiaserkh reopened this Sep 30, 2025
@nastiaserkh nastiaserkh changed the base branch from develop to master September 30, 2025 21:48
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