test(ui): cypress create uniq glossary for the tests (#15073)

This commit is contained in:
Chirag Madlani 2024-02-08 14:43:11 +05:30 committed by GitHub
parent ad40cdc149
commit 1277b211ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -82,8 +82,8 @@ const domainDetails2 = {
}; };
const glossaryDetails1 = { const glossaryDetails1 = {
name: 'CypressGeneral', name: `Cypress%General ${uuid()}`,
displayName: 'Cypress General', displayName: `Cypress % General ${uuid()}`,
description: description:
'Glossary terms that describe general conceptual terms. **Note that these conceptual terms are used for automatically labeling the data.**', 'Glossary terms that describe general conceptual terms. **Note that these conceptual terms are used for automatically labeling the data.**',
reviewers: [], reviewers: [],
@ -92,8 +92,8 @@ const glossaryDetails1 = {
}; };
const glossaryDetails2 = { const glossaryDetails2 = {
name: 'CypressPerson', name: `Cypress%Person ${uuid()}`,
displayName: 'Cypress Person', displayName: `Cypress % Person ${uuid()}`,
description: description:
// eslint-disable-next-line max-len // eslint-disable-next-line max-len
'Glossary related to describing **conceptual** terms related to a Person. These terms are used to label data assets to describe the user data in those assets. Example - a table column can be labeled with Person.PhoneNumber tag. The associated PII and PersonalData tags are automatically applied.', 'Glossary related to describing **conceptual** terms related to a Person. These terms are used to label data assets to describe the user data in those assets. Example - a table column can be labeled with Person.PhoneNumber tag. The associated PII and PersonalData tags are automatically applied.',
@ -112,7 +112,7 @@ const glossaryTermDetails1 = {
mutuallyExclusive: false, mutuallyExclusive: false,
tags: [], tags: [],
style: {}, style: {},
glossary: 'CypressGeneral', glossary: glossaryDetails1.name,
}; };
const glossaryTermDetails2 = { const glossaryTermDetails2 = {
@ -125,7 +125,7 @@ const glossaryTermDetails2 = {
mutuallyExclusive: false, mutuallyExclusive: false,
tags: [], tags: [],
style: {}, style: {},
glossary: 'CypressPerson', glossary: glossaryDetails2.name,
}; };
class EntityClass { class EntityClass {
@ -320,24 +320,28 @@ class EntityClass {
}); });
// Glossary 1 to test // Glossary 1 to test
deleteEntityViaREST({ deleteEntityViaREST({
entityName: `${glossaryDetails1.name}.${glossaryTermDetails1.name}`, entityName: `${encodeURIComponent(glossaryDetails1.name)}.${
glossaryTermDetails1.name
}`,
endPoint: EntityType.GlossaryTerm, endPoint: EntityType.GlossaryTerm,
token, token,
}); });
// Glossary 2 to test // Glossary 2 to test
deleteEntityViaREST({ deleteEntityViaREST({
entityName: `${glossaryDetails2.name}.${glossaryTermDetails2.name}`, entityName: `${encodeURIComponent(glossaryDetails2.name)}.${
glossaryTermDetails2.name
}`,
endPoint: EntityType.GlossaryTerm, endPoint: EntityType.GlossaryTerm,
token, token,
}); });
// Glossary 2 to test // Glossary 2 to test
deleteEntityViaREST({ deleteEntityViaREST({
entityName: glossaryDetails1.name, entityName: encodeURIComponent(glossaryDetails1.name),
endPoint: EntityType.Glossary, endPoint: EntityType.Glossary,
token, token,
}); });
deleteEntityViaREST({ deleteEntityViaREST({
entityName: glossaryDetails2.name, entityName: encodeURIComponent(glossaryDetails2.name),
endPoint: EntityType.Glossary, endPoint: EntityType.Glossary,
token, token,
}); });