-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
Add Behat\Gherkin\Node\TableNode namespace for instanceof TableNode #605
base: main
Are you sure you want to change the base?
Conversation
I can confirm that proposed change is fixing random token handling in the tables. CI fails with code style checks on unrelated to this PR files:
@xurizaemon , can you please rebase your branch and push again. Maybe it will pass this time? |
It looks like a tested it poorly at first . While adding namespace is definitely required, it doesn't fix the problem. Random token does get detected with namespace in place in |
2dbb642
to
2a4aca1
Compare
Updated, but I think your second comment is now saying this fix doesn't work? The branch name indicates that this was a PR submitted via web UI so it's likely I was extracting a fix from a local codebase where I didn't have a development copy of drupalextension. Pulled in test from your repo also, thanks. |
At line 67, we currently check `instanceof Tablenode`, but since the class isn't introduced with `use` we check for `instanceof Drupal\DrupalExtension\Context` which doesn't exist. This fixes that (but still doesn't quite fix transforming random tokens in TableNode values).
tests without the proposed fix @ https://github.com/jhedstrom/drupalextension/actions/runs/3567460065 and with proposed fix @ https://github.com/jhedstrom/drupalextension/actions/runs/3567485140 🙏🏼 nope ... need to get tests running locally I guess :) |
Tests running locally now, and looks like this is what I was missing: Tomorrow :) |
At line 67, we currently check
instanceof Tablenode
, but since the class isn't introduced withuse
we check forinstanceof Drupal\DrupalExtension\Context\TableNode
which doesn't exist.Steps to reproduce
This should create a user with a random name, whose email is the same random value @example.org.
Currently it creates a user with literal username
<?random>
and email<?random>@example.org
.Proposed solution
use
statement so we detect and populate random variables from TableNode data