-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
menu.feature
53 lines (50 loc) · 2.31 KB
/
menu.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Feature: Check that MenuTrait works
@api
Scenario: Assert "Given menus:"
Given menus:
| label | description |
| [TEST] menu 1 title | Test menu 1 description |
| [TEST] menu 2 title | Test menu 2 description |
And I am logged in as a user with the "administrator" role
When I visit "/admin/structure/menu"
Then I should see the text "[TEST] menu 1 title"
And I should see the text "[TEST] menu 2 title"
And I should see the text "Test menu 1 description"
And I should see the text "Test menu 2 description"
@api
Scenario: Assert "Given no menus:"
Given menus:
| label | description |
| [TEST] menu 1 title | Test menu 1 description |
| [TEST] menu 2 title | Test menu 2 description |
Given no menus:
| [TEST] menu 1 title |
| [TEST] menu 2 title |
| [TEST] non-existent menu |
And I am logged in as a user with the "administrator" role
When I visit "/admin/structure/menu"
Then I should not see the text "[TEST] menu 1 title"
And I should not see the text "[TEST] menu 2 title"
And I should not see the text "Test menu 1 description"
And I should not see the text "Test menu 2 description"
@api
Scenario: Assert "Given menu_links:" and "no menu_links"
Given menus:
| label | description |
| [TEST] menu 1 title | Test menu 1 description |
Given "[TEST] menu 1 title" menu_links:
| title | enabled | uri | parent |
| Parent Link Title | 1 | https://www.example.com | |
| Child Link Title | 1 | https://www.example.com | Parent Link Title |
And I am logged in as a user with the "administrator" role
When I visit "/admin/structure/menu/manage/_test_menu_1_title"
And I should see "Parent Link Title"
And I should see "Child Link Title"
Then no "[TEST] menu 1 title" menu_links:
| Child Link Title |
Then I visit "/admin/config/development/performance"
# We should not need clear cache at here. Re-check later.
Then I press the "Clear all cache" button
Then I visit "/admin/structure/menu/manage/_test_menu_1_title"
And I should not see "Child Link Title"
And I should see "Parent Link Title"