mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-01 05:03:10 +00:00
cypress: fixed AUT cypress failure part 2 (#16243)
* cypress: fixed AUT cypress failure part 2 * fixed query cypress * reverting logs
This commit is contained in:
parent
08564037e7
commit
2e52475b68
@ -209,16 +209,6 @@ describe('Query Entity', { tags: 'DataAssets' }, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('Verify query filter', () => {
|
it('Verify query filter', () => {
|
||||||
interceptURL(
|
|
||||||
'GET',
|
|
||||||
'/api/v1/search/query?*index=user_search_index,team_search_index*',
|
|
||||||
'searchOwner'
|
|
||||||
);
|
|
||||||
interceptURL(
|
|
||||||
'GET',
|
|
||||||
'/api/v1/search/query?*index=tag_search_index*',
|
|
||||||
'searchTag'
|
|
||||||
);
|
|
||||||
visitEntityDetailsPage({
|
visitEntityDetailsPage({
|
||||||
term: DATA.term,
|
term: DATA.term,
|
||||||
serviceName: DATA.serviceName,
|
serviceName: DATA.serviceName,
|
||||||
@ -226,27 +216,52 @@ describe('Query Entity', { tags: 'DataAssets' }, () => {
|
|||||||
});
|
});
|
||||||
cy.get('[data-testid="table_queries"]').click();
|
cy.get('[data-testid="table_queries"]').click();
|
||||||
verifyResponseStatusCode('@fetchQuery', 200);
|
verifyResponseStatusCode('@fetchQuery', 200);
|
||||||
|
const userName = `${user.firstName}${user.lastName}`;
|
||||||
|
interceptURL(
|
||||||
|
'GET',
|
||||||
|
`/api/v1/search/query?*${encodeURI(
|
||||||
|
userName
|
||||||
|
)}*index=user_search_index,team_search_index*`,
|
||||||
|
'searchUserName'
|
||||||
|
);
|
||||||
queryFilters({
|
queryFilters({
|
||||||
filter: `${user.firstName}${user.lastName}`,
|
filter: `${user.firstName}${user.lastName}`,
|
||||||
apiKey: '@searchOwner',
|
apiKey: '@searchUserName',
|
||||||
key: 'Owner',
|
key: 'Owner',
|
||||||
});
|
});
|
||||||
|
interceptURL(
|
||||||
|
'GET',
|
||||||
|
`/api/v1/search/query?*${encodeURI(
|
||||||
|
DATA.owner
|
||||||
|
)}*index=user_search_index,team_search_index*`,
|
||||||
|
'searchOwner'
|
||||||
|
);
|
||||||
cy.get('[data-testid="no-data-placeholder"]').should('be.visible');
|
cy.get('[data-testid="no-data-placeholder"]').should('be.visible');
|
||||||
queryFilters({
|
queryFilters({
|
||||||
filter: DATA.owner,
|
filter: DATA.owner,
|
||||||
apiKey: '@searchOwner',
|
apiKey: '@searchOwner',
|
||||||
key: 'Owner',
|
key: 'Owner',
|
||||||
});
|
});
|
||||||
|
interceptURL(
|
||||||
|
'GET',
|
||||||
|
'/api/v1/search/query?*None*index=tag_search_index*',
|
||||||
|
'noneTagSearch'
|
||||||
|
);
|
||||||
cy.get('[data-testid="query-card"]').should('have.length.above', 0);
|
cy.get('[data-testid="query-card"]').should('have.length.above', 0);
|
||||||
queryFilters({
|
queryFilters({
|
||||||
filter: 'None',
|
filter: 'None',
|
||||||
apiKey: '@searchTag',
|
apiKey: '@noneTagSearch',
|
||||||
key: 'Tag',
|
key: 'Tag',
|
||||||
});
|
});
|
||||||
|
interceptURL(
|
||||||
|
'GET',
|
||||||
|
`/api/v1/search/query?*${DATA.tag}*index=tag_search_index*`,
|
||||||
|
'personalTagSearch'
|
||||||
|
);
|
||||||
cy.get('[data-testid="no-data-placeholder"]').should('be.visible');
|
cy.get('[data-testid="no-data-placeholder"]').should('be.visible');
|
||||||
queryFilters({
|
queryFilters({
|
||||||
filter: DATA.tag,
|
filter: DATA.tag,
|
||||||
apiKey: '@searchTag',
|
apiKey: '@personalTagSearch',
|
||||||
key: 'Tag',
|
key: 'Tag',
|
||||||
});
|
});
|
||||||
cy.get('[data-testid="query-card"]').should('have.length.above', 0);
|
cy.get('[data-testid="query-card"]').should('have.length.above', 0);
|
||||||
|
@ -145,7 +145,7 @@ describe('Data Insight feature', { tags: 'Observability' }, () => {
|
|||||||
|
|
||||||
// Adding a manual wait to allow some time between deploying the pipeline and triggering it
|
// Adding a manual wait to allow some time between deploying the pipeline and triggering it
|
||||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||||
cy.wait(1000);
|
cy.wait(2000);
|
||||||
cy.get('[data-testid="run-now-button"]').click();
|
cy.get('[data-testid="run-now-button"]').click();
|
||||||
verifyResponseStatusCode('@triggerPipeline', 200);
|
verifyResponseStatusCode('@triggerPipeline', 200);
|
||||||
cy.reload();
|
cy.reload();
|
||||||
@ -260,7 +260,7 @@ describe('Data Insight feature', { tags: 'Observability' }, () => {
|
|||||||
cy.sidebarClick(SidebarItem.DATA_INSIGHT);
|
cy.sidebarClick(SidebarItem.DATA_INSIGHT);
|
||||||
verifyResponseStatusCode('@dataInsightsChart', 200);
|
verifyResponseStatusCode('@dataInsightsChart', 200);
|
||||||
cy.get('[data-menu-id*="kpi"]').click();
|
cy.get('[data-menu-id*="kpi"]').click();
|
||||||
verifyResponseStatusCode('@dataInsightsChart', 200);
|
verifyResponseStatusCode('@getKpi', 200);
|
||||||
KPI_DATA.map((data) => {
|
KPI_DATA.map((data) => {
|
||||||
cy.get(`[data-testid="edit-action-${data.displayName}"]`).click();
|
cy.get(`[data-testid="edit-action-${data.displayName}"]`).click();
|
||||||
verifyResponseStatusCode('@fetchKpiByName', 200);
|
verifyResponseStatusCode('@fetchKpiByName', 200);
|
||||||
|
@ -44,7 +44,9 @@ describe(
|
|||||||
cy.get('[data-testid="cron-type"]').click();
|
cy.get('[data-testid="cron-type"]').click();
|
||||||
cy.get('.rc-virtual-list [title="Day"]').click();
|
cy.get('.rc-virtual-list [title="Day"]').click();
|
||||||
cy.get('[data-testid="hour-options"]').click();
|
cy.get('[data-testid="hour-options"]').click();
|
||||||
cy.get('[title="06"]').click();
|
cy.get('.ant-select-dropdown [title="06"]').click();
|
||||||
|
cy.get('[data-testid="minute-options"]').click();
|
||||||
|
cy.get('.ant-select-dropdown [title="00"]').click();
|
||||||
cy.get('.ant-modal-body [data-testid="deploy-button"]').click();
|
cy.get('.ant-modal-body [data-testid="deploy-button"]').click();
|
||||||
verifyResponseStatusCode('@updateApplication', 200);
|
verifyResponseStatusCode('@updateApplication', 200);
|
||||||
cy.get('[data-testid="cron-string"]').should('contain', 'At 06:00 AM');
|
cy.get('[data-testid="cron-string"]').should('contain', 'At 06:00 AM');
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
// eslint-disable-next-line spaced-comment
|
// eslint-disable-next-line spaced-comment
|
||||||
|
import { interceptURL, verifyResponseStatusCode } from '../../common/common';
|
||||||
import UsersTestClass from '../../common/Entities/UserClass';
|
import UsersTestClass from '../../common/Entities/UserClass';
|
||||||
import { visitEntityDetailsPage } from '../../common/Utils/Entity';
|
import { visitEntityDetailsPage } from '../../common/Utils/Entity';
|
||||||
import { getToken } from '../../common/Utils/LocalStorage';
|
import { getToken } from '../../common/Utils/LocalStorage';
|
||||||
@ -20,10 +21,10 @@ import {
|
|||||||
removeOwner,
|
removeOwner,
|
||||||
} from '../../common/Utils/Owner';
|
} from '../../common/Utils/Owner';
|
||||||
import {
|
import {
|
||||||
DATA_CONSUMER_ROLE,
|
|
||||||
DATA_STEWARD_ROLE,
|
|
||||||
cleanupPolicies,
|
cleanupPolicies,
|
||||||
createRoleViaREST,
|
createRoleViaREST,
|
||||||
|
DATA_CONSUMER_ROLE,
|
||||||
|
DATA_STEWARD_ROLE,
|
||||||
} from '../../common/Utils/Policy';
|
} from '../../common/Utils/Policy';
|
||||||
import {
|
import {
|
||||||
addUser,
|
addUser,
|
||||||
@ -35,8 +36,6 @@ import {
|
|||||||
updateExpiration,
|
updateExpiration,
|
||||||
visitUserListPage,
|
visitUserListPage,
|
||||||
} from '../../common/Utils/Users';
|
} from '../../common/Utils/Users';
|
||||||
import { interceptURL, verifyResponseStatusCode } from '../../common/common';
|
|
||||||
import { EntityType, SidebarItem } from '../../constants/Entity.interface';
|
|
||||||
import {
|
import {
|
||||||
BASE_URL,
|
BASE_URL,
|
||||||
DELETE_ENTITY,
|
DELETE_ENTITY,
|
||||||
@ -44,6 +43,7 @@ import {
|
|||||||
ID,
|
ID,
|
||||||
uuid,
|
uuid,
|
||||||
} from '../../constants/constants';
|
} from '../../constants/constants';
|
||||||
|
import { EntityType, SidebarItem } from '../../constants/Entity.interface';
|
||||||
import {
|
import {
|
||||||
GlobalSettingOptions,
|
GlobalSettingOptions,
|
||||||
SETTINGS_OPTIONS_PATH,
|
SETTINGS_OPTIONS_PATH,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user