Skip to content

Commit

Permalink
#3129 – fixed failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitvex committed Sep 25, 2023
1 parent 2628b64 commit 69396f5
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 11 deletions.
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.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@ import {
clickInTheMiddleOfTheScreen,
takeEditorScreenshot,
STRUCTURE_LIBRARY_BUTTON_NAME,
waitForPageInit,
} from '@utils';

test.describe('Open Ketcher', () => {
test.describe('Salts and Solvents replacement', () => {
test.beforeEach(async ({ page }) => {
await page.goto('');
await waitForPageInit(page);
});

test.afterEach(async ({ page }) => {
await takeEditorScreenshot(page);
});

test('Verify if the new Salt or Solvent is replacing old one', async ({
Expand All @@ -31,7 +36,6 @@ Test case: EPMLSOPKET-12972 - 'Check that new Salt or Solvent is replacing the p
await page.getByRole('tab', { name: 'Salts and Solvents' }).click();
await selectSaltsAndSolvents(SaltsAndSolvents.AceticAcid, page);
await clickInTheMiddleOfTheScreen(page);
await takeEditorScreenshot(page);
});

test('Verify if Methan Sulphonic Acid replace the Nitrogen atom', async ({
Expand Down
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.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
$RXN

-INDIGO- 0918230300
-INDIGO- 0925231455

1 1
$MOL

-INDIGO-09182303002D
-INDIGO-09252314552D

11 10 0 0 0 0 0 0 0 0999 V2000
10.7449 -8.0500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
Expand All @@ -32,7 +32,7 @@ $MOL
M END
$MOL

-INDIGO-09182303002D
-INDIGO-09252314552D

6 6 0 0 0 0 0 0 0 0999 V2000
17.9598 -11.5501 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ const Select = ({
className={clsx({
[`dropdown-${formName}_${name}`]: formName,
})}
data-testid={`${option.label}-option`}
>
{option.label}
</MenuItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,15 @@ function Field(props) {
const desc = rest.schema || schema.properties[name];
const { dataError, ...fieldOpts } = stateStore.field(name, onChange);
const Component = component;
console.log(Component, rest);
const formField = component ? (
<Component name={name} schema={desc} {...fieldOpts} {...rest} />
<Component
name={name}
schema={desc}
className={className}
{...fieldOpts}
{...rest}
/>
) : (
<Input
name={name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ class SaveDialog extends Component {
this.saveSchema.properties.format,
)}
component={Select}
className="file-format-list"
/>
</Form>
<Tabs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Object {
</span>
</label>
<label
class=""
class="file-format-list"
>
<span>
File format:
Expand All @@ -68,7 +68,7 @@ Object {
class="inputWrapper"
>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary Mui-focused selectContainer css-1yk1gt9-MuiInputBase-root-MuiOutlinedInput-root-MuiSelect-root"
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary Mui-focused selectContainer file-format-list css-1yk1gt9-MuiInputBase-root-MuiOutlinedInput-root-MuiSelect-root"
>
<div
aria-expanded="true"
Expand Down Expand Up @@ -189,6 +189,7 @@ Object {
<li
aria-selected="false"
class="MuiButtonBase-root MuiMenuItem-root MuiMenuItem-gutters MuiMenuItem-root MuiMenuItem-gutters css-kk1bwy-MuiButtonBase-root-MuiMenuItem-root"
data-testid="Ket Format-option"
data-value="ket"
role="option"
tabindex="-1"
Expand All @@ -198,6 +199,7 @@ Object {
<li
aria-selected="true"
class="MuiButtonBase-root MuiMenuItem-root MuiMenuItem-gutters Mui-selected MuiMenuItem-root MuiMenuItem-gutters Mui-selected css-kk1bwy-MuiButtonBase-root-MuiMenuItem-root"
data-testid="MDL Molfile V2000-option"
data-value="mol"
role="option"
tabindex="0"
Expand All @@ -207,6 +209,7 @@ Object {
<li
aria-selected="false"
class="MuiButtonBase-root MuiMenuItem-root MuiMenuItem-gutters MuiMenuItem-root MuiMenuItem-gutters css-kk1bwy-MuiButtonBase-root-MuiMenuItem-root"
data-testid="MDL Molfile V3000-option"
data-value="molV3000"
role="option"
tabindex="-1"
Expand All @@ -216,6 +219,7 @@ Object {
<li
aria-selected="false"
class="MuiButtonBase-root MuiMenuItem-root MuiMenuItem-gutters MuiMenuItem-root MuiMenuItem-gutters css-kk1bwy-MuiButtonBase-root-MuiMenuItem-root"
data-testid="SDF V2000-option"
data-value="sdf"
role="option"
tabindex="-1"
Expand All @@ -225,6 +229,7 @@ Object {
<li
aria-selected="false"
class="MuiButtonBase-root MuiMenuItem-root MuiMenuItem-gutters MuiMenuItem-root MuiMenuItem-gutters css-kk1bwy-MuiButtonBase-root-MuiMenuItem-root"
data-testid="SDF V3000-option"
data-value="sdfV3000"
role="option"
tabindex="-1"
Expand All @@ -234,6 +239,7 @@ Object {
<li
aria-selected="false"
class="MuiButtonBase-root MuiMenuItem-root MuiMenuItem-gutters MuiMenuItem-root MuiMenuItem-gutters css-kk1bwy-MuiButtonBase-root-MuiMenuItem-root"
data-testid="Daylight SMARTS-option"
data-value="smarts"
role="option"
tabindex="-1"
Expand All @@ -243,6 +249,7 @@ Object {
<li
aria-selected="false"
class="MuiButtonBase-root MuiMenuItem-root MuiMenuItem-gutters MuiMenuItem-root MuiMenuItem-gutters css-kk1bwy-MuiButtonBase-root-MuiMenuItem-root"
data-testid="Daylight SMILES-option"
data-value="smiles"
role="option"
tabindex="-1"
Expand All @@ -252,6 +259,7 @@ Object {
<li
aria-selected="false"
class="MuiButtonBase-root MuiMenuItem-root MuiMenuItem-gutters MuiMenuItem-root MuiMenuItem-gutters css-kk1bwy-MuiButtonBase-root-MuiMenuItem-root"
data-testid="Extended SMILES-option"
data-value="smilesExt"
role="option"
tabindex="-1"
Expand All @@ -261,6 +269,7 @@ Object {
<li
aria-selected="false"
class="MuiButtonBase-root MuiMenuItem-root MuiMenuItem-gutters MuiMenuItem-root MuiMenuItem-gutters css-kk1bwy-MuiButtonBase-root-MuiMenuItem-root"
data-testid="CML-option"
data-value="cml"
role="option"
tabindex="-1"
Expand All @@ -275,6 +284,7 @@ Object {
<li
aria-selected="false"
class="MuiButtonBase-root MuiMenuItem-root MuiMenuItem-gutters MuiMenuItem-root MuiMenuItem-gutters css-kk1bwy-MuiButtonBase-root-MuiMenuItem-root"
data-testid="InChI-option"
data-value="inChI"
role="option"
tabindex="-1"
Expand All @@ -284,6 +294,7 @@ Object {
<li
aria-selected="false"
class="MuiButtonBase-root MuiMenuItem-root MuiMenuItem-gutters MuiMenuItem-root MuiMenuItem-gutters css-kk1bwy-MuiButtonBase-root-MuiMenuItem-root"
data-testid="InChI AuxInfo-option"
data-value="inChIAuxInfo"
role="option"
tabindex="-1"
Expand All @@ -293,6 +304,7 @@ Object {
<li
aria-selected="false"
class="MuiButtonBase-root MuiMenuItem-root MuiMenuItem-gutters MuiMenuItem-root MuiMenuItem-gutters css-kk1bwy-MuiButtonBase-root-MuiMenuItem-root"
data-testid="InChIKey-option"
data-value="inChIKey"
role="option"
tabindex="-1"
Expand All @@ -307,6 +319,7 @@ Object {
<li
aria-selected="false"
class="MuiButtonBase-root MuiMenuItem-root MuiMenuItem-gutters MuiMenuItem-root MuiMenuItem-gutters css-kk1bwy-MuiButtonBase-root-MuiMenuItem-root"
data-testid="SVG Document-option"
data-value="svg"
role="option"
tabindex="-1"
Expand All @@ -316,6 +329,7 @@ Object {
<li
aria-selected="false"
class="MuiButtonBase-root MuiMenuItem-root MuiMenuItem-gutters MuiMenuItem-root MuiMenuItem-gutters css-kk1bwy-MuiButtonBase-root-MuiMenuItem-root"
data-testid="PNG Image-option"
data-value="png"
role="option"
tabindex="-1"
Expand All @@ -325,6 +339,7 @@ Object {
<li
aria-selected="false"
class="MuiButtonBase-root MuiMenuItem-root MuiMenuItem-gutters MuiMenuItem-root MuiMenuItem-gutters css-kk1bwy-MuiButtonBase-root-MuiMenuItem-root"
data-testid="CDXML-option"
data-value="cdxml"
role="option"
tabindex="-1"
Expand All @@ -334,6 +349,7 @@ Object {
<li
aria-selected="false"
class="MuiButtonBase-root MuiMenuItem-root MuiMenuItem-gutters MuiMenuItem-root MuiMenuItem-gutters css-kk1bwy-MuiButtonBase-root-MuiMenuItem-root"
data-testid="Base64 CDX-option"
data-value="cdx"
role="option"
tabindex="-1"
Expand All @@ -343,6 +359,7 @@ Object {
<li
aria-selected="false"
class="MuiButtonBase-root MuiMenuItem-root MuiMenuItem-gutters MuiMenuItem-root MuiMenuItem-gutters css-kk1bwy-MuiButtonBase-root-MuiMenuItem-root"
data-testid="CDX-option"
data-value="binaryCdx"
role="option"
tabindex="-1"
Expand Down Expand Up @@ -410,7 +427,7 @@ Object {
</span>
</label>
<label
class=""
class="file-format-list"
>
<span>
File format:
Expand All @@ -419,7 +436,7 @@ Object {
class="inputWrapper"
>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary Mui-focused selectContainer css-1yk1gt9-MuiInputBase-root-MuiOutlinedInput-root-MuiSelect-root"
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary Mui-focused selectContainer file-format-list css-1yk1gt9-MuiInputBase-root-MuiOutlinedInput-root-MuiSelect-root"
>
<div
aria-expanded="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ export const FileControls = ({
iconName="open"
shortcut={shortcuts.open}
isHidden={hiddenButtons.includes('open')}
testId="open-file-button"
/>
<TopToolbarIconButton
title="Save as..."
onClick={onSave}
iconName="save"
shortcut={shortcuts.save}
isHidden={hiddenButtons.includes('save')}
testId="save-file-button"
/>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export const TopToolbar = ({
iconName="clear"
shortcut={shortcuts.clear}
isHidden={hiddenButtons.includes('clear')}
testId="clear-canvas-button"
/>
<FileControls
onFileOpen={onFileOpen}
Expand Down

0 comments on commit 69396f5

Please sign in to comment.