From c8dd9a4da4d6b0c88c38f78de9ac684adce2cfb1 Mon Sep 17 00:00:00 2001 From: alokhyland <139326173+alokhyland@users.noreply.github.com> Date: Mon, 25 Nov 2024 11:13:00 +0530 Subject: [PATCH] Revert "resolve test case random failure" This reverts commit 47e7088e5e9ff785490aca2b7af2fe8aa1a88feb. --- ftest/features/publication.feature | 2 +- .../features/step_definitions/search.js | 9 +++------ .../nuxeo-web-ui-ftest/pages/ui/admin/cloudServices.js | 2 -- .../pages/ui/browser/document_publications.js | 3 +-- .../pages/ui/browser/document_versions.js | 3 +-- packages/nuxeo-web-ui-ftest/pages/ui/search.js | 5 ++--- 6 files changed, 8 insertions(+), 16 deletions(-) diff --git a/ftest/features/publication.feature b/ftest/features/publication.feature index c1f7d86e98..f194f0dacd 100644 --- a/ftest/features/publication.feature +++ b/ftest/features/publication.feature @@ -156,4 +156,4 @@ Feature: Internal Publication Then I can see the document is a publication And I cannot see to publication pill And I can unpublish the document - And I can see the document has 2 children \ No newline at end of file + And I can see the document has 2 children diff --git a/packages/nuxeo-web-ui-ftest/features/step_definitions/search.js b/packages/nuxeo-web-ui-ftest/features/step_definitions/search.js index 3ebd75fe2e..d4e3e6bfbe 100644 --- a/packages/nuxeo-web-ui-ftest/features/step_definitions/search.js +++ b/packages/nuxeo-web-ui-ftest/features/step_definitions/search.js @@ -199,14 +199,11 @@ Then('I edit the results columns to show {string}', async function(heading) { }); Then(/^I save my search as "(.+)"$/, async function(searchName) { - const searchResults = await this.ui.searchResults; - const saveAsButton = await searchResults.saveSearchAsButton; + const saveAsButton = await this.ui.searchResults.saveSearchAsButton; await saveAsButton.waitForVisible(); await saveAsButton.click(); - await driver.pause(2000); - await searchResults.enterInput(searchName); - await driver.pause(2000); - const confirmSaveButton = await searchResults.confirmSaveSearchButton; + await this.ui.searchResults.enterInput(searchName); + const confirmSaveButton = await this.ui.searchResults.confirmSaveSearchButton; await confirmSaveButton.click(); }); diff --git a/packages/nuxeo-web-ui-ftest/pages/ui/admin/cloudServices.js b/packages/nuxeo-web-ui-ftest/pages/ui/admin/cloudServices.js index 2addb733f2..ba7009a7f1 100644 --- a/packages/nuxeo-web-ui-ftest/pages/ui/admin/cloudServices.js +++ b/packages/nuxeo-web-ui-ftest/pages/ui/admin/cloudServices.js @@ -157,8 +157,6 @@ export default class CloudServices extends BasePage { } async deleteClient(clientId) { - const dataTable = await driver.$('nuxeo-data-table nuxeo-data-table-row [name="id"]'); - await dataTable.waitForVisible(); const rows = await browser.$$('nuxeo-data-table[name="table"] nuxeo-data-table-row:not([header])'); const deleted = await browser .$$('nuxeo-data-table[name="table"] nuxeo-data-table-row:not([header])') diff --git a/packages/nuxeo-web-ui-ftest/pages/ui/browser/document_publications.js b/packages/nuxeo-web-ui-ftest/pages/ui/browser/document_publications.js index 9c6c0e42e8..c57780bb43 100644 --- a/packages/nuxeo-web-ui-ftest/pages/ui/browser/document_publications.js +++ b/packages/nuxeo-web-ui-ftest/pages/ui/browser/document_publications.js @@ -31,8 +31,7 @@ export default class DocumentPublications extends BasePage { let index; for (let i = 0; i < rows.length; i++) { const row = rows[i]; - const isRowVisible = await row.isVisible('nuxeo-data-table-cell a.path'); - if (isRowVisible) { + if (row.isVisible('nuxeo-data-table-cell a.path')) { const foundPathEle = await row.$('nuxeo-data-table-cell a.path'); const foundPath = await foundPathEle.getText(); const foundPathLowerCase = await foundPath.trim().toLowerCase(); diff --git a/packages/nuxeo-web-ui-ftest/pages/ui/browser/document_versions.js b/packages/nuxeo-web-ui-ftest/pages/ui/browser/document_versions.js index 66b6ec50ad..342ddcbc91 100644 --- a/packages/nuxeo-web-ui-ftest/pages/ui/browser/document_versions.js +++ b/packages/nuxeo-web-ui-ftest/pages/ui/browser/document_versions.js @@ -95,8 +95,7 @@ export default class DocumentVersions extends BasePage { return true; } const listItems = await this.listItems; - const versionItem = await listItems.$('div[name="version-item"] .title'); - await versionItem.waitForVisible(); + await listItems.$('div[name="version-item"] .title').waitForVisible(); const listItems1 = await this.listItems.$$('div[name="version-item"]'); const itemsTitle = await browser.$$('div[name="version-item"]').map((img) => img.$('.title').getText()); const index = itemsTitle.findIndex((currenTitle) => currenTitle === label); diff --git a/packages/nuxeo-web-ui-ftest/pages/ui/search.js b/packages/nuxeo-web-ui-ftest/pages/ui/search.js index 212dbfce04..02abf24cad 100644 --- a/packages/nuxeo-web-ui-ftest/pages/ui/search.js +++ b/packages/nuxeo-web-ui-ftest/pages/ui/search.js @@ -66,9 +66,8 @@ export default class Search extends Results { return dropdownElenent; } - async enterInput(text) { - const isInputEntered = await driver.keys(text); - return isInputEntered; + enterInput(text) { + return driver.keys(text); } async getField(field) {