@@ -13,7 +13,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
1313 const listingTable = getService ( 'listingTable' ) ;
1414 const testSubjects = getService ( 'testSubjects' ) ;
1515 const find = getService ( 'find' ) ;
16- const PageObjects = getPageObjects ( [ 'visualize' , 'tagManagement' , 'visEditor' ] ) ;
16+ const PageObjects = getPageObjects ( [ 'visualize' , 'tagManagement' , 'visEditor' , 'common' ] ) ;
1717
1818 /**
1919 * Select tags in the searchbar's tag filter.
@@ -31,6 +31,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
3131 // click elsewhere to close the filter dropdown
3232 const searchFilter = await find . byCssSelector ( 'main .euiFieldSearch' ) ;
3333 await searchFilter . click ( ) ;
34+ // wait until the table refreshes
35+ await listingTable . waitUntilTableIsLoaded ( ) ;
3436 } ;
3537
3638 const selectSavedObjectTags = async ( ...tagNames : string [ ] ) => {
@@ -56,6 +58,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
5658 describe ( 'listing' , ( ) => {
5759 beforeEach ( async ( ) => {
5860 await PageObjects . visualize . gotoVisualizationLandingPage ( ) ;
61+ await listingTable . waitUntilTableIsLoaded ( ) ;
5962 } ) ;
6063
6164 it ( 'allows to manually type tag filter query' , async ( ) => {
@@ -83,7 +86,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
8386 } ) ;
8487
8588 describe ( 'creating' , ( ) => {
86- it . skip ( 'allows to assign tags to the new visualization' , async ( ) => {
89+ it ( 'allows to assign tags to the new visualization' , async ( ) => {
8790 await PageObjects . visualize . navigateToNewVisualization ( ) ;
8891
8992 await PageObjects . visualize . clickMarkdownWidget ( ) ;
@@ -95,7 +98,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
9598 await selectSavedObjectTags ( 'tag-1' ) ;
9699
97100 await testSubjects . click ( 'confirmSaveSavedObjectButton' ) ;
101+ await PageObjects . common . waitForSaveModalToClose ( ) ;
102+
98103 await PageObjects . visualize . gotoVisualizationLandingPage ( ) ;
104+ await listingTable . waitUntilTableIsLoaded ( ) ;
99105
100106 await selectFilterTags ( 'tag-1' ) ;
101107 const itemNames = await listingTable . getAllItemsNames ( ) ;
@@ -133,7 +139,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
133139 expect ( await tagModal . isOpened ( ) ) . to . be ( false ) ;
134140
135141 await testSubjects . click ( 'confirmSaveSavedObjectButton' ) ;
142+ await PageObjects . common . waitForSaveModalToClose ( ) ;
143+
136144 await PageObjects . visualize . gotoVisualizationLandingPage ( ) ;
145+ await listingTable . waitUntilTableIsLoaded ( ) ;
137146
138147 await selectFilterTags ( 'my-new-tag' ) ;
139148 const itemNames = await listingTable . getAllItemsNames ( ) ;
@@ -144,6 +153,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
144153 describe ( 'editing' , ( ) => {
145154 beforeEach ( async ( ) => {
146155 await PageObjects . visualize . gotoVisualizationLandingPage ( ) ;
156+ await listingTable . waitUntilTableIsLoaded ( ) ;
147157 } ) ;
148158
149159 it ( 'allows to assign tags to an existing visualization' , async ( ) => {
@@ -153,7 +163,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
153163 await selectSavedObjectTags ( 'tag-2' ) ;
154164
155165 await testSubjects . click ( 'confirmSaveSavedObjectButton' ) ;
166+ await PageObjects . common . waitForSaveModalToClose ( ) ;
167+
156168 await PageObjects . visualize . gotoVisualizationLandingPage ( ) ;
169+ await listingTable . waitUntilTableIsLoaded ( ) ;
157170
158171 await selectFilterTags ( 'tag-2' ) ;
159172 const itemNames = await listingTable . getAllItemsNames ( ) ;
0 commit comments