mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-25 17:04:54 +00:00
MINOR: Fix the query of domain in explore (#14297)
* Fix the query of domian in exolore * added cypress test * minor change in url * minor change
This commit is contained in:
parent
8feb85e245
commit
e59fffc2f3
@ -13,6 +13,7 @@
|
||||
// eslint-disable-next-line spaced-comment
|
||||
/// <reference types="Cypress" />
|
||||
|
||||
import { interceptURL, verifyResponseStatusCode } from '../../common/common';
|
||||
import {
|
||||
addAssetsToDataProduct,
|
||||
addAssetsToDomain,
|
||||
@ -88,6 +89,26 @@ describe('Domain page should work properly', () => {
|
||||
addAssetsToDataProduct(DOMAIN_3.dataProducts[0], DOMAIN_3);
|
||||
});
|
||||
|
||||
it('Switch domain from navbar and check domain query call warp in quotes', () => {
|
||||
cy.get('[data-testid="domain-dropdown"]').should('be.visible').click();
|
||||
|
||||
cy.get(
|
||||
`[data-menu-id*="${DOMAIN_3.name}"] > .ant-dropdown-menu-title-content`
|
||||
)
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
interceptURL(
|
||||
'GET',
|
||||
'/api/v1/search/query?q=%28domain.fullyQualifiedName%3A%22Cypress%20Space%22%29*',
|
||||
'tableSearchQuery'
|
||||
);
|
||||
|
||||
cy.get('[data-testid="app-bar-item-explore"]').click();
|
||||
|
||||
verifyResponseStatusCode('@tableSearchQuery', 200);
|
||||
});
|
||||
|
||||
it('Remove data product assets using asset selection modal should work properly', () => {
|
||||
removeAssetsFromDataProduct(DOMAIN_2.dataProducts[0], DOMAIN_2);
|
||||
});
|
||||
|
@ -435,9 +435,9 @@ export const AuthProvider = ({
|
||||
// Parse and update the query parameter
|
||||
const queryParams = Qs.parse(config.url.split('?')[1]);
|
||||
// adding quotes for exact matching
|
||||
const domainStatement = `(domain.fullyQualifiedName:${escapeESReservedCharacters(
|
||||
const domainStatement = `(domain.fullyQualifiedName:"${escapeESReservedCharacters(
|
||||
activeDomain
|
||||
)})`;
|
||||
)}")`;
|
||||
queryParams.q = queryParams.q ?? '';
|
||||
queryParams.q += isEmpty(queryParams.q)
|
||||
? domainStatement
|
||||
|
@ -443,7 +443,7 @@ const NavBar = ({
|
||||
}}
|
||||
placement="bottomRight"
|
||||
trigger={['click']}>
|
||||
<Row gutter={6}>
|
||||
<Row data-testid="domain-dropdown" gutter={6}>
|
||||
<Col className="flex-center">
|
||||
<DomainIcon
|
||||
className="d-flex text-base-color"
|
||||
|
Loading…
x
Reference in New Issue
Block a user