@@ -15,64 +15,64 @@ test.afterEach(async ({umbracoApi}) => {
1515test ( 'can create a dictionary item' , async ( { umbracoApi, umbracoUi} ) => {
1616 // Arrange
1717 await umbracoApi . dictionary . ensureNameNotExists ( dictionaryName ) ;
18- await umbracoUi . translation . goToSection ( ConstantHelper . sections . translation ) ;
18+ await umbracoUi . dictionary . goToSection ( ConstantHelper . sections . dictionary ) ;
1919
2020 // Act
21- await umbracoUi . translation . clickCreateLink ( ) ;
22- await umbracoUi . translation . enterDictionaryName ( dictionaryName ) ;
23- await umbracoUi . translation . clickSaveButton ( ) ;
21+ await umbracoUi . dictionary . clickCreateLink ( ) ;
22+ await umbracoUi . dictionary . enterDictionaryName ( dictionaryName ) ;
23+ await umbracoUi . dictionary . clickSaveButton ( ) ;
2424
2525 // Assert
2626 expect ( await umbracoApi . dictionary . doesNameExist ( dictionaryName ) ) . toBeTruthy ( ) ;
27- await umbracoUi . translation . isSuccessNotificationVisible ( ) ;
28- await umbracoUi . translation . clickLeftArrowButton ( ) ;
27+ await umbracoUi . dictionary . isSuccessNotificationVisible ( ) ;
28+ await umbracoUi . dictionary . clickLeftArrowButton ( ) ;
2929 // Verify the dictionary item displays in the tree and in the list
30- await umbracoUi . translation . isDictionaryTreeItemVisible ( dictionaryName ) ;
31- expect ( await umbracoUi . translation . doesDictionaryListHaveText ( dictionaryName ) ) . toBeTruthy ( ) ;
30+ await umbracoUi . dictionary . isDictionaryTreeItemVisible ( dictionaryName ) ;
31+ expect ( await umbracoUi . dictionary . doesDictionaryListHaveText ( dictionaryName ) ) . toBeTruthy ( ) ;
3232} ) ;
3333
3434test ( 'can delete a dictionary item' , async ( { umbracoApi, umbracoUi} ) => {
3535 // Arrange
3636 await umbracoApi . dictionary . ensureNameNotExists ( dictionaryName ) ;
3737 await umbracoApi . dictionary . create ( dictionaryName ) ;
38- await umbracoUi . translation . goToSection ( ConstantHelper . sections . translation ) ;
38+ await umbracoUi . dictionary . goToSection ( ConstantHelper . sections . dictionary ) ;
3939
4040 // Act
41- await umbracoUi . translation . clickActionsMenuForDictionary ( dictionaryName ) ;
42- await umbracoUi . translation . deleteDictionary ( ) ;
41+ await umbracoUi . dictionary . clickActionsMenuForDictionary ( dictionaryName ) ;
42+ await umbracoUi . dictionary . deleteDictionary ( ) ;
4343
4444 // Assert
45- await umbracoUi . translation . isSuccessNotificationVisible ( ) ;
45+ await umbracoUi . dictionary . isSuccessNotificationVisible ( ) ;
4646 expect ( await umbracoApi . dictionary . doesNameExist ( dictionaryName ) ) . toBeFalsy ( ) ;
4747 // Verify the dictionary item does not display in the tree
48- await umbracoUi . translation . isDictionaryTreeItemVisible ( dictionaryName , false ) ;
48+ await umbracoUi . dictionary . isDictionaryTreeItemVisible ( dictionaryName , false ) ;
4949 // TODO: Uncomment this when the front-end is ready. Currently the dictionary list is not updated immediately.
5050 // Verify the dictionary item does not display in the list
51- //expect(await umbracoUi.translation .doesDictionaryListHaveText(dictionaryName)).toBeFalsy();
51+ //expect(await umbracoUi.dictionary .doesDictionaryListHaveText(dictionaryName)).toBeFalsy();
5252} ) ;
5353
5454test ( 'can create a dictionary item in a dictionary' , { tag : '@smoke' } , async ( { umbracoApi, umbracoUi} ) => {
5555 // Arrange
5656 await umbracoApi . dictionary . ensureNameNotExists ( parentDictionaryName ) ;
5757 let parentDictionaryId = await umbracoApi . dictionary . create ( parentDictionaryName ) ;
58- await umbracoUi . translation . goToSection ( ConstantHelper . sections . translation ) ;
58+ await umbracoUi . dictionary . goToSection ( ConstantHelper . sections . dictionary ) ;
5959
6060 // Act
61- await umbracoUi . translation . clickActionsMenuForDictionary ( parentDictionaryName ) ;
62- await umbracoUi . translation . clickCreateDictionaryItemButton ( ) ;
63- await umbracoUi . translation . enterDictionaryName ( dictionaryName ) ;
64- await umbracoUi . translation . clickSaveButton ( ) ;
61+ await umbracoUi . dictionary . clickActionsMenuForDictionary ( parentDictionaryName ) ;
62+ await umbracoUi . dictionary . clickCreateDictionaryItemButton ( ) ;
63+ await umbracoUi . dictionary . enterDictionaryName ( dictionaryName ) ;
64+ await umbracoUi . dictionary . clickSaveButton ( ) ;
6565
6666 // Assert
67- await umbracoUi . translation . isSuccessNotificationVisible ( ) ;
67+ await umbracoUi . dictionary . isSuccessNotificationVisible ( ) ;
6868 const dictionaryChildren = await umbracoApi . dictionary . getChildren ( parentDictionaryId ) ;
6969 expect ( dictionaryChildren [ 0 ] . name ) . toEqual ( dictionaryName ) ;
70- await umbracoUi . translation . clickLeftArrowButton ( ) ;
70+ await umbracoUi . dictionary . clickLeftArrowButton ( ) ;
7171 // Verify the new dictionary item displays in the list
72- expect ( await umbracoUi . translation . doesDictionaryListHaveText ( dictionaryName ) ) . toBeTruthy ( ) ;
72+ expect ( await umbracoUi . dictionary . doesDictionaryListHaveText ( dictionaryName ) ) . toBeTruthy ( ) ;
7373 // Verify the new dictionary item displays in the tree
74- await umbracoUi . translation . reloadTree ( parentDictionaryName ) ;
75- await umbracoUi . translation . isDictionaryTreeItemVisible ( dictionaryName ) ;
74+ await umbracoUi . dictionary . reloadTree ( parentDictionaryName ) ;
75+ await umbracoUi . dictionary . isDictionaryTreeItemVisible ( dictionaryName ) ;
7676
7777 // Clean
7878 await umbracoApi . dictionary . ensureNameNotExists ( parentDictionaryName ) ;
@@ -82,12 +82,12 @@ test('can export a dictionary item', async ({umbracoApi, umbracoUi}) => {
8282 // Arrange
8383 await umbracoApi . dictionary . ensureNameNotExists ( dictionaryName ) ;
8484 const dictionaryId = await umbracoApi . dictionary . create ( dictionaryName ) ;
85- await umbracoUi . translation . goToSection ( ConstantHelper . sections . translation ) ;
85+ await umbracoUi . dictionary . goToSection ( ConstantHelper . sections . dictionary ) ;
8686
8787 // Act
88- await umbracoUi . translation . clickActionsMenuForDictionary ( dictionaryName ) ;
89- await umbracoUi . translation . clickExportMenu ( ) ;
90- const exportData = await umbracoUi . translation . exportDictionary ( false ) ;
88+ await umbracoUi . dictionary . clickActionsMenuForDictionary ( dictionaryName ) ;
89+ await umbracoUi . dictionary . clickExportMenu ( ) ;
90+ const exportData = await umbracoUi . dictionary . exportDictionary ( false ) ;
9191
9292 // Assert
9393 expect ( exportData ) . toEqual ( dictionaryId + '.udt' ) ;
@@ -98,12 +98,12 @@ test('can export a dictionary item with descendants', {tag: '@smoke'}, async ({u
9898 await umbracoApi . dictionary . ensureNameNotExists ( parentDictionaryName ) ;
9999 let parentDictionaryId = await umbracoApi . dictionary . create ( parentDictionaryName ) ;
100100 await umbracoApi . dictionary . create ( dictionaryName , [ ] , parentDictionaryId ) ;
101- await umbracoUi . translation . goToSection ( ConstantHelper . sections . translation ) ;
101+ await umbracoUi . dictionary . goToSection ( ConstantHelper . sections . dictionary ) ;
102102
103103 // Act
104- await umbracoUi . translation . clickActionsMenuForDictionary ( parentDictionaryName ) ;
105- await umbracoUi . translation . clickExportMenu ( ) ;
106- const exportData = await umbracoUi . translation . exportDictionary ( true ) ;
104+ await umbracoUi . dictionary . clickActionsMenuForDictionary ( parentDictionaryName ) ;
105+ await umbracoUi . dictionary . clickExportMenu ( ) ;
106+ const exportData = await umbracoUi . dictionary . exportDictionary ( true ) ;
107107
108108 // Assert
109109 expect ( exportData ) . toEqual ( parentDictionaryId + '.udt' ) ;
@@ -119,20 +119,20 @@ test('can import a dictionary item', async ({umbracoApi, umbracoUi}) => {
119119 const importDictionaryName = 'TestImportDictionary' ;
120120 await umbracoApi . dictionary . ensureNameNotExists ( dictionaryName ) ;
121121 await umbracoApi . dictionary . create ( dictionaryName ) ;
122- await umbracoUi . translation . goToSection ( ConstantHelper . sections . translation ) ;
122+ await umbracoUi . dictionary . goToSection ( ConstantHelper . sections . dictionary ) ;
123123
124124 // Act
125- await umbracoUi . translation . clickActionsMenuForDictionary ( dictionaryName ) ;
126- await umbracoUi . translation . clickImportMenu ( ) ;
127- await umbracoUi . translation . importDictionary ( udtFilePath ) ;
125+ await umbracoUi . dictionary . clickActionsMenuForDictionary ( dictionaryName ) ;
126+ await umbracoUi . dictionary . clickImportMenu ( ) ;
127+ await umbracoUi . dictionary . importDictionary ( udtFilePath ) ;
128128
129129 // Assert
130130 // Verify the imported dictionary item displays in the tree
131- await umbracoUi . translation . reloadTree ( dictionaryName ) ;
132- await umbracoUi . translation . isDictionaryTreeItemVisible ( importDictionaryName ) ;
131+ await umbracoUi . dictionary . reloadTree ( dictionaryName ) ;
132+ await umbracoUi . dictionary . isDictionaryTreeItemVisible ( importDictionaryName ) ;
133133 // TODO: Uncomment this when the front-end is ready. Currently the dictionary list is not updated immediately.
134134 // Verify the imported dictionary item displays in the list
135- //expect(await umbracoUi.translation .doesDictionaryListHaveText(importDictionaryName)).toBeTruthy();
135+ //expect(await umbracoUi.dictionary .doesDictionaryListHaveText(importDictionaryName)).toBeTruthy();
136136} ) ;
137137
138138test ( 'can import a dictionary item with descendants' , { tag : '@smoke' } , async ( { umbracoApi, umbracoUi} ) => {
@@ -143,37 +143,37 @@ test('can import a dictionary item with descendants', {tag: '@smoke'}, async ({u
143143 const importChildDictionaryName = 'TestImportChild' ;
144144 await umbracoApi . dictionary . ensureNameNotExists ( dictionaryName ) ;
145145 await umbracoApi . dictionary . create ( dictionaryName ) ;
146- await umbracoUi . translation . goToSection ( ConstantHelper . sections . translation ) ;
146+ await umbracoUi . dictionary . goToSection ( ConstantHelper . sections . dictionary ) ;
147147
148148 // Act
149- await umbracoUi . translation . clickActionsMenuForDictionary ( dictionaryName ) ;
150- await umbracoUi . translation . clickImportMenu ( ) ;
151- await umbracoUi . translation . importDictionary ( udtFilePath ) ;
149+ await umbracoUi . dictionary . clickActionsMenuForDictionary ( dictionaryName ) ;
150+ await umbracoUi . dictionary . clickImportMenu ( ) ;
151+ await umbracoUi . dictionary . importDictionary ( udtFilePath ) ;
152152
153153 // Assert
154154 // Verify the imported dictionary items display in the tree
155- await umbracoUi . translation . reloadTree ( dictionaryName ) ;
156- await umbracoUi . translation . isDictionaryTreeItemVisible ( importParentDictionaryName ) ;
157- await umbracoUi . translation . reloadTree ( importParentDictionaryName ) ;
158- await umbracoUi . translation . isDictionaryTreeItemVisible ( importChildDictionaryName ) ;
155+ await umbracoUi . dictionary . reloadTree ( dictionaryName ) ;
156+ await umbracoUi . dictionary . isDictionaryTreeItemVisible ( importParentDictionaryName ) ;
157+ await umbracoUi . dictionary . reloadTree ( importParentDictionaryName ) ;
158+ await umbracoUi . dictionary . isDictionaryTreeItemVisible ( importChildDictionaryName ) ;
159159 // TODO: Uncomment this when the front-end is ready. Currently the dictionary list is not updated immediately.
160160 // Verify the imported dictionary items display in the list
161- //expect(await umbracoUi.translation .doesDictionaryListHaveText(importParentDictionaryName)).toBeTruthy();
162- //expect(await umbracoUi.translation .doesDictionaryListHaveText(importChildDictionaryName)).toBeTruthy();
161+ //expect(await umbracoUi.dictionary .doesDictionaryListHaveText(importParentDictionaryName)).toBeTruthy();
162+ //expect(await umbracoUi.dictionary .doesDictionaryListHaveText(importChildDictionaryName)).toBeTruthy();
163163} ) ;
164164
165165// Skip this test as the search function is removed
166166test . skip ( 'can search a dictionary item in list when have results' , async ( { umbracoApi, umbracoUi} ) => {
167167 // Arrange
168168 await umbracoApi . dictionary . ensureNameNotExists ( dictionaryName ) ;
169169 await umbracoApi . dictionary . create ( dictionaryName ) ;
170- await umbracoUi . translation . goToSection ( ConstantHelper . sections . translation ) ;
170+ await umbracoUi . dictionary . goToSection ( ConstantHelper . sections . dictionary ) ;
171171
172172 // Act
173- await umbracoUi . translation . enterSearchKeywordAndPressEnter ( dictionaryName ) ;
173+ await umbracoUi . dictionary . enterSearchKeywordAndPressEnter ( dictionaryName ) ;
174174
175175 // Assert
176- expect ( await umbracoUi . translation . doesDictionaryListHaveText ( dictionaryName ) ) . toBeTruthy ( ) ;
176+ expect ( await umbracoUi . dictionary . doesDictionaryListHaveText ( dictionaryName ) ) . toBeTruthy ( ) ;
177177} ) ;
178178
179179// Skip this test as the search function is removed
@@ -182,11 +182,11 @@ test.skip('can search a dictionary item in list when have no results', async ({u
182182 const emptySearchResultMessage = 'No Dictionary items to choose from' ;
183183 await umbracoApi . dictionary . ensureNameNotExists ( dictionaryName ) ;
184184 await umbracoApi . dictionary . create ( dictionaryName ) ;
185- await umbracoUi . translation . goToSection ( ConstantHelper . sections . translation ) ;
185+ await umbracoUi . dictionary . goToSection ( ConstantHelper . sections . dictionary ) ;
186186
187187 // Act
188- await umbracoUi . translation . enterSearchKeywordAndPressEnter ( 'xyz' ) ;
188+ await umbracoUi . dictionary . enterSearchKeywordAndPressEnter ( 'xyz' ) ;
189189
190190 // Assert
191- await umbracoUi . translation . isSearchResultMessageDisplayEmpty ( emptySearchResultMessage ) ;
191+ await umbracoUi . dictionary . isSearchResultMessageDisplayEmpty ( emptySearchResultMessage ) ;
192192} ) ;
0 commit comments