(fixture = {})
| 18 | }); |
| 19 | const settle = () => page.waitForFunction(() => !!OCA.Analytics.TableOptions.active?.preview); |
| 20 | const open = async (fixture = {}) => { |
| 21 | await page.evaluate(fixture => { |
| 22 | OCA.Analytics.Notification.dialogClose(); |
| 23 | OCA.Analytics.currentReportData = { |
| 24 | header: ['Region', 'Quarter', 'Revenue', 'Cost'], |
| 25 | data: [['North','Q1',12400,8100],['North','Q2',16800,10300],['South','Q1',8200,5900],['South','Q2',10900,7700]], |
| 26 | thresholds: [], options: {id: 999999, chart: 'column', tableoptions: {}, filteroptions: {}}, |
| 27 | ...fixture, |
| 28 | }; |
| 29 | window.tableBefore = JSON.stringify(OCA.Analytics.currentReportData); |
| 30 | window.tableRegistryBefore = Object.keys(OCA.Analytics.tableObject); |
| 31 | window.tableInstancesBefore = DataTable.settings.length; |
| 32 | OCA.Analytics.unsavedChanges = false; |
| 33 | OCA.Analytics.Filter.openTableOptionsDialog(); |
| 34 | }, fixture); |
| 35 | await settle(); |
| 36 | }; |
| 37 | const nav = async name => { |
| 38 | await page.getByRole('link', {name, exact: true}).click(); |
| 39 | await page.waitForTimeout(200); |
no test coverage detected