mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-31 04:14:34 +00:00
cypress: fix flaky cypress test from main (#10937)
* cypress: fix flaky cypress test from main * fixed tags spec * skipping `Add tag at DatabaseSchema level with task & suggestions` test
This commit is contained in:
parent
eb92ea9069
commit
8ac6ce9f7a
@ -56,7 +56,7 @@ export const handleIngestionRetry = (
|
||||
|
||||
interceptURL(
|
||||
'GET',
|
||||
'/api/v1/services/ingestionPipelines?fields=owner,pipelineStatuses&service=*',
|
||||
'/api/v1/services/ingestionPipelines?*',
|
||||
'ingestionPipelines'
|
||||
);
|
||||
interceptURL(
|
||||
@ -232,8 +232,10 @@ export const testServiceCreationAndIngestion = (
|
||||
.click();
|
||||
|
||||
verifyResponseStatusCode('@createWorkflow', 201);
|
||||
// added extra buffer time as triggerWorkflow API takes time to provide result
|
||||
verifyResponseStatusCode('@triggerWorkflow', 200, { responseTimeout: 50000 });
|
||||
// added extra buffer time as triggerWorkflow API can take up to 2minute to provide result
|
||||
verifyResponseStatusCode('@triggerWorkflow', 200, {
|
||||
responseTimeout: 120000,
|
||||
});
|
||||
verifyResponseStatusCode('@getWorkflow', 200);
|
||||
|
||||
cy.contains('Connection test was successful').should('exist');
|
||||
|
@ -118,10 +118,15 @@ describe('Restore entity functionality should work properly', () => {
|
||||
.should('exist')
|
||||
.contains('Show Deleted Table');
|
||||
|
||||
interceptURL(
|
||||
'GET',
|
||||
'/api/v1/search/query?q=*&index=table_search_index&from=0&size=10&deleted=true&sort_field=name.keyword&sort_order=asc',
|
||||
'queryDeletedTables'
|
||||
);
|
||||
cy.get('[data-testid="deleted-table-menu-item-switch')
|
||||
.should('exist')
|
||||
.click();
|
||||
|
||||
verifyResponseStatusCode('@queryDeletedTables', 200);
|
||||
cy.get('[data-testid="Tables"] [data-testid="filter-count"]')
|
||||
.should('exist')
|
||||
.contains('1');
|
||||
|
@ -38,6 +38,7 @@ describe('Add nested teams and test TeamsSelectable', () => {
|
||||
cy.login();
|
||||
|
||||
cy.get('[data-testid="appbar-item-settings"]').should('be.visible').click();
|
||||
interceptURL('GET', '/api/v1/teams/name/Organization?*', 'getOrganization');
|
||||
interceptURL('GET', '/api/v1/users*', 'getTeams');
|
||||
// Clicking on teams
|
||||
cy.get('[data-menu-id*="teams"]')
|
||||
@ -46,6 +47,7 @@ describe('Add nested teams and test TeamsSelectable', () => {
|
||||
.click();
|
||||
|
||||
verifyResponseStatusCode('@getTeams', 200);
|
||||
verifyResponseStatusCode('@getOrganization', 200);
|
||||
});
|
||||
|
||||
it('Add teams', () => {
|
||||
@ -59,6 +61,7 @@ describe('Add nested teams and test TeamsSelectable', () => {
|
||||
'/api/v1/search/query?q=*&from=*&size=*&index=*',
|
||||
'getCreatedTeam'
|
||||
);
|
||||
verifyResponseStatusCode('@getOrganization', 200);
|
||||
// asserting the added values
|
||||
cy.get('table').find('.ant-table-row').contains(teamName).click();
|
||||
|
||||
|
@ -280,10 +280,11 @@ describe('Policy page should work properly', () => {
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
interceptURL('GET', '/api/v1/policies/*', 'editRulepage');
|
||||
interceptURL('GET', '/api/v1/policies/*', 'editRulePage');
|
||||
cy.get('[data-testid="edit-rule"]').should('be.visible').click();
|
||||
|
||||
verifyResponseStatusCode('@editRulepage', 200);
|
||||
verifyResponseStatusCode('@editRulePage', 200);
|
||||
verifyResponseStatusCode('@getSelectedPolicy', 200);
|
||||
|
||||
// Enter new name
|
||||
cy.get('[data-testid="rule-name"]').clear().type(updatedRuleName);
|
||||
|
@ -11,6 +11,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// / <reference types="cypress" />
|
||||
|
||||
import {
|
||||
addNewTagToEntity,
|
||||
descriptionBox,
|
||||
@ -54,6 +56,11 @@ describe('Tags page should work', () => {
|
||||
'getTagList'
|
||||
);
|
||||
interceptURL('GET', `/api/v1/permissions/classification/*`, 'permissions');
|
||||
interceptURL(
|
||||
'GET',
|
||||
`/api/v1/search/suggest?q=*&index=tag_search_index*glossary_search_index`,
|
||||
'suggestTag'
|
||||
);
|
||||
interceptURL('GET', '/api/v1/tags*', 'getTags');
|
||||
|
||||
cy.get('[data-testid="governance"]')
|
||||
@ -272,8 +279,7 @@ describe('Tags page should work', () => {
|
||||
.click()
|
||||
.type(tag);
|
||||
|
||||
verifyResponseStatusCode('@searchQuery', 200);
|
||||
|
||||
verifyResponseStatusCode('@suggestTag', 200);
|
||||
cy.get('.ant-select-item-option-content').contains(tag).click();
|
||||
|
||||
cy.get('[data-testid="tags-label"]').click();
|
||||
|
Loading…
x
Reference in New Issue
Block a user