@opencloning/ui 1.1.0-test.3 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # @opencloning/ui
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#570](https://github.com/manulera/OpenCloning_frontend/pull/570) [`83dab1c`](https://github.com/manulera/OpenCloning_frontend/commit/83dab1c2a7cca2b17aa8039b74d15c47e467b2f0) Thanks [@manulera](https://github.com/manulera)! - Switch to using provider for configuration rather than state
8
+
9
+ - [#570](https://github.com/manulera/OpenCloning_frontend/pull/570) [`83dab1c`](https://github.com/manulera/OpenCloning_frontend/commit/83dab1c2a7cca2b17aa8039b74d15c47e467b2f0) Thanks [@manulera](https://github.com/manulera)! - Handle version display with scripts
10
+
11
+ ### Patch Changes
12
+
13
+ - [#574](https://github.com/manulera/OpenCloning_frontend/pull/574) [`6df1c20`](https://github.com/manulera/OpenCloning_frontend/commit/6df1c2060d5776a30a00daaedfb0ec2cc685284d) Thanks [@manulera](https://github.com/manulera)! - Last dummy test to check if auto pre-release works
14
+
15
+ - [#573](https://github.com/manulera/OpenCloning_frontend/pull/573) [`07106ac`](https://github.com/manulera/OpenCloning_frontend/commit/07106ac0c8f9321d0b33994ed086a76eb79739a3) Thanks [@manulera](https://github.com/manulera)! - Dummy change to test that new action works
16
+
17
+ - [#570](https://github.com/manulera/OpenCloning_frontend/pull/570) [`83dab1c`](https://github.com/manulera/OpenCloning_frontend/commit/83dab1c2a7cca2b17aa8039b74d15c47e467b2f0) Thanks [@manulera](https://github.com/manulera)! - testing a test release to npm
18
+
19
+ - [#570](https://github.com/manulera/OpenCloning_frontend/pull/570) [`83dab1c`](https://github.com/manulera/OpenCloning_frontend/commit/83dab1c2a7cca2b17aa8039b74d15c47e467b2f0) Thanks [@manulera](https://github.com/manulera)! - Fix imports from mui and icons library, and add husky hook to validate that it does not happen again
20
+
21
+ - [#570](https://github.com/manulera/OpenCloning_frontend/pull/570) [`83dab1c`](https://github.com/manulera/OpenCloning_frontend/commit/83dab1c2a7cca2b17aa8039b74d15c47e467b2f0) Thanks [@manulera](https://github.com/manulera)! - Releases work on npm now through `YARN_NPM_AUTH_TOKEN=<> yarn changeset publish`, this is enabled by patch, see Readme. This properly handles workspaces (in package.json in each of the packages, `"@opencloning/store": "workspace:*",` is replaced by the actual version).
22
+
23
+ - Updated dependencies [[`6df1c20`](https://github.com/manulera/OpenCloning_frontend/commit/6df1c2060d5776a30a00daaedfb0ec2cc685284d), [`83dab1c`](https://github.com/manulera/OpenCloning_frontend/commit/83dab1c2a7cca2b17aa8039b74d15c47e467b2f0), [`83dab1c`](https://github.com/manulera/OpenCloning_frontend/commit/83dab1c2a7cca2b17aa8039b74d15c47e467b2f0), [`83dab1c`](https://github.com/manulera/OpenCloning_frontend/commit/83dab1c2a7cca2b17aa8039b74d15c47e467b2f0), [`83dab1c`](https://github.com/manulera/OpenCloning_frontend/commit/83dab1c2a7cca2b17aa8039b74d15c47e467b2f0)]:
24
+ - @opencloning/store@1.1.0
25
+ - @opencloning/utils@1.1.0
26
+
27
+ ## 1.1.0-dev.5
28
+
29
+ ### Patch Changes
30
+
31
+ - 6df1c20: Last dummy test to check if auto pre-release works
32
+ - Updated dependencies [6df1c20]
33
+ - @opencloning/store@1.1.0-dev.5
34
+ - @opencloning/utils@1.1.0-dev.5
35
+
36
+ ## 1.1.0-dev.4
37
+
38
+ ### Patch Changes
39
+
40
+ - 07106ac: Dummy change to test that new action works
41
+ - @opencloning/store@1.1.0-dev.4
42
+ - @opencloning/utils@1.1.0-dev.4
43
+
3
44
  ## 1.1.0-test.3
4
45
 
5
46
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencloning/ui",
3
- "version": "1.1.0-test.3",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
@@ -23,8 +23,8 @@
23
23
  "@emotion/styled": "^11.14.0",
24
24
  "@mui/icons-material": "^5.15.17",
25
25
  "@mui/material": "^5.15.17",
26
- "@opencloning/store": "1.1.0-test.3",
27
- "@opencloning/utils": "1.1.0-test.3",
26
+ "@opencloning/store": "1.1.0",
27
+ "@opencloning/utils": "1.1.0",
28
28
  "@teselagen/bio-parsers": "^0.4.32",
29
29
  "@teselagen/ove": "^0.8.18",
30
30
  "@teselagen/range-utils": "^0.3.13",
@@ -1 +1,2 @@
1
1
  export { default as OpenCloning } from './OpenCloning';
2
+ export { default as MainAppBar } from './navigation/MainAppBar';
@@ -1,14 +1,21 @@
1
1
  import React from 'react';
2
2
  import PrimerTableRow from './PrimerTableRow';
3
3
  import { mockPrimerDetails, mockPCRDetails, mockPrimer } from '../../../../../tests/mockPrimerDetailsData';
4
+ import { ConfigProvider } from '../../providers/ConfigProvider';
5
+
6
+ const config = {
7
+ backendUrl: 'http://127.0.0.1:8000',
8
+ };
4
9
 
5
10
  describe('<PrimerTableRow />', () => {
6
11
  it('displays the right information with PCR details', () => {
7
12
  cy.mount(
8
- <PrimerTableRow
9
- primerDetails={mockPrimerDetails}
10
- pcrDetails={mockPCRDetails}
11
- />,
13
+ <ConfigProvider config={config}>
14
+ <PrimerTableRow
15
+ primerDetails={mockPrimerDetails}
16
+ pcrDetails={mockPCRDetails}
17
+ />
18
+ </ConfigProvider>,
12
19
  );
13
20
 
14
21
  cy.get('.name').should('contain', 'Test Primer');
@@ -19,10 +26,12 @@ describe('<PrimerTableRow />', () => {
19
26
  });
20
27
  it('displays the right information without PCR details', () => {
21
28
  cy.mount(
22
- <PrimerTableRow
23
- primerDetails={mockPrimerDetails}
24
- pcrDetails={[]}
25
- />,
29
+ <ConfigProvider config={config}>
30
+ <PrimerTableRow
31
+ primerDetails={mockPrimerDetails}
32
+ pcrDetails={[]}
33
+ />
34
+ </ConfigProvider>,
26
35
  );
27
36
  cy.get('.melting-temperature').should('contain', '60');
28
37
  cy.get('.gc-content').should('contain', '50');
@@ -30,10 +39,12 @@ describe('<PrimerTableRow />', () => {
30
39
  });
31
40
  it('shows skeletons when info missing', () => {
32
41
  cy.mount(
33
- <PrimerTableRow
34
- primerDetails={mockPrimer}
35
- pcrDetails={[]}
36
- />,
42
+ <ConfigProvider config={config}>
43
+ <PrimerTableRow
44
+ primerDetails={mockPrimer}
45
+ pcrDetails={[]}
46
+ />
47
+ </ConfigProvider>,
37
48
  );
38
49
  cy.get('.melting-temperature .MuiSkeleton-root').should('exist');
39
50
  cy.get('.gc-content .MuiSkeleton-root').should('exist');
@@ -43,12 +54,14 @@ describe('<PrimerTableRow />', () => {
43
54
  // but if we mistakenly test for bool and the value is 0, nothing will show.
44
55
  // This test is to make sure that we are testing for undefined instead of bool.
45
56
  cy.mount(
46
- <PrimerTableRow
47
- primerDetails={{ ...mockPrimerDetails, melting_temperature: 0, gc_content: 0, length: 0 }}
48
- pcrDetails={[
49
- { ...mockPCRDetails[0], fwdPrimer: { ...mockPCRDetails[0].fwdPrimer, melting_temperature: 0, gc_content: 0, length: 0 } },
50
- ]}
51
- />,
57
+ <ConfigProvider config={config}>
58
+ <PrimerTableRow
59
+ primerDetails={{ ...mockPrimerDetails, melting_temperature: 0, gc_content: 0, length: 0 }}
60
+ pcrDetails={[
61
+ { ...mockPCRDetails[0], fwdPrimer: { ...mockPCRDetails[0].fwdPrimer, melting_temperature: 0, gc_content: 0, length: 0 } },
62
+ ]}
63
+ />
64
+ </ConfigProvider>,
52
65
  );
53
66
  cy.get('.melting-temperature').should('contain', '0 (0)');
54
67
  cy.get('.gc-content').should('contain', '0 (0)');
@@ -1,6 +1,6 @@
1
1
  import { IconButton, Tooltip } from '@mui/material';
2
2
  import React, { useState } from 'react';
3
- import { Delete as DeleteIcon, Edit as EditIcon, Save as SaveIcon, Clear as ClearIcon } from '@mui/icons-material';
3
+ import { Delete as DeleteIcon, Edit as EditIcon, Clear as ClearIcon } from '@mui/icons-material';
4
4
  import SubmitToDatabaseDialog from '../form/SubmitToDatabaseDialog';
5
5
  import useDatabase from '../../hooks/useDatabase';
6
6
  import PrimerDetailsTds from './primer_details/PrimerDetailsTds';
@@ -1,7 +1,7 @@
1
1
  import { Accordion, AccordionDetails, AccordionSummary, FormControl, InputLabel, ListItemText, MenuItem, Select, Tooltip } from '@mui/material';
2
2
  import React from 'react';
3
3
  import { useDispatch } from 'react-redux';
4
- import { AddCircle as AddCircleIcon, ExpandMore as ExpandMoreIcon, Cancel as CancelIcon } from '@mui/icons-material';
4
+ import { ExpandMore as ExpandMoreIcon, Cancel as CancelIcon } from '@mui/icons-material';
5
5
  import { cloningActions } from '@opencloning/store/cloning';
6
6
  import SingleInputSelector from './SingleInputSelector';
7
7
  import SelectPrimerForm from '../primers/SelectPrimerForm';
@@ -1,5 +1,10 @@
1
1
  import React from 'react';
2
2
  import { AssemblyIdSelector, SpeciesPicker, SequenceAccessionPicker, } from './SourceGenomeRegion';
3
+ import { ConfigProvider } from '../../providers/ConfigProvider';
4
+
5
+ const config = {
6
+ backendUrl: 'http://127.0.0.1:8000',
7
+ };
3
8
 
4
9
  describe('<AssemblyIdSelector />', () => {
5
10
  it('can propose a paired accession if the assembly has no annotation', () => {
@@ -43,11 +48,13 @@ describe('<AssemblyIdSelector />', () => {
43
48
  }).as('getPairedAssemblyInfo');
44
49
 
45
50
  cy.mount(
46
- <AssemblyIdSelector
47
- setAssemblyId={setAssemblyId}
48
- setHasAnnotation={setHasAnnotation}
49
- onAssemblyIdChange={onAssemblyIdChange}
50
- />
51
+ <ConfigProvider config={config}>
52
+ <AssemblyIdSelector
53
+ setAssemblyId={setAssemblyId}
54
+ setHasAnnotation={setHasAnnotation}
55
+ onAssemblyIdChange={onAssemblyIdChange}
56
+ />
57
+ </ConfigProvider>
51
58
  );
52
59
  cy.get('input').type('GCA_000002945.3');
53
60
  cy.wait('@getAssemblyInfo');
@@ -62,7 +69,9 @@ describe('<AssemblyIdSelector />', () => {
62
69
  }).as('getAssemblyInfo');
63
70
 
64
71
  cy.mount(
65
- <AssemblyIdSelector setAssemblyId={cy.spy()} setHasAnnotation={cy.spy()} onAssemblyIdChange={cy.spy()} />
72
+ <ConfigProvider config={config}>
73
+ <AssemblyIdSelector setAssemblyId={cy.spy()} setHasAnnotation={cy.spy()} onAssemblyIdChange={cy.spy()} />
74
+ </ConfigProvider>
66
75
  );
67
76
  cy.get('input').type('GCA_000002945.3', { delay: 0});
68
77
  cy.wait('@getAssemblyInfo');
@@ -76,7 +85,9 @@ describe('<SpeciesPicker />', () => {
76
85
  const setAssemblyId = cy.spy().as('setAssemblyId');
77
86
 
78
87
  cy.mount(
79
- <SpeciesPicker setSpecies={setSpecies} setAssemblyId={setAssemblyId} />
88
+ <ConfigProvider config={config}>
89
+ <SpeciesPicker setSpecies={setSpecies} setAssemblyId={setAssemblyId} />
90
+ </ConfigProvider>
80
91
  );
81
92
  cy.intercept('GET', 'https://api.ncbi.nlm.nih.gov/datasets/v2alpha/taxonomy/taxon_suggest/**', {
82
93
  statusCode: 500,
@@ -101,7 +112,9 @@ describe('<SequenceAccessionPicker />', () => {
101
112
  }).as('getSequenceReports');
102
113
 
103
114
  cy.mount(
104
- <SequenceAccessionPicker assemblyAccession={assemblyAccession} sequenceAccession={''} setSequenceAccession={setSequenceAccession} />
115
+ <ConfigProvider config={config}>
116
+ <SequenceAccessionPicker assemblyAccession={assemblyAccession} sequenceAccession={''} setSequenceAccession={setSequenceAccession} />
117
+ </ConfigProvider>
105
118
  );
106
119
  cy.contains('Could not load chromosomes').should('exist');
107
120
  });
@@ -115,7 +128,9 @@ describe('<SequenceAccessionPicker />', () => {
115
128
  }).as('getSequenceReports');
116
129
 
117
130
  cy.mount(
118
- <SequenceAccessionPicker assemblyAccession={assemblyAccession} setSequenceAccession={setSequenceAccession} />
131
+ <ConfigProvider config={config}>
132
+ <SequenceAccessionPicker assemblyAccession={assemblyAccession} setSequenceAccession={setSequenceAccession} />
133
+ </ConfigProvider>
119
134
  );
120
135
  cy.wait('@getSequenceReports');
121
136
  cy.get('label').siblings('div').first().click();
package/src/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Version placeholder - replaced at publish time via prepack script
2
- export const version = "1.1.0-test.3";
2
+ export const version = "1.1.0";