Skip to content

Commit

Permalink
Autotests: #2885 - Create autotests for atom tools (#3361)
Browse files Browse the repository at this point in the history
* - added 6 tests to 'atom-tool';
- added expected snapshots;
- added function 'takeRightToolbarScreenshot'

* - added tests to 'atom-tools';
- added expected snapshots;
- added 12 test files

* - added tests to 'atom-tool'
- added expected snapshots;
- added 1 test file;

* - added tests to 'atom-tools';
- added expected snapshots;
- added 'type Atoms = Exclude' to 'buttons.ts'

* - code refactoring;
- refactoring function selectAtomsFromPeriodicTable;
- added data-testid to 'Atom.jsx'

* - code refactoring;
- added 'excludeAtoms.ts'
  • Loading branch information
Zhirnoff authored Sep 29, 2023
1 parent 077e78c commit 4cb74d0
Show file tree
Hide file tree
Showing 91 changed files with 1,228 additions and 0 deletions.

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 59 additions & 0 deletions ketcher-autotests/tests/test-data/KET/three-bonded-atoms.ket
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"root": {
"nodes": [
{
"$ref": "mol0"
}
]
},
"mol0": {
"type": "molecule",
"atoms": [
{
"label": "Br",
"location": [
15.875000000000002,
-7.375,
0
]
},
{
"label": "N",
"location": [
16.875,
-7.375,
0
]
},
{
"label": "O",
"location": [
17.875,
-7.375,
0
]
}
],
"bonds": [
{
"type": 1,
"atoms": [
0,
1
]
},
{
"type": 1,
"atoms": [
1,
2
]
}
],
"stereoFlagPosition": {
"x": 17.875,
"y": 6.375,
"z": 0
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Ketcher 9262318192D 1 1.00000 0.00000 0

9 8 0 0 0 0 0 0 0 0999 V2000
11.6109 -8.0500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
12.4769 -8.5500 0.0000 Xe 0 0 0 0 0 0 0 0 0 0 0 0
13.3430 -8.0500 0.0000 Ti 0 0 0 0 0 0 0 0 0 0 0 0
14.2090 -8.5500 0.0000 K 0 0 0 0 0 0 0 0 0 0 0 0
15.0750 -8.0500 0.0000 Np 0 0 0 0 0 0 0 0 0 0 0 0
15.9410 -8.5500 0.0000 Ho 0 0 0 0 0 0 0 0 0 0 0 0
16.8071 -8.0500 0.0000 Th 0 0 0 0 0 0 0 0 0 0 0 0
17.6731 -8.5500 0.0000 Mg 0 0 0 0 0 0 0 0 0 0 0 0
18.5391 -8.0500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0
2 3 1 0 0 0
3 4 1 0 0 0
4 5 1 0 0 0
5 6 1 0 0 0
6 7 1 0 0 0
7 8 1 0 0 0
8 9 1 0 0 0
M END
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Ketcher 9262316512D 1 1.00000 0.00000 0

9 8 0 0 0 0 0 0 0 0999 V2000
10.4000 -8.1250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
11.2660 -8.6250 0.0000 Xe 0 0 0 0 0 0 0 0 0 0 0 0
12.1321 -8.1250 0.0000 Ti 0 0 0 0 0 0 0 0 0 0 0 0
12.9981 -8.6250 0.0000 K 0 0 0 0 0 0 0 0 0 0 0 0
13.8641 -8.1250 0.0000 Np 0 0 0 0 0 0 0 0 0 0 0 0
14.7301 -8.6250 0.0000 Ho 0 0 0 0 0 0 0 0 0 0 0 0
15.5962 -8.1250 0.0000 Th 0 0 0 0 0 0 0 0 0 0 0 0
16.4622 -8.6250 0.0000 Mg 0 0 0 0 0 0 0 0 0 0 0 0
17.3282 -8.1250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0
2 3 1 0 0 0
3 4 1 0 0 0
4 5 1 0 0 0
5 6 1 0 0 0
6 7 1 0 0 0
7 8 1 0 0 0
8 9 1 0 0 0
M END
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Ketcher 9262318192D 1 1.00000 0.00000 0

9 8 0 0 0 0 0 0 0 0999 V2000
11.6109 -8.0500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
12.4769 -8.5500 0.0000 G 0 0 0 0 0 0 0 0 0 0 0 0
13.3430 -8.0500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
14.2090 -8.5500 0.0000 GH 0 0 0 0 0 0 0 0 0 0 0 0
15.0750 -8.0500 0.0000 G* 0 0 0 0 0 0 0 0 0 0 0 0
15.9410 -8.5500 0.0000 GH* 0 0 0 0 0 0 0 0 0 0 0 0
16.8071 -8.0500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
17.6731 -8.5500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
18.5391 -8.0500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0
2 3 1 0 0 0
3 4 1 0 0 0
4 5 1 0 0 0
5 6 1 0 0 0
6 7 1 0 0 0
7 8 1 0 0 0
8 9 1 0 0 0
M END
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Ketcher 9262321122D 1 1.00000 0.00000 0

9 8 0 0 0 0 0 0 0 0999 V2000
7.9250 -8.1250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
8.7910 -8.6250 0.0000 G 0 0 0 0 0 0 0 0 0 0 0 0
9.6571 -8.1250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
10.5231 -8.6250 0.0000 GH 0 0 0 0 0 0 0 0 0 0 0 0
11.3891 -8.1250 0.0000 G* 0 0 0 0 0 0 0 0 0 0 0 0
12.2551 -8.6250 0.0000 GH* 0 0 0 0 0 0 0 0 0 0 0 0
13.1212 -8.1250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
13.9872 -8.6250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
14.8532 -8.1250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0
2 3 1 0 0 0
3 4 1 0 0 0
4 5 1 0 0 0
5 6 1 0 0 0
6 7 1 0 0 0
7 8 1 0 0 0
8 9 1 0 0 0
M END
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

Ketcher 9262318192D 1 1.00000 0.00000 0

9 8 0 0 0 0 0 0 0 0999 V2000
11.6109 -8.0500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
12.4769 -8.5500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
13.3430 -8.0500 0.0000 L 0 0 0 0 0 0 0 0 0 0 0 0
14.2090 -8.5500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
15.0750 -8.0500 0.0000 AH 0 0 0 0 0 0 0 0 0 0 0 0
15.9410 -8.5500 0.0000 L 0 0 0 0 0 0 0 0 0 0 0 0
16.8071 -8.0500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
17.6731 -8.5500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
18.5391 -8.0500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0
2 3 1 0 0 0
3 4 1 0 0 0
4 5 1 0 0 0
5 6 1 0 0 0
6 7 1 0 0 0
7 8 1 0 0 0
8 9 1 0 0 0
M ALS 3 3 F W Pb Se
M ALS 6 3 T Pm Pu Ti
M END
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

Ketcher 9262315122D 1 1.00000 0.00000 0

9 8 0 0 0 0 0 0 0 0999 V2000
8.9750 -6.5000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
9.8410 -7.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
10.7071 -6.5000 0.0000 L 0 0 0 0 0 0 0 0 0 0 0 0
11.5731 -7.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
12.4391 -6.5000 0.0000 AH 0 0 0 0 0 0 0 0 0 0 0 0
13.3051 -7.0000 0.0000 L 0 0 0 0 0 0 0 0 0 0 0 0
14.1712 -6.5000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
15.0372 -7.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
15.9032 -6.5000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0
2 3 1 0 0 0
3 4 1 0 0 0
4 5 1 0 0 0
5 6 1 0 0 0
6 7 1 0 0 0
7 8 1 0 0 0
8 9 1 0 0 0
M ALS 3 3 F W Pb Se
M ALS 6 3 T Pm Pu Ti
M END
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
$RXN

-INDIGO- 0926231819

1 1
$MOL

-INDIGO-09262318192D

9 8 0 0 0 0 0 0 0 0999 V2000
5.0234 -8.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
5.8894 -8.5000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
6.7555 -8.0000 0.0000 L 0 0 0 0 0 0 0 0 0 0 0 0
7.6215 -8.5000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
8.4875 -8.0000 0.0000 AH 0 0 0 0 0 0 0 0 0 0 0 0
9.3535 -8.5000 0.0000 L 0 0 0 0 0 0 0 0 0 0 0 0
10.2196 -8.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
11.0856 -8.5000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
11.9516 -8.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0 0
2 3 1 0 0 0 0
3 4 1 0 0 0 0
4 5 1 0 0 0 0
5 6 1 0 0 0 0
6 7 1 0 0 0 0
7 8 1 0 0 0 0
8 9 1 0 0 0 0
M ALS 3 3 F W Pb Se
M ALS 6 3 T Pm Pu Ti
M END
$MOL

-INDIGO-09262318192D

9 8 0 0 0 0 0 0 0 0999 V2000
18.1984 -8.1000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
19.0644 -8.6000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
19.9305 -8.1000 0.0000 L 0 0 0 0 0 0 0 0 0 0 0 0
20.7965 -8.6000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
21.6625 -8.1000 0.0000 AH 0 0 0 0 0 0 0 0 0 0 0 0
22.5285 -8.6000 0.0000 L 0 0 0 0 0 0 0 0 0 0 0 0
23.3946 -8.1000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
24.2606 -8.6000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
25.1266 -8.1000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0 0
2 3 1 0 0 0 0
3 4 1 0 0 0 0
4 5 1 0 0 0 0
5 6 1 0 0 0 0
6 7 1 0 0 0 0
7 8 1 0 0 0 0
8 9 1 0 0 0 0
M ALS 3 3 F W Pb Se
M ALS 6 3 T Pm Pu Ti
M END
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
$RXN

-INDIGO- 0926232053

1 1
$MOL

-INDIGO-09262320532D

9 8 0 0 0 0 0 0 0 0999 V2000
3.2609 -7.8750 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
4.1269 -8.3750 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
4.9930 -7.8750 0.0000 L 0 0 0 0 0 0 0 0 0 0 0 0
5.8590 -8.3750 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
6.7250 -7.8750 0.0000 AH 0 0 0 0 0 0 0 0 0 0 0 0
7.5910 -8.3750 0.0000 L 0 0 0 0 0 0 0 0 0 0 0 0
8.4571 -7.8750 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
9.3231 -8.3750 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
10.1891 -7.8750 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0 0
2 3 1 0 0 0 0
3 4 1 0 0 0 0
4 5 1 0 0 0 0
5 6 1 0 0 0 0
6 7 1 0 0 0 0
7 8 1 0 0 0 0
8 9 1 0 0 0 0
M ALS 3 3 F W Pb Se
M ALS 6 3 T Pm Pu Ti
M END
$MOL

-INDIGO-09262320532D

9 8 0 0 0 0 0 0 0 0999 V2000
16.4359 -7.9750 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
17.3019 -8.4750 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
18.1680 -7.9750 0.0000 L 0 0 0 0 0 0 0 0 0 0 0 0
19.0340 -8.4750 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
19.9000 -7.9750 0.0000 AH 0 0 0 0 0 0 0 0 0 0 0 0
20.7660 -8.4750 0.0000 L 0 0 0 0 0 0 0 0 0 0 0 0
21.6321 -7.9750 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
22.4981 -8.4750 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
23.3641 -7.9750 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0 0
2 3 1 0 0 0 0
3 4 1 0 0 0 0
4 5 1 0 0 0 0
5 6 1 0 0 0 0
6 7 1 0 0 0 0
7 8 1 0 0 0 0
8 9 1 0 0 0 0
M ALS 3 3 F W Pb Se
M ALS 6 3 T Pm Pu Ti
M END
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
$RXN

-INDIGO- 0926231819

1 1
$MOL

-INDIGO-09262318192D

9 8 0 0 0 0 0 0 0 0999 V2000
4.1929 -7.9125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
5.0589 -8.4125 0.0000 Xe 0 0 0 0 0 0 0 0 0 0 0 0
5.9250 -7.9125 0.0000 Ti 0 0 0 0 0 0 0 0 0 0 0 0
6.7910 -8.4125 0.0000 K 0 0 0 0 0 0 0 0 0 0 0 0
7.6570 -7.9125 0.0000 Np 0 0 0 0 0 0 0 0 0 0 0 0
8.5230 -8.4125 0.0000 Ho 0 0 0 0 0 0 0 0 0 0 0 0
9.3891 -7.9125 0.0000 Th 0 0 0 0 0 0 0 0 0 0 0 0
10.2551 -8.4125 0.0000 Mg 0 0 0 0 0 0 0 0 0 0 0 0
11.1211 -7.9125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0 0
2 3 1 0 0 0 0
3 4 1 0 0 0 0
4 5 1 0 0 0 0
5 6 1 0 0 0 0
6 7 1 0 0 0 0
7 8 1 0 0 0 0
8 9 1 0 0 0 0
M END
$MOL

-INDIGO-09262318192D

9 8 0 0 0 0 0 0 0 0999 V2000
19.0289 -8.1875 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
19.8949 -8.6875 0.0000 Xe 0 0 0 0 0 0 0 0 0 0 0 0
20.7609 -8.1875 0.0000 Ti 0 0 0 0 0 0 0 0 0 0 0 0
21.6270 -8.6875 0.0000 K 0 0 0 0 0 0 0 0 0 0 0 0
22.4930 -8.1875 0.0000 Np 0 0 0 0 0 0 0 0 0 0 0 0
23.3590 -8.6875 0.0000 Ho 0 0 0 0 0 0 0 0 0 0 0 0
24.2251 -8.1875 0.0000 Th 0 0 0 0 0 0 0 0 0 0 0 0
25.0911 -8.6875 0.0000 Mg 0 0 0 0 0 0 0 0 0 0 0 0
25.9571 -8.1875 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0 0
2 3 1 0 0 0 0
3 4 1 0 0 0 0
4 5 1 0 0 0 0
5 6 1 0 0 0 0
6 7 1 0 0 0 0
7 8 1 0 0 0 0
8 9 1 0 0 0 0
M END
Loading

0 comments on commit 4cb74d0

Please sign in to comment.