chore: cleanup trade test
Some checks failed
FreqUI CI / build (18, ubuntu-22.04) (push) Has been cancelled
FreqUI CI / build (20, ubuntu-22.04) (push) Has been cancelled
FreqUI CI / build (21, ubuntu-22.04) (push) Has been cancelled
FreqUI CI / build (22, ubuntu-22.04) (push) Has been cancelled

This commit is contained in:
Matthias 2024-10-01 07:12:01 +02:00
parent 159a95d4e3
commit 6802496cb3

View File

@ -100,7 +100,7 @@ test.describe('Trade', () => {
await expect(page.getByText('Config reloaded successfully.')).toBeInViewport(); await expect(page.getByText('Config reloaded successfully.')).toBeInViewport();
}); });
test('Trade page - drag and drop', async ({ page, browserName }) => { test('Trade page - drag and drop', async ({ page }) => {
await Promise.all([ await Promise.all([
page.goto('/trade'), page.goto('/trade'),
// Wait for network requests // Wait for network requests
@ -138,27 +138,7 @@ test.describe('Trade', () => {
await page.mouse.up(); await page.mouse.up();
await expect(multiPane).toBeInViewport(); await expect(multiPane).toBeInViewport();
// Multipane wasn't moved. // Multipane wasn't moved.
// if (browserName !== 'webkit') {
await expect(multiPanebb).toEqual(await multiPane.boundingBox()); await expect(multiPanebb).toEqual(await multiPane.boundingBox());
// } else {
// // allow offset of 2%
// const newMultiPaneBB = await multiPane.boundingBox();
// if (newMultiPaneBB && multiPanebb) {
// const xDiff = Math.abs((newMultiPaneBB.x - multiPanebb.x) / multiPanebb.x);
// const yDiff = Math.abs((newMultiPaneBB.y - multiPanebb.y) / multiPanebb.y);
// const widthDiff = Math.abs(
// (newMultiPaneBB.width - multiPanebb.width) / multiPanebb.width,
// );
// const heightDiff = Math.abs(
// (newMultiPaneBB.height - multiPanebb.height) / multiPanebb.height,
// );
// expect(xDiff).toBeLessThanOrEqual(0.02);
// expect(yDiff).toBeLessThanOrEqual(0.02);
// expect(widthDiff).toBeLessThanOrEqual(0.02);
// expect(heightDiff).toBeLessThanOrEqual(0.02);
// }
// }
await expect(chartHeader).toBeInViewport(); await expect(chartHeader).toBeInViewport();
// ChartHeader was moved down // ChartHeader was moved down