Skip to content

Commit 3aca81e

Browse files
authored
fix: revert auto peak-picking threshold to 0.05 (#3747)
1 parent 5bf2e47 commit 3aca81e

File tree

4 files changed

+6
-23
lines changed

4 files changed

+6
-23
lines changed

src/component/header/AutoPeakPickingOptionPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const validationSchema = Yup.object().shape({
5151

5252
const INIT_VALUES: AutoPeakPickingOptions = {
5353
maxNumberOfPeaks: 50,
54-
minMaxRatio: 0.01,
54+
minMaxRatio: 0.05,
5555
noiseFactor: 3,
5656
direction: 'positive',
5757
};

src/component/header/RangesPickingOptionPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const validationSchema = Yup.object().shape({
2626
});
2727

2828
const initialValues: AutoRangesOptions = {
29-
minMaxRatio: 0.01,
29+
minMaxRatio: 0.05,
3030
lookNegative: false,
3131
};
3232

test-e2e/panels/filters.test.ts

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -74,25 +74,14 @@ async function baselineCorrectionFilter(
7474
).toBeVisible();
7575
}
7676

77-
async function addPeaks(
78-
nmrium: NmriumPage,
79-
{ keyboard = false, ratio = 0.1 } = {},
80-
) {
77+
async function addPeaks(nmrium: NmriumPage, { keyboard = false } = {}) {
8178
if (keyboard) {
8279
await nmrium.viewer.moveMouse();
8380
await nmrium.page.keyboard.press('KeyP');
8481
} else {
8582
await nmrium.clickTool('peakPicking');
8683
}
8784

88-
await nmrium.page.fill(
89-
'_react=Header >> [name="minMaxRatio"]',
90-
ratio.toString(),
91-
);
92-
93-
await nmrium.page
94-
.locator('_react=Header >> [name="minMaxRatio"].debounce-end')
95-
.waitFor({ state: 'visible' });
9685
await nmrium.page.click('_react=Header >> button >> text=Apply');
9786

9887
await expect(
@@ -169,15 +158,9 @@ test('process 13c spectrum with shortcuts', async ({ page }) => {
169158
await test.step('Apply baseline correction filter', async () => {
170159
await baselineCorrectionFilter(nmrium, { keyboard: true });
171160
});
172-
await test.step('Add default peaks', async () => {
161+
await test.step('Add peaks with default min-max ratio', async () => {
173162
await addPeaks(nmrium, { keyboard: true });
174163
});
175-
await test.step('Check peaks table', async () => {
176-
await checkPeakNumber(nmrium, 14);
177-
});
178-
await test.step('Add peaks with 0.05 ratio', async () => {
179-
await addPeaks(nmrium, { keyboard: true, ratio: 0.05 });
180-
});
181164
await test.step('Check peaks table', async () => {
182165
await checkPeakNumber(nmrium, 16);
183166
});

test-e2e/panels/ranges.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ test('Automatic ranges detection should work', async ({ page }) => {
137137
);
138138

139139
const rangesData = [
140-
{ s: '1.77', r: '1.11' },
141-
{ s: '1.92 - 1.97', r: '2.04' },
140+
{ s: '1.77', r: '0.88' },
141+
{ s: '1.95', r: '1.99' },
142142
];
143143

144144
const testPromises: Array<Promise<void>> = [];

0 commit comments

Comments
 (0)