Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/component/header/AutoPeakPickingOptionPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const validationSchema = Yup.object().shape({

const INIT_VALUES: AutoPeakPickingOptions = {
maxNumberOfPeaks: 50,
minMaxRatio: 0.01,
minMaxRatio: 0.05,
noiseFactor: 3,
direction: 'positive',
};
Expand Down
2 changes: 1 addition & 1 deletion src/component/header/RangesPickingOptionPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const validationSchema = Yup.object().shape({
});

const initialValues: AutoRangesOptions = {
minMaxRatio: 0.01,
minMaxRatio: 0.05,
lookNegative: false,
};

Expand Down
21 changes: 2 additions & 19 deletions test-e2e/panels/filters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,25 +74,14 @@ async function baselineCorrectionFilter(
).toBeVisible();
}

async function addPeaks(
nmrium: NmriumPage,
{ keyboard = false, ratio = 0.1 } = {},
) {
async function addPeaks(nmrium: NmriumPage, { keyboard = false } = {}) {
if (keyboard) {
await nmrium.viewer.moveMouse();
await nmrium.page.keyboard.press('KeyP');
} else {
await nmrium.clickTool('peakPicking');
}

await nmrium.page.fill(
'_react=Header >> [name="minMaxRatio"]',
ratio.toString(),
);

await nmrium.page
.locator('_react=Header >> [name="minMaxRatio"].debounce-end')
.waitFor({ state: 'visible' });
await nmrium.page.click('_react=Header >> button >> text=Apply');

await expect(
Expand Down Expand Up @@ -169,15 +158,9 @@ test('process 13c spectrum with shortcuts', async ({ page }) => {
await test.step('Apply baseline correction filter', async () => {
await baselineCorrectionFilter(nmrium, { keyboard: true });
});
await test.step('Add default peaks', async () => {
await test.step('Add peaks with default min-max ratio', async () => {
await addPeaks(nmrium, { keyboard: true });
});
await test.step('Check peaks table', async () => {
await checkPeakNumber(nmrium, 14);
});
await test.step('Add peaks with 0.05 ratio', async () => {
await addPeaks(nmrium, { keyboard: true, ratio: 0.05 });
});
await test.step('Check peaks table', async () => {
await checkPeakNumber(nmrium, 16);
});
Expand Down
4 changes: 2 additions & 2 deletions test-e2e/panels/ranges.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ test('Automatic ranges detection should work', async ({ page }) => {
);

const rangesData = [
{ s: '1.77', r: '1.11' },
{ s: '1.92 - 1.97', r: '2.04' },
{ s: '1.77', r: '0.88' },
{ s: '1.95', r: '1.99' },
];

const testPromises: Array<Promise<void>> = [];
Expand Down
Loading