Мы написали скрипт behat для проверки условий таксономии на Сайте. Это занимает очень много времени, чтобы бежать. Я хочу оптимизировать код. В коде я создаю термины таксономии, а затем проверяю их. Создание терминов осуществляется в фоновом режиме. Я думаю об использовании терминов таксономии, представленных на сайте. Но я не уверен. Любая помощь будет великолепна.
Background:
Given "site_section" terms:
| name | field_color |
| site-section-test | redbg |
Given "subject" terms:
| name |
| subject-test |
Given "topic" terms:
| name |
| topic-test |
Given "content_type_sub_type" terms:
| name |
| subtype-test |
Given "department" terms:
| name |
| department-test |
Given "public_role" terms:
| name |
| public-role-test |
Given "image_category" terms:
| name |
| image-category-test |
Scenario Outline: As a user(Content Admin/Site Admin),
I should have the ability to Create, Edit, and Delete taxonomy terms in all vocabularies.
Given I am logged in as a user with the "<user_role>" role
And I visit "<vocab_listing_url>"
Then I should see the link "Add term"
When I click "Edit" in the "<term_name>" row
Then I should see the link "Delete"
Examples:
| user_role | vocab_listing_url | term_name |
| content_administrator | /admin/structure/taxonomy/manage/topic/overview | topic-test |
| content_administrator | /admin/structure/taxonomy/manage/subject/overview | subject-test |
| content_administrator | /admin/structure/taxonomy/manage/site_section/overview | site-section-test |
| content_administrator | /admin/structure/taxonomy/manage/department/overview | department-test |
| content_administrator | /admin/structure/taxonomy/manage/public_role/overview | public-role-test |
| content_administrator | /admin/structure/taxonomy/manage/content_type_sub_type/overview | subtype-test |
| content_administrator | /admin/structure/taxonomy/manage/image_category/overview | image-category-test |
| site_admin | /admin/structure/taxonomy/manage/topic/overview | topic-test |
| site_admin | /admin/structure/taxonomy/manage/subject/overview | subject-test |
| site_admin | /admin/structure/taxonomy/manage/site_section/overview | site-section-test |
| site_admin | /admin/structure/taxonomy/manage/department/overview | department-test |
| site_admin | /admin/structure/taxonomy/manage/public_role/overview | public-role-test |
| site_admin | /admin/structure/taxonomy/manage/content_type_sub_type/overview | subtype-test |
| site_admin | /admin/structure/taxonomy/manage/image_category/overview | image-category-test |