Skip to content

Commit

Permalink
fix: remove quotes around fqn (#14055)
Browse files Browse the repository at this point in the history
  • Loading branch information
karanh37 authored Nov 22, 2023
1 parent c7e758e commit 9c990fe
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ const checkDisplayName = (displayName) => {
});
};

const checkDataProductsCount = (dataProductsCount) => {
cy.get('[data-testid="data_products"] [data-testid="count"]')
.scrollIntoView()
.eq(dataProductsCount);
};

const checkAssetsCount = (assetsCount) => {
cy.get('[data-testid="assets"] [data-testid="count"]')
.scrollIntoView()
.eq(assetsCount);
};

const updateOwner = (newOwner) => {
interceptURL('PATCH', `/api/v1/domains/*`, 'patchOwner');
interceptURL('GET', '/api/v1/users?limit=25&isBot=false', 'getUsers');
Expand Down Expand Up @@ -267,6 +279,8 @@ export const createDomain = (domainObj, validate) => {

cy.url().should('include', '/domain/');
checkDisplayName(domainObj.name);
checkAssetsCount(0);
checkDataProductsCount(0);
});
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ 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:"${activeDomain}")`;
const domainStatement = `(domain.fullyQualifiedName:${activeDomain})`;
queryParams.q = queryParams.q ?? '';
queryParams.q += isEmpty(queryParams.q)
? domainStatement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ const DataProductsDetailsPage = ({
'',
1,
0,
`(dataProducts.fullyQualifiedName:"${fqn}")`,
`(dataProducts.fullyQualifiedName:${fqn})`,
'',
'',
SearchIndex.ALL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ const DomainDetailsPage = ({
async (formData: CreateDataProduct) => {
const data = {
...formData,
domain: domain.name,
domain: domain.fullyQualifiedName,
};

try {
Expand Down Expand Up @@ -238,7 +238,7 @@ const DomainDetailsPage = ({
'',
1,
0,
`(domain.fullyQualifiedName:"${domainFqn}")`,
`(domain.fullyQualifiedName:${domainFqn})`,
'',
'',
SearchIndex.DATA_PRODUCT
Expand All @@ -258,7 +258,7 @@ const DomainDetailsPage = ({
'',
1,
0,
`(domain.fullyQualifiedName:"${fqn}")`,
`(domain.fullyQualifiedName:${fqn})`,
'',
'',
SearchIndex.ALL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const DataProductsTab = forwardRef(
'',
1,
PAGE_SIZE_LARGE,
`(domain.fullyQualifiedName:"${domainFqn}")`,
`(domain.fullyQualifiedName:${domainFqn})`,
'',
'',
SearchIndex.DATA_PRODUCT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ const AssetsTabs = forwardRef(
const queryParam = useMemo(() => {
switch (type) {
case AssetsOfEntity.DOMAIN:
return `(domain.fullyQualifiedName:"${fqn}")`;
return `(domain.fullyQualifiedName:${fqn})`;

case AssetsOfEntity.DATA_PRODUCT:
return `(dataProducts.fullyQualifiedName:"${fqn}")`;
return `(dataProducts.fullyQualifiedName:${fqn})`;

case AssetsOfEntity.TEAM:
return `(owner.fullyQualifiedName:"${fqn}")`;
Expand Down

0 comments on commit 9c990fe

Please sign in to comment.