Skip to content

new lines and spaces cause failures in tests checking element content #60690

@majestic-owl448

Description

@majestic-owl448

this issue is only related to projects of the full stack curriculum, curriculum/challenges/english/blocks/workshop-*/ and curriculum/challenges/english/blocks/lab-*/

This is something that happens in many tests. The solution would be to always use trim when we use innerText

The line that is making this fail is assert.match(spanEl?.innerText, /^[⭐☆]{10}$/);, it would need to use trim() on the first argument to pass

There are many labs and workshops that have this issue that may benefit from this change

Originally posted by @ilenia-magoni in #60686

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedOpen for all. You do not need permission to work on these.scope: curriculumLessons, Challenges, Projects and other Curricular Content in curriculum directory.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions