mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-18 12:18:35 +00:00
fix glossary column dropdown drag drop integration test (#18662)
This commit is contained in:
parent
88c8fb48f3
commit
5cdde2054b
@ -1027,42 +1027,37 @@ test.describe('Glossary tests', () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
test.skip('Column dropdown drag-and-drop functionality for Glossary Terms table', async ({
|
test('Column dropdown drag-and-drop functionality for Glossary Terms table', async ({
|
||||||
browser,
|
browser,
|
||||||
}) => {
|
}) => {
|
||||||
const { page, afterAction, apiContext } = await performAdminLogin(browser);
|
const { page, afterAction, apiContext } = await performAdminLogin(browser);
|
||||||
const glossary1 = new Glossary();
|
const glossary1 = new Glossary();
|
||||||
const glossaryTerm1 = new GlossaryTerm(glossary1);
|
const glossaryTerm1 = new GlossaryTerm(glossary1);
|
||||||
const glossaryTerm2 = new GlossaryTerm(glossary1);
|
glossary1.data.terms = [glossaryTerm1];
|
||||||
glossary1.data.terms = [glossaryTerm1, glossaryTerm2];
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await glossary1.create(apiContext);
|
await glossary1.create(apiContext);
|
||||||
await glossaryTerm1.create(apiContext);
|
await glossaryTerm1.create(apiContext);
|
||||||
await glossaryTerm2.create(apiContext);
|
|
||||||
await sidebarClick(page, SidebarItem.GLOSSARY);
|
await sidebarClick(page, SidebarItem.GLOSSARY);
|
||||||
await selectActiveGlossary(page, glossary1.data.displayName);
|
await selectActiveGlossary(page, glossary1.data.displayName);
|
||||||
await openColumnDropdown(page);
|
await openColumnDropdown(page);
|
||||||
const dragColumn = 'Owners';
|
const dragColumn = 'Owners';
|
||||||
const dropColumn = 'Status';
|
const dropColumn = 'Status';
|
||||||
await dragAndDropColumn(page, dragColumn, dropColumn);
|
await dragAndDropColumn(page, dragColumn, dropColumn);
|
||||||
const saveButton = page.locator('.ant-btn-primary', {
|
const saveButton = page.locator(
|
||||||
hasText: 'Save',
|
'[data-testid="glossary-col-dropdown-save"]'
|
||||||
});
|
);
|
||||||
await saveButton.click();
|
await saveButton.click();
|
||||||
|
await page.waitForSelector('thead th', { state: 'visible' });
|
||||||
const columnHeaders = await page.locator('thead th');
|
const columnHeaders = await page.locator('thead th');
|
||||||
const columnText = await columnHeaders.allTextContents();
|
const columnText = await columnHeaders.allTextContents();
|
||||||
|
|
||||||
expect(columnText).toEqual([
|
expect(columnText).toEqual(
|
||||||
'Terms',
|
columnText.includes('Actions')
|
||||||
'Description',
|
? ['Terms', 'Description', 'Status', 'Owners', 'Actions']
|
||||||
'Status',
|
: ['Terms', 'Description', 'Status', 'Owners']
|
||||||
'Owners',
|
);
|
||||||
'Actions',
|
|
||||||
]);
|
|
||||||
} finally {
|
} finally {
|
||||||
await glossaryTerm1.delete(apiContext);
|
await glossaryTerm1.delete(apiContext);
|
||||||
await glossaryTerm2.delete(apiContext);
|
|
||||||
await glossary1.delete(apiContext);
|
await glossary1.delete(apiContext);
|
||||||
await afterAction();
|
await afterAction();
|
||||||
}
|
}
|
||||||
|
@ -498,6 +498,7 @@ const GlossaryTermTab = ({
|
|||||||
<Space>
|
<Space>
|
||||||
<Button
|
<Button
|
||||||
className="custom-glossary-dropdown-action-btn"
|
className="custom-glossary-dropdown-action-btn"
|
||||||
|
data-testid="glossary-col-dropdown-save"
|
||||||
type="primary"
|
type="primary"
|
||||||
onClick={handleColumnSelectionDropdownSave}>
|
onClick={handleColumnSelectionDropdownSave}>
|
||||||
{t('label.save')}
|
{t('label.save')}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user