Skip to content

Commit d4b225d

Browse files
committed
chose: fix export menu text and reorder them
1 parent 988a280 commit d4b225d

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

src/component/toolbar/toolbarMenu.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,38 +41,38 @@ const IMPORT_MENU: ToolbarPopoverMenuItem[] = [
4141

4242
const EXPORT_MENU: ToolbarPopoverMenuItem[] = [
4343
{
44-
icon: <FaDownload />,
45-
text: 'Export as SVG',
44+
icon: <FaFileDownload />,
45+
text: 'Save data (Press Ctrl+s)',
4646
data: {
47-
id: 'svg',
47+
id: 'json',
4848
},
4949
},
5050
{
51-
icon: <FaFileImage />,
52-
text: 'Export as PNG',
51+
icon: <FaFileDownload />,
52+
text: 'Save as (Press Ctrl+Shift+s)',
5353
data: {
54-
id: 'png',
54+
id: 'advance_save',
5555
},
5656
},
5757
{
5858
icon: <FaFileDownload />,
59-
text: 'Save data (Press Ctrl+s)',
59+
text: 'Save as NMReData',
6060
data: {
61-
id: 'json',
61+
id: 'nmre',
6262
},
6363
},
6464
{
65-
icon: <FaFileDownload />,
66-
text: 'Save data as (Press Ctrl+Shift+s)',
65+
icon: <FaDownload />,
66+
text: 'Export as SVG',
6767
data: {
68-
id: 'advance_save',
68+
id: 'svg',
6969
},
7070
},
7171
{
72-
icon: <FaFileDownload />,
73-
text: 'Save NMRE data',
72+
icon: <FaFileImage />,
73+
text: 'Export as PNG',
7474
data: {
75-
id: 'nmre',
75+
id: 'png',
7676
},
7777
},
7878
{

test-e2e/panels/spectra.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ test('Export source from 1H spectrum', async ({ page }) => {
370370
});
371371
await test.step('Open Save as window ', async () => {
372372
await nmrium.clickTool('exportAs');
373-
await nmrium.page.click('_react=ToolbarPopoverItem >> text=Save data as');
373+
await nmrium.page.click('_react=ToolbarPopoverItem >> text=Save as');
374374
});
375375
await test.step('Check include data options', async () => {
376376
const fields = nmrium.page.locator(
@@ -408,7 +408,7 @@ test('Export source from 1H spectrum', async ({ page }) => {
408408
await test.step('Check export DATA SOURCE', async () => {
409409
const downloadPromise = nmrium.page.waitForEvent('download');
410410
await nmrium.clickTool('exportAs');
411-
await nmrium.page.click('_react=ToolbarPopoverItem >> text=Save data as');
411+
await nmrium.page.click('_react=ToolbarPopoverItem >> text=Save as');
412412

413413
await nmrium.page.click('_react=SaveAsModal >> text="Data source" ');
414414

@@ -432,7 +432,7 @@ test('Export source from 1H spectrum', async ({ page }) => {
432432
await test.step('Check export NO Data', async () => {
433433
const downloadPromise = nmrium.page.waitForEvent('download');
434434
await nmrium.clickTool('exportAs');
435-
await nmrium.page.click('_react=ToolbarPopoverItem >> text=Save data as');
435+
await nmrium.page.click('_react=ToolbarPopoverItem >> text=Save as');
436436
await nmrium.page.click('_react=SaveAsModal >> text="No data" ');
437437
await nmrium.page.click('_react=SaveAsModal >> button >> text=Save');
438438
const download = await downloadPromise;
@@ -458,7 +458,7 @@ test('Export source from imported spectrum', async ({ page }) => {
458458
});
459459
await test.step('Open Save as window ', async () => {
460460
await nmrium.clickTool('exportAs');
461-
await nmrium.page.click('_react=ToolbarPopoverItem >> text=Save data as');
461+
await nmrium.page.click('_react=ToolbarPopoverItem >> text=Save as');
462462
});
463463
await test.step('Check include data options', async () => {
464464
const fields = nmrium.page.locator(
@@ -495,7 +495,7 @@ test('Export source from imported spectrum', async ({ page }) => {
495495
await test.step('Check export NO Data', async () => {
496496
const downloadPromise = nmrium.page.waitForEvent('download');
497497
await nmrium.clickTool('exportAs');
498-
await nmrium.page.click('_react=ToolbarPopoverItem >> text=Save data as');
498+
await nmrium.page.click('_react=ToolbarPopoverItem >> text=Save as');
499499
await nmrium.page.click('_react=SaveAsModal >> text="No data"');
500500
await nmrium.page.click('_react=SaveAsModal >> button >> text=Save');
501501
const download = await downloadPromise;

0 commit comments

Comments
 (0)