mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-01 19:18:05 +00:00
Miner: cypress - fixed failing cypress in main (#14275)
This commit is contained in:
parent
d6a01ca5b1
commit
2a5042cf21
@ -10,7 +10,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { BASE_WAIT_TIME, RETRY_TIMES } from './common';
|
||||
import { RETRY_TIMES } from './common';
|
||||
|
||||
const BASE_WAIT_TIME = 4000;
|
||||
|
||||
export const checkDataInsightSuccessStatus = (
|
||||
count = 1,
|
||||
@ -27,7 +29,7 @@ export const checkDataInsightSuccessStatus = (
|
||||
$ingestionStatus.text() !== 'Failed' &&
|
||||
count <= RETRY_TIMES
|
||||
) {
|
||||
// retry after waiting with log1 method [20s,40s,80s,160s,320s]
|
||||
// retry after waiting with log1 method [4s,8s,16s,32s,64s]
|
||||
cy.wait(timer);
|
||||
timer *= 2;
|
||||
cy.reload();
|
||||
|
||||
@ -573,21 +573,41 @@ export const visitEntityDetailsPage = ({
|
||||
.first()
|
||||
.click();
|
||||
} else {
|
||||
// if term is not available in search suggestion,
|
||||
// hitting enter to search box so it will redirect to explore page
|
||||
cy.get('body').click(1, 1);
|
||||
cy.get('[data-testid="searchBox"]').type('{enter}');
|
||||
verifyResponseStatusCode('@explorePageSearch', 200);
|
||||
cy.get(`[data-testid="global-search-suggestion-box"]`)
|
||||
.contains(term)
|
||||
.then(($body) => {
|
||||
if ($body.length) {
|
||||
cy.get(`[data-testid="global-search-suggestion-box"]`)
|
||||
.contains(term)
|
||||
.click();
|
||||
} else {
|
||||
// if term is not available in search suggestion,
|
||||
// hitting enter to search box so it will redirect to explore page
|
||||
cy.get('body').click(1, 1);
|
||||
cy.get('[data-testid="searchBox"]').type('{enter}');
|
||||
verifyResponseStatusCode('@explorePageSearch', 200);
|
||||
|
||||
const tabName = EXPLORE_PAGE_TABS?.[entity] ?? entity;
|
||||
const tabName = EXPLORE_PAGE_TABS?.[entity] ?? entity;
|
||||
|
||||
cy.get(`[data-testid="${tabName}-tab"]`).click();
|
||||
cy.get(`[data-testid="${tabName}-tab"]`).click();
|
||||
|
||||
verifyResponseStatusCode('@explorePageTabSearch', 200);
|
||||
verifyResponseStatusCode('@explorePageTabSearch', 200);
|
||||
|
||||
cy.get(`[data-testid="${id}"] [data-testid="entity-link"]`)
|
||||
.scrollIntoView()
|
||||
.click();
|
||||
if (
|
||||
$body.find(`[data-testid="${id}"] [data-testid="entity-link"]`)
|
||||
.length
|
||||
) {
|
||||
cy.get(`[data-testid="${id}"] [data-testid="entity-link"]`)
|
||||
.scrollIntoView()
|
||||
.click();
|
||||
} else {
|
||||
cy.get(`[data-testid="entity-link"]`)
|
||||
.contains(term)
|
||||
.eq(0)
|
||||
.click();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -128,6 +128,10 @@ describe('Postgres Ingestion', () => {
|
||||
.scrollIntoView()
|
||||
.contains('Usage Ingestion')
|
||||
.click();
|
||||
|
||||
cy.get('#root\\/filterCondition')
|
||||
.scrollIntoView()
|
||||
.type(`s.query like '%${tableName}%'`);
|
||||
cy.get('[data-testid="submit-btn"]')
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
|
||||
@ -148,7 +148,7 @@ const Suggestions = ({
|
||||
|
||||
const getEntitiesSuggestions = () => {
|
||||
return (
|
||||
<div role="none">
|
||||
<div data-testid="global-search-suggestion-box" role="none">
|
||||
{[
|
||||
{ suggestions: tableSuggestions, searchIndex: SearchIndex.TABLE },
|
||||
{ suggestions: topicSuggestions, searchIndex: SearchIndex.TOPIC },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user