Skip to content

Commit 07cbb8c

Browse files
committed
update
1 parent 3390b4d commit 07cbb8c

File tree

2 files changed

+40
-2
lines changed

2 files changed

+40
-2
lines changed

cypress/support/commands.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ Cypress.Commands.add('adminGoToTestRoute', (route) => {
4848
cy.get(route.id).click({force: true});
4949
cy.url().should('include', route.url);
5050
})
51+
5152
Cypress.Commands.add('adminTestRoute', (route) => {
5253
cy.log('Checking for title');
53-
cy.get('h3.icon-head').should('include.text', route.h3);
54+
cy.get(route._h3).should('include.text', route.h3);
5455

5556
cy.log('Checking for active parent class');
5657
cy.get(route.parent).should('have.class', 'active');

cypress/support/paths.js

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ export const adminNav = {
88
system: '#nav-admin-system',
99
}
1010

11+
export const adminPage = {
12+
_h3: 'h3.icon-head',
13+
}
14+
1115
export const paths = {
1216
backend: {
1317
catalog: {
@@ -16,30 +20,35 @@ export const paths = {
1620
id: '#nav-admin-catalog-products',
1721
url: 'catalog_product/index',
1822
h3: 'Manage Products',
23+
_h3: adminPage._h3,
1924
},
2025
categories: {
2126
parent: adminNav.catalog,
2227
id: '#nav-admin-catalog-categories',
2328
url: 'catalog_category/index',
24-
h3: 'Manage Categories',
29+
h3: 'New Root Category',
30+
_h3: '#category-edit-container ' + adminPage._h3,
2531
},
2632
search: {
2733
parent: adminNav.catalog,
2834
id: '#nav-admin-catalog-search',
2935
url: 'catalog_search/index',
3036
h3: 'Search',
37+
_h3: adminPage._h3,
3138
},
3239
sitemap: {
3340
parent: adminNav.catalog,
3441
id: '#nav-admin-catalog-sitemap',
3542
url: 'sitemap/index',
3643
h3: 'Google Sitemap',
44+
_h3: adminPage._h3,
3745
},
3846
urlrewrite: {
3947
parent: adminNav.catalog,
4048
id: '#nav-admin-catalog-urlrewrite',
4149
url: 'urlrewrite/index',
4250
h3: 'URL Rewrite Management',
51+
_h3: adminPage._h3,
4352
}
4453
},
4554
cms: {
@@ -48,18 +57,21 @@ export const paths = {
4857
id: '#nav-admin-cms-block',
4958
url: 'cms_block/index',
5059
h3: 'Static Blocks',
60+
_h3: adminPage._h3,
5161
},
5262
page: {
5363
parent: adminNav.cms,
5464
id: '#nav-admin-cms-page',
5565
url: 'cms_page/index',
5666
h3: 'Manage Pages',
67+
_h3: adminPage._h3,
5768
},
5869
widget: {
5970
parent: adminNav.cms,
6071
id: '#nav-admin-cms-widget_instance',
6172
url: 'widget_instance/index',
6273
h3: 'Manage Widget Instances',
74+
_h3: adminPage._h3,
6375
}
6476
},
6577
customers: {
@@ -68,18 +80,21 @@ export const paths = {
6880
id: '#nav-admin-customer-manage',
6981
url: 'customer/index',
7082
h3: 'Manage Customers',
83+
_h3: adminPage._h3,
7184
},
7285
groups: {
7386
parent: adminNav.customer,
7487
id: '#nav-admin-customer-group',
7588
url: 'customer_group/index',
7689
h3: 'Customer Groups',
90+
_h3: adminPage._h3,
7791
},
7892
online: {
7993
parent: adminNav.customer,
8094
id: '#nav-admin-customer-online',
8195
url: 'customer_online/index',
8296
h3: 'Online Customers',
97+
_h3: adminPage._h3,
8398
}
8499
},
85100
newsletter: {
@@ -88,24 +103,28 @@ export const paths = {
88103
id: '#nav-admin-newsletter-template',
89104
url: 'newsletter_template/index',
90105
h3: 'Newsletter Templates',
106+
_h3: adminPage._h3,
91107
},
92108
queue: {
93109
parent: adminNav.newsletter,
94110
id: '#nav-admin-newsletter-queue',
95111
url: 'newsletter_queue/index',
96112
h3: 'Newsletter Queue',
113+
_h3: adminPage._h3,
97114
},
98115
subscriber: {
99116
parent: adminNav.newsletter,
100117
id: '#nav-admin-newsletter-subscriber',
101118
url: 'newsletter_subscriber/index',
102119
h3: 'Newsletter Subscribers',
120+
_h3: adminPage._h3,
103121
},
104122
report: {
105123
parent: adminNav.newsletter,
106124
id: '#nav-admin-newsletter-problem',
107125
url: 'newsletter_problem/index',
108126
h3: 'Newsletter Problem Reports',
127+
_h3: adminPage._h3,
109128
}
110129
},
111130
promo: {
@@ -114,12 +133,14 @@ export const paths = {
114133
id: '#nav-admin-promo-catalog',
115134
url: 'promo_catalog/index',
116135
h3: 'Catalog Price Rules',
136+
_h3: adminPage._h3,
117137
},
118138
cart: {
119139
parent: adminNav.promo,
120140
id: '#nav-admin-promo-quote',
121141
url: 'promo_quote/index',
122142
h3: 'Shopping Cart Price Rules',
143+
_h3: adminPage._h3,
123144
}
124145
},
125146
sales: {
@@ -128,30 +149,35 @@ export const paths = {
128149
id: '#nav-admin-sales-creditmemo',
129150
url: 'sales_creditmemo/index',
130151
h3: 'Credit Memos',
152+
_h3: adminPage._h3,
131153
},
132154
invoice: {
133155
parent: adminNav.sales,
134156
id: '#nav-admin-sales-invoice',
135157
url: 'sales_invoice/index',
136158
h3: 'Invoice',
159+
_h3: adminPage._h3,
137160
},
138161
order: {
139162
parent: adminNav.sales,
140163
id: '#nav-admin-sales-order',
141164
url: 'sales_order/index',
142165
h3: 'Orders',
166+
_h3: adminPage._h3,
143167
},
144168
shipment: {
145169
parent: adminNav.sales,
146170
id: '#nav-admin-sales-shipment',
147171
url: 'sales_shipment/index',
148172
h3: 'Shipments',
173+
_h3: adminPage._h3,
149174
},
150175
transactions: {
151176
parent: adminNav.sales,
152177
id: '#nav-admin-sales-transactions',
153178
url: 'sales_transactions/index',
154179
h3: 'Transactions',
180+
_h3: adminPage._h3,
155181
}
156182
},
157183
system: {
@@ -160,67 +186,78 @@ export const paths = {
160186
id: '#nav-admin-system-cache',
161187
url: 'cache/index',
162188
h3: 'Cache Storage Management',
189+
_h3: adminPage._h3,
163190
},
164191
design: {
165192
parent: adminNav.system,
166193
id: '#nav-admin-system-design',
167194
url: 'system_design/index',
168195
h3: 'Design',
196+
_h3: adminPage._h3,
169197
},
170198
email: {
171199
parent: adminNav.system,
172200
id: '#nav-admin-system-email_template',
173201
url: 'system_email_template/index',
174202
h3: 'Transactional Emails',
203+
_h3: adminPage._h3,
175204
},
176205
myaccount: {
177206
parent: adminNav.system,
178207
id: '#nav-admin-system-myaccount',
179208
url: 'system_account/index',
180209
h3: 'My Account',
210+
_h3: adminPage._h3,
181211
},
182212
notification: {
183213
parent: adminNav.system,
184214
id: '#nav-admin-system-adminnotification',
185215
url: 'notification/index',
186216
h3: 'Messages Inbox',
217+
_h3: adminPage._h3,
187218
},
188219
indexes: {
189220
parent: adminNav.system,
190221
id: '#nav-admin-system-index',
191222
url: 'process/list',
192223
h3: 'Index Management',
224+
_h3: adminPage._h3,
193225
},
194226
stores: {
195227
parent: adminNav.system,
196228
id: '#nav-admin-system-store',
197229
url: 'system_store/index',
198230
h3: 'Manage Stores',
231+
_h3: adminPage._h3,
199232
},
200233
variables: {
201234
parent: adminNav.system,
202235
id: '#nav-admin-system-variable',
203236
url: 'system_variable/index',
204237
h3: 'Custom Variables',
238+
_h3: adminPage._h3,
205239
},
206240
config: {
207241
catalog: {
208242
configswatches: {
209243
id: '#section-configswatches',
210244
url: 'system_config/edit/section/configswatches',
211245
h3: 'Configurable Swatches',
246+
_h3: adminPage._h3,
212247
},
213248
sitemap: {
214249
id: '#section-sitemap',
215250
url: 'system_config/edit/section/sitemap',
216251
h3: 'Google Sitemap',
252+
_h3: adminPage._h3,
217253
}
218254
},
219255
customers: {
220256
promo: {
221257
id: '#section-promo',
222258
url: 'system_config/edit/section/promo',
223259
h3: 'Promotions',
260+
_h3: adminPage._h3,
224261
},
225262
},
226263
}

0 commit comments

Comments
 (0)