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

Ensure that test titles are strings before sanitizing them for screenshot names #4317

Merged
merged 6 commits into from
Jun 12, 2019

Conversation

jennifer-shehane
Copy link
Member

@jennifer-shehane jennifer-shehane requested review from chrisbreiding and a team June 11, 2019 07:30
@kuceb
Copy link
Contributor

kuceb commented Jun 11, 2019

@jennifer-shehane why are we allowing non-string test titles anyways? If we error earlier then we wouldn't need to add this logic or ever account for non-string test names again.

@jennifer-shehane
Copy link
Member Author

@bkucera They already work. They work fine when running tests in Cypress and other frameworks, it's just when we try to translate the title to a screenshot filename that it borks.

@kuceb
Copy link
Contributor

kuceb commented Jun 11, 2019

@jennifer-shehane how does it look in the dashboard though? reporters? I don't think we handle non-strings anywhere else really. If there's a discussion about this (allowing non-string test titles) somewhere i'd like to read it

@jennifer-shehane
Copy link
Member Author

We're converting them all to strings, so it wouldn't display any other way in the Dashboard. I have no idea how reporters handle it.

@brian-mann
Copy link
Member

@bkucera regarding test titles which are purely null or undefined that's a separate discussion.

undefined will not work in JSON, whereas null will. more than likely mocha shits the bed if it's a mess, so we may not handle it because it may not be possible.

@brian-mann brian-mann merged commit 4bd3cf2 into develop Jun 12, 2019
@emilyrohrbough emilyrohrbough deleted the issue-4310 branch August 1, 2024 13:45
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.

'Cannot read property \'replace\' of null' from sanitize-filename err being thrown
4 participants