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

aliases natural language logging doesn't match #76

Open
bandophahita opened this issue Apr 7, 2023 · 4 comments
Open

aliases natural language logging doesn't match #76

bandophahita opened this issue Apr 7, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@bandophahita
Copy link
Contributor

Consider the following test using DoesNot (an alias of IsNot)

admin.shall(See(BrowserURL(), DoesNot(ContainsTheText("sortDirection"))))

will produce log

Marcel sees if the browser URL is not containing the text "sortField".

Would be nice if (in this case) the natural language log read the same way as the code.

Marcel sees if the browser URL does not contain the text "sortField".
@bandophahita
Copy link
Contributor Author

My gut hunch is not all aliases have the same language problem, but this one stood out enough as awkward to read.

@bandophahita bandophahita added the enhancement New feature or request label Apr 7, 2023
@perrygoy
Copy link
Member

To catch this issue up with some Discord conversation, we were thinking about incorporating Natural Language Processing somehow to figure this stuff out. It would result in a complete overhaul of the whole .describe() approach, probably removing it entirely.

It will take some work and some toying, but it could be really really cool.

@bandophahita
Copy link
Contributor Author

A nugget of an idea keeps nagging at me; perhaps aliases need to be copies rather than pointers.
Functionally IsNot and DoesNot would be the same. (could even have a shared base class), but code wise they would be separate classes. This would allow each class to maintain the natural language description to be used.

It would require some rework around how beat messages are crafted, but we already do some of that currently.

@perrygoy
Copy link
Member

perrygoy commented Sep 22, 2023

Yeah, that was part of the Discord/Slack discussion, we'd have like operative_word for the action word to be modified into different tenses for the beat, and use that in our NLP figurin'. That would remove the need for a .describe() method and allow us to basically use subclasses for our aliases with different operative_words to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants