Skip to content
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

Fix testing for Step 28 of Building a fCC Authors Page #54654

Closed
katereverie opened this issue May 4, 2024 · 0 comments · Fixed by #54655
Closed

Fix testing for Step 28 of Building a fCC Authors Page #54654

katereverie opened this issue May 4, 2024 · 0 comments · Fixed by #54655
Labels
scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. status: PR in works Work in Progress (WIP) Issues. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.

Comments

@katereverie
Copy link
Contributor

katereverie commented May 4, 2024

Describe the Issue

The code provided below does not pass, even though it should.

The test does not allow for an optional whitespace between the backticks/single or double quotation marks and the element - in this case a paragraph element.
The hint message does not suggest that campers keep the code in one line. In fact, throughout all the curricula, I've been under the impression that creating several lines for setting .innerHTML improves readability, and is, therefore, good practice.
So, I don't see any reasons why the tests shouldn't allow this formatting.

Since I was not sure whether my code generates an essential difference on the UI/Webpage, I tested it. There was no difference.
So, I thought this might be a bug in testing.

I filed a PR on this issue.
I am quite new to contributing and still learning.
Please let me know if there is anything I've done that did not follow good practice.

Affected Page

https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-fetch-and-promises-by-building-an-fcc-authors-page/step-28

Your code

authorContainer.innerHTML = `
  <p class="error-msg">There was an error loading the authors</p>
  `;

Expected behavior

The test does not allow for an optional whitespace between the backticks and the added element.
It should.

Screenshots

Screenshot 2024-05-04 at 09-12-56 freeCodeCamp org

System

  • Device: Laptop
  • OS: Windows 11
  • Browser: FireFox
  • Version: 125.0.2 (64-bit)

Additional context

No response

@katereverie katereverie added scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc. labels May 4, 2024
@huyenltnguyen huyenltnguyen added help wanted Open for all. You do not need permission to work on these. status: PR in works Work in Progress (WIP) Issues. and removed status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. help wanted Open for all. You do not need permission to work on these. labels May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. status: PR in works Work in Progress (WIP) Issues. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants