mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-31 12:39:01 +00:00
fix: search preview test (#20744)
This commit is contained in:
parent
2b88409bbc
commit
018f8e823b
@ -127,15 +127,10 @@ test.describe('Search Settings Tests', () => {
|
|||||||
test.describe('Search Preview test', () => {
|
test.describe('Search Preview test', () => {
|
||||||
const table1 = new TableClass();
|
const table1 = new TableClass();
|
||||||
const table2 = new TableClass();
|
const table2 = new TableClass();
|
||||||
// Override properties to include "Searchable" keyword
|
// Override properties to include "ranking" keyword
|
||||||
table1.entity.name = `pw-table-Searchable-${
|
table1.entity.name = `${table1.entity.name}-ranking`;
|
||||||
table1.entity.name.split('pw-table-')[1]
|
table1.entity.displayName = `${table1.entity.name}`;
|
||||||
}`;
|
table2.entity.description = `This is a ${table1.entity.name} test table for search settings verification`;
|
||||||
table1.entity.displayName = `Searchable Table ${
|
|
||||||
table1.entity.displayName.split('pw table ')[1]
|
|
||||||
}`;
|
|
||||||
table2.entity.description =
|
|
||||||
'This is a Searchable test table for search settings verification';
|
|
||||||
|
|
||||||
test.beforeAll('Setup pre-requests', async ({ browser }) => {
|
test.beforeAll('Setup pre-requests', async ({ browser }) => {
|
||||||
const { apiContext, afterAction } = await createNewPage(browser);
|
const { apiContext, afterAction } = await createNewPage(browser);
|
||||||
@ -164,7 +159,7 @@ test.describe('Search Preview test', () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const searchInput = page.getByTestId('searchbar');
|
const searchInput = page.getByTestId('searchbar');
|
||||||
await searchInput.fill('Searchable');
|
await searchInput.fill(table1.entity.name);
|
||||||
|
|
||||||
const descriptionField = page.getByTestId(
|
const descriptionField = page.getByTestId(
|
||||||
`field-configuration-panel-description`
|
`field-configuration-panel-description`
|
||||||
@ -185,7 +180,7 @@ test.describe('Search Preview test', () => {
|
|||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
firstCard.getByTestId('entity-header-display-name')
|
firstCard.getByTestId('entity-header-display-name')
|
||||||
).toHaveText(table1.entity.displayName);
|
).toHaveText(table1.entity.name);
|
||||||
|
|
||||||
// Check the second card has table2's description using data-testid
|
// Check the second card has table2's description using data-testid
|
||||||
const secondCard = searchCards.nth(1);
|
const secondCard = searchCards.nth(1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user