mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 02:11:57 +00:00
Add test for plot config
This commit is contained in:
parent
2847c7d852
commit
0dea63e6e9
|
@ -37,4 +37,31 @@ test.describe('Chart', () => {
|
||||||
.locator('#plotConfigSelect'),
|
.locator('#plotConfigSelect'),
|
||||||
).toHaveValue('default');
|
).toHaveValue('default');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('Plot configurator', async ({ page }) => {
|
||||||
|
await Promise.all([
|
||||||
|
page.goto('/graph'),
|
||||||
|
page.waitForResponse('**/whitelist'),
|
||||||
|
page.waitForResponse('**/blacklist'),
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Wait for the chart to load
|
||||||
|
await page.waitForSelector('span:has-text("NoActionStrategyFut | 1m")');
|
||||||
|
|
||||||
|
await page.getByRole('button', { name: 'Plot configurator' }).click();
|
||||||
|
await page.getByRole('button', { name: 'Indicator from template' }).click();
|
||||||
|
// Apply bollinger bands
|
||||||
|
await page.getByLabel('Select Templates').selectOption('BollingerBands');
|
||||||
|
// Select template - Try to use
|
||||||
|
await page.getByRole('button', { name: 'Use Template' }).click();
|
||||||
|
// Accept remapping and close
|
||||||
|
await page.getByRole('button', { name: 'Apply Template' }).click();
|
||||||
|
await page.getByRole('button', { name: 'Save' }).click();
|
||||||
|
// Close Plot configurator
|
||||||
|
await page.getByRole('button', { name: 'Plot configurator' }).click();
|
||||||
|
|
||||||
|
await expect(page.locator('canvas')).toHaveScreenshot('Chart-Plot-with_BollingerBands.png');
|
||||||
|
// Should assert if indicators have been set
|
||||||
|
// but it's a canvas ...
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 95 KiB |
Binary file not shown.
After Width: | Height: | Size: 95 KiB |
Binary file not shown.
After Width: | Height: | Size: 95 KiB |
Binary file not shown.
After Width: | Height: | Size: 95 KiB |
Loading…
Reference in New Issue
Block a user