Skip to content

Commit

Permalink
[Functional test] Increase the timeout to click new vis function
Browse files Browse the repository at this point in the history
  • Loading branch information
stratoula committed Jul 9, 2020
1 parent 77a97fc commit 4996563
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/functional/services/listing_table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,12 @@ export function ListingTableProvider({ getService, getPageObjects }: FtrProvider
* @param promptBtnTestSubj testSubj locator for Prompt button
*/
public async clickNewButton(promptBtnTestSubj: string): Promise<void> {
await retry.try(async () => {
await retry.tryForTime(20000, async () => {
// newItemButton button is only visible when there are items in the listing table is displayed.
if (await testSubjects.exists('newItemButton')) {
const isnNewItemButtonPresent = await testSubjects.exists('newItemButton', {
timeout: 5000,
});
if (isnNewItemButtonPresent) {
await testSubjects.click('newItemButton');
} else {
// no items exist, click createPromptButton to create new dashboard/visualization
Expand Down

0 comments on commit 4996563

Please sign in to comment.