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