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

Improve Concept Exercise Poetry Door Club Policy (strings) #1342

Merged
merged 12 commits into from
Oct 8, 2021

Conversation

junedev
Copy link
Member

@junedev junedev commented Sep 12, 2021

Resolves #1338

Changes

  • Improve concept content
  • Restructure test cases so they result in good output on the website (each test contains the needed variables)
  • Restructure the introduction so information is given when needed instead of as a big block upfront
  • Remove the capitalize helper function as suggested below
  • Improve hints
  • Remove the intermediate task (back door response without the trimming)
  • Remove template strings from the introduction as they will be covered in the separate exercise and are not needed here

@iHiD
Copy link
Member

iHiD commented Sep 16, 2021

Suggestion on this. Rename the capitalize method to frontDoorPassword

@junedev
Copy link
Member Author

junedev commented Sep 16, 2021

@iHiD Already on my cleanup list. 🙂

@ForrestGlembo
Copy link

Hi, im still having same issue as 1338 in this comment >

From the editor bug reports:

Error: expect(received).toBe(expected) // Object.is equality
Expected: "Horse, please"
Received: "E, please"
at BackDoorGuard.assert (/door-policy.spec.js:90:22)

Can not concat. when i put .concat(pleas) my console log shows ''Horse pleas'' and if i put .concat(please) my console log shows only ''e''

The arguments "responses" and "word" for the Test 11 (strings > back door > backDoorGuard(SHIRE_HORSE_WITH_SPACES)) is just the last letter of what the function backDoorResponse() is returning. For some reason, this is just happening for this test.
Example:
The function backDoorResponse() returns in each iteration "h", "o", "r", "s", "e", but the arguments "responses" and "word" feeding its respectives functions (backDoorPassword() and capitalize()) for the back door part of the exercise just constains "e". It should contain "horse".

According to my observations, the last test of this challenge is wrong because when I return the argument in the function, it goes like this " e" . It should have letters before that to solve that challenge, because even if I try to remove the whitespace I cannot fix it. Please help, I maybe mistaken.

However after the exercise was updated today it's just receiving an empty array instead and still failing. Any help? Thanks a bunch!

@junedev
Copy link
Member Author

junedev commented Oct 5, 2021

@DietCoke955 Please note that this is a draft PR (a work in progress). Its not yet available on the website therefore the issues in #1338 might still exist. The only change that went live recently was a cleanup of the test code. But that by itself probably did not "fix" anything yet.

It would be great if you could post a code example how to reproduce your issue and see that empty array into #1338.

@junedev junedev marked this pull request as ready for review October 7, 2021 18:20
expect(recite(SHIRE_HORSE, frontDoorResponse)).toStrictEqual(
expectedLetters
);
});
Copy link
Member Author

Choose a reason for hiding this comment

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

I removed this test case as it didn't test anything that isn't also tested by the next and because it uses the same example that is already shown in the instructions, same below for the back door part

@junedev junedev requested a review from a team October 7, 2021 18:32
@junedev junedev added x:size/large Large amount of work hacktoberfest-accepted Opt-in to hacktoberfest labels Oct 7, 2021
@pertrai1
Copy link
Contributor

pertrai1 commented Oct 7, 2021

👍 LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Opt-in to hacktoberfest x:size/large Large amount of work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Concept Exercise: Poetry Club Door Policy (Concept strings)
5 participants