TableNG: Markdown cell, plus auto row height (#107549)
* TableNG: Markdown cell, plus custom row height * tab indentation in cue file * fix i18n * trying an auto height with the updated RDG * get auto cellHeight working * i18n updates * hoor disable_sanitize_html flag in MarkdownCell * update react-data-grid version to attempt to support page up and down * removing custom height * use the latest experimental RDG with paging up and down * TableNG: Wrap text for DataLinks and Pills; groundwork for max wrap length * disable editing max wrapped lines for now * disable wrap text line limit e2e * new i18n extract after commenting out input * wip * kill max wrapped lines for now * more cleanup * remove targeting classes added for max wrapped lines * fix Pill test * couple more style cleanups * fix e2es given these updates * add a couple tests * wip: tests * add tests * bump up capital letters in lorem ipsum * fix copy-pasta mistake * whoops, mis-merged the selector * use a local count instead of getCellLinks * use react-data-grid on react-18 branch * fix linting on test * gdev dashboard and smoketest for Markdown table * remove cellHeightCustom * reorganize in light of recent and upcoming changes * remove one more reference to cellHeightCustom * put getDefaultRowHeight back into a util * clean up test * swap cell height back to a radio * revert ImageCell change, we'll do it in the getStyles PR * don't memo defaultRowHeight * final couple of style cleanups * different approach to managing the auto height part of this * kill console.log * update i18n * reorganized once more * i18n * guard against rowHeight being auto for virtualization * may as well memoize the defaultRowHeight * get rid of the enableVirtualization initializer thing * fixes from CI * fix test * fix test * just omit third arg for that test * remove nonsensical test case * this file didn't get re-gen'd * fixes from review * row expander doesn't need height * remove console.log * fix e2e after we fixed pagination toggle bug
This commit is contained in:
@@ -225,7 +225,7 @@ test.describe('Panels test: Table - Kitchen Sink', { tag: ['@panels', '@table']
|
||||
// in a second, though.
|
||||
const smallRowStatus = await getRowStatus(page);
|
||||
expect(smallRowStatus.end).toBeGreaterThan(1);
|
||||
expect(page.getByRole('grid').getByRole('row')).toHaveCount(smallRowStatus.end + 1);
|
||||
expect(page.getByRole('grid').getByRole('row')).toHaveCount(smallRowStatus.end + 2); // +2 for header and footer rows
|
||||
|
||||
// change cell height to Large
|
||||
await dashboardPage
|
||||
@@ -235,7 +235,7 @@ test.describe('Panels test: Table - Kitchen Sink', { tag: ['@panels', '@table']
|
||||
.click();
|
||||
const largeRowStatus = await getRowStatus(page);
|
||||
expect(largeRowStatus.end).toBeLessThan(smallRowStatus.end);
|
||||
expect(page.getByRole('grid').getByRole('row')).toHaveCount(largeRowStatus.end + 1);
|
||||
expect(page.getByRole('grid').getByRole('row')).toHaveCount(largeRowStatus.end + 2); // +2 for header and footer rows
|
||||
|
||||
// click a page over with the directional nav
|
||||
await page.getByLabel('next page').click();
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
import { test, expect } from '@grafana/plugin-e2e';
|
||||
|
||||
test.use({
|
||||
viewport: { width: 1280, height: 1080 },
|
||||
featureToggles: {
|
||||
tableNextGen: true,
|
||||
},
|
||||
});
|
||||
|
||||
test.describe(
|
||||
'Panels test: Table - Markdown',
|
||||
{
|
||||
tag: ['@panels', '@table'],
|
||||
},
|
||||
() => {
|
||||
test('Tests Markdown tables are successfully rendered', async ({ gotoDashboardPage, page }) => {
|
||||
await gotoDashboardPage({
|
||||
uid: '2769f5d8-0094-4ac4-a4f0-f68f620339cc',
|
||||
queryParams: new URLSearchParams({ editPanel: '1' }),
|
||||
});
|
||||
|
||||
await expect(page.getByRole('grid')).toBeVisible();
|
||||
});
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user