1

I am using Drupal API as api_driver to run BEHAT scenarios. Please see below scarios for creating a term for the taxonomy "test_new". While running, this got success but when I take the application and look for the new term created it showing on the listing page. But when clicking on Edit of that term, name and description is not get updated, its showing empty but parent field is correctly mapped.

It would be thankful if anyone can tell me why this is happening? Thanks.

Given "test_new" terms:
| name              | parent         | description_field    | 
| Test term one     | Test parent    | term one description | 
And I wait for 20 seconds
  • 2
    Are you checking your database after behat finishes? It's most likely created the term, and then deleted it. What you're looking at is probably an existing term in your vocabulary that has the same name. – Beebee Nov 9 '16 at 10:27
  • 1
    Just to clarify, instead of checking the Drupal backend, you should check the logs and the behat reports to see if there were any issues because Behat cleans up after itself. – Beebee Nov 11 '16 at 9:55
  • 1
    Thanks @Beebee for your response. I had added wait statement in order to check the term is got created or not in the application itself from admin side. At that time I could see the term but name field is empty. But while checking through database, I could see these terms in taxonomy_term_data with value in the name field. I don't know why this strange thing happening. I know at the end of scenarios all test data will be deleted, that is the reason why I added the step for wait. – Aswini K Nov 14 '16 at 7:00
0

It got worked by adding language and format for terms. Please see below code.

Given "test_new" terms:
| name           | parent      | description          | format     | language |
| Test term one  | Test parent | term one description | plain_text | en       |

It may be helpful for anyone who is searching for the solution.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.