Skip to content

Commit dfb0e4f

Browse files
committed
fixup: merge master - resolve conflicts
1 parent 0feea7a commit dfb0e4f

19 files changed

Lines changed: 776 additions & 199 deletions

File tree

cypress/e2e/cv_spec.cy.ts

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ describe('CV', () => {
22
beforeEach(() => {
33
cy.viewport(2000, 2000)
44
cy.visit('http://localhost:3000/')
5-
cy.get('#btn-cv').click()
5+
cy.get('#btn-cv').click({ force: true })
66
})
77

88
it('Open layout', () => {
@@ -219,47 +219,4 @@ describe('CV', () => {
219219
/* ==== End Cypress Studio ==== */
220220
});
221221
})
222-
223-
it('Change axes labels', () => {
224-
/* ==== Generated with Cypress Studio ==== */
225-
cy.get('[aria-labelledby="select-x-axis-label"]').click();
226-
cy.get('[data-value="Voltage in V"]').click();
227-
cy.get('[aria-labelledby="select-y-axis-label"]').click();
228-
cy.get('[data-value="Current in A"]').click();
229-
// /* ==== End Cypress Studio ==== */
230-
231-
cy.get('.d3Svg text.xLabel').should('have.text', 'Voltage in V')
232-
cy.get('.d3Svg text.yLabel').should('have.text', 'Current in A')
233-
234-
/* ==== Generated with Cypress Studio ==== */
235-
cy.get('[aria-labelledby="select-x-axis-label"]').click();
236-
cy.get('[data-value="Voltage vs Ref in V"]').click();
237-
cy.get('[aria-labelledby="select-y-axis-label"]').click();
238-
cy.get('[data-value="Current in mA"]').click();
239-
// /* ==== End Cypress Studio ==== */
240-
241-
cy.get('.d3Svg text.xLabel').should('have.text', 'Voltage vs Ref in V')
242-
cy.get('.d3Svg text.yLabel').should('have.text', 'Current in mA')
243-
244-
/* ==== Generated with Cypress Studio ==== */
245-
cy.get('[aria-labelledby="select-x-axis-label"]').click();
246-
cy.get('[data-value="Potential in V"]').click();
247-
cy.get('[aria-labelledby="select-y-axis-label"]').click();
248-
cy.get('[data-value="Current in A"]').click();
249-
/* ==== End Cypress Studio ==== */
250-
251-
cy.get('.d3Svg text.xLabel').should('have.text', 'Potential in V')
252-
cy.get('.d3Svg text.yLabel').should('have.text', 'Current in A')
253-
254-
// /* ==== Generated with Cypress Studio ==== */
255-
cy.get('[aria-labelledby="select-x-axis-label"]').click();
256-
cy.get('[data-value="Potential vs Ref in V"]').click();
257-
cy.get('[aria-labelledby="select-y-axis-label"]').click();
258-
cy.get('[data-value="Current in mA"]').click();
259-
/* ==== End Cypress Studio ==== */
260-
261-
cy.get('.d3Svg text.xLabel').should('have.text', 'Potential vs Ref in V')
262-
cy.get('.d3Svg text.yLabel').should('have.text', 'Current in mA')
263-
264-
})
265222
})

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@complat/react-spectra-editor",
3-
"version": "1.5.3",
3+
"version": "1.5.4",
44
"description": "An editor to View and Edit Chemical Spectra data (NMR, IR, MS, CV, UIVIS, XRD, GC, and DSC).",
55
"repository": {
66
"type": "git",

src/__tests__/units/components/panel/cyclic_voltamery_data.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ describe('<CyclicVoltammetryPanel />', () => {
8282
expect(tabelCells?.length).toEqual(24)
8383

8484
const arrCellLabel = [
85-
'', 'E: 2.00 V,I: 2.00e+3 mA', 'E: -2.00 V,I: 1.00e+3 mA', '1.60e+3 mA', '0.97', '0.00 V', '4000 mV', '',
86-
'', 'E: 2.00 V,I: 2.00e+3 mA', 'E: 1.00 V,I: 1.00e+3 mA', '1.60e+3 mA', '0.97', '1.50 V', '1000 mV', '',
87-
'', 'nd', 'nd', '1.60e+3 mA', 'nd', 'nd', 'nd', '',]
85+
'', 'E: 2.00 V,I: 2.00e+0 A', 'E: -2.00 V,I: 1.00e+0 A', '1.60e+0 A', '0.97', '0.00 V', '4000 mV', '',
86+
'', 'E: 2.00 V,I: 2.00e+0 A', 'E: 1.00 V,I: 1.00e+0 A', '1.60e+0 A', '0.97', '1.50 V', '1000 mV', '',
87+
'', 'nd', 'nd', '1.60e+0 A', 'nd', 'nd', 'nd', '',]
8888
tabelCells?.forEach((cell, idx) => {
8989
expect(cell).toHaveTextContent(arrCellLabel[idx])
9090
expect(cell).toHaveClass('txt-sv-panel-txt')

src/actions/cyclic_voltammetry.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,21 @@ const setCylicVoltaRef = (payload) => (
9191
}
9292
);
9393

94+
const setCyclicVoltaAreaValue = (value) => ({
95+
type: CYCLIC_VOLTA_METRY.SET_AREA_VALUE,
96+
payload: { value },
97+
});
98+
99+
const setCyclicVoltaAreaUnit = (unit) => ({
100+
type: CYCLIC_VOLTA_METRY.SET_AREA_UNIT,
101+
payload: { unit },
102+
});
103+
104+
const toggleCyclicVoltaDensity = (payload) => ({
105+
type: CYCLIC_VOLTA_METRY.TOGGLE_DENSITY,
106+
payload,
107+
});
108+
94109
export {
95110
addNewCylicVoltaPairPeak, removeCylicVoltaPairPeak,
96111
addCylicVoltaMaxPeak, removeCylicVoltaMaxPeak,
@@ -99,4 +114,7 @@ export {
99114
addCylicVoltaPecker, removeCylicVoltaPecker,
100115
selectRefPeaks, setCylicVoltaRefFactor,
101116
setCylicVoltaRef,
117+
setCyclicVoltaAreaValue,
118+
setCyclicVoltaAreaUnit,
119+
toggleCyclicVoltaDensity,
102120
};

src/components/cmd_bar/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import Wavelength from './r07_wavelength_btn';
2121
import Pecker from './07_pecker';
2222
import ChangeAxes from './r08_change_axes';
2323
import Detector from './r09_detector';
24+
import CvDensityControls from './r10_cv_density';
2425
import Format from '../../helpers/format';
2526

2627
const styles = () => (
@@ -60,6 +61,7 @@ const CmdBar = ({
6061
}
6162
<Layout feature={feature} hasEdit={hasEdit} />
6263
<Wavelength />
64+
<CvDensityControls />
6365
<ChangeAxes />
6466
<Detector />
6567
</div>

0 commit comments

Comments
 (0)