Skip to content

Commit 413ec3e

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

2 files changed

Lines changed: 23 additions & 23 deletions

File tree

src/component/toolbar/toolbarMenu.tsx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,6 @@ const IMPORT_MENU: ToolbarPopoverMenuItem[] = [
4040
] as const;
4141

4242
const EXPORT_MENU: ToolbarPopoverMenuItem[] = [
43-
{
44-
icon: <FaDownload />,
45-
text: 'Export as SVG',
46-
data: {
47-
id: 'svg',
48-
},
49-
},
50-
{
51-
icon: <FaFileImage />,
52-
text: 'Export as PNG',
53-
data: {
54-
id: 'png',
55-
},
56-
},
5743
{
5844
icon: <FaFileDownload />,
5945
text: 'Save data (Press Ctrl+s)',
@@ -63,16 +49,23 @@ const EXPORT_MENU: ToolbarPopoverMenuItem[] = [
6349
},
6450
{
6551
icon: <FaFileDownload />,
66-
text: 'Save data as (Press Ctrl+Shift+s)',
52+
text: 'Save as (Press Ctrl+Shift+s)',
6753
data: {
6854
id: 'advance_save',
6955
},
7056
},
7157
{
72-
icon: <FaFileDownload />,
73-
text: 'Save NMRE data',
58+
icon: <FaDownload />,
59+
text: 'Export as SVG',
7460
data: {
75-
id: 'nmre',
61+
id: 'svg',
62+
},
63+
},
64+
{
65+
icon: <FaFileImage />,
66+
text: 'Export as PNG',
67+
data: {
68+
id: 'png',
7669
},
7770
},
7871
{
@@ -82,6 +75,13 @@ const EXPORT_MENU: ToolbarPopoverMenuItem[] = [
8275
id: 'copy',
8376
},
8477
},
78+
{
79+
icon: <FaFileDownload />,
80+
text: 'Export as NMReData',
81+
data: {
82+
id: 'nmre',
83+
},
84+
},
8585
];
8686

8787
export { EXPORT_MENU, IMPORT_MENU };

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)