Skip to content

Commit

Permalink
Merge pull request #1650 from jdi-testing/release_3.15
Browse files Browse the repository at this point in the history
Release 3.15 with Hotfix 1644
  • Loading branch information
Iogsotot committed Feb 9, 2024
2 parents 8f18643 + 06216d6 commit 0e1048d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "JDN",
"description": "JDN – helps Test Automation Engineer to create Page Objects in the test automation framework and speed up test development",
"devtools_page": "index.html",
"version": "3.15.0",
"version": "3.15.1",
"icons": {
"128": "icon128.png"
},
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jdn-ai-chrome-extension",
"version": "3.15.0",
"version": "3.15.1",
"description": "jdn-ai chrome extension",
"scripts": {
"start": "webpack --watch --env devenv",
Expand Down
2 changes: 1 addition & 1 deletion src/app/utils/compatibleVersions.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const compatibleMajorVer = 0;
export const compatibleMinorVer = 2;
export const compatibleBuildVer = 41;
export const compatibleBuildVer = 62;
11 changes: 5 additions & 6 deletions src/features/locators/components/LocatorsTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { selectCurrentPageObject } from '../../pageObjects/selectors/pageObjects
import { selectPresentLocatorsByPO } from '../selectors/locatorsByPO.selectors';
import { selectFilteredLocators } from '../selectors/locatorsFiltered.selectors';
import { isLocatorListPage } from '../../../app/utils/helpers';
import type RcTree from 'rc-tree';

export enum SearchState {
None = 'none',
Expand Down Expand Up @@ -52,7 +53,7 @@ export const LocatorsTree: React.FC<LocatorTreeProps> = ({ locatorIds, viewProps
const [autoExpandParent, setAutoExpandParent] = useState(true);

const containerRef = useRef<HTMLDivElement>(null);
const treeRef = useRef(null);
const treeRef = useRef<RcTree>(null);

const containerHeight = useSize(containerRef)?.height;

Expand Down Expand Up @@ -152,12 +153,9 @@ export const LocatorsTree: React.FC<LocatorTreeProps> = ({ locatorIds, viewProps
if (scrollToLocator) {
setTimeout(() => {
// antd docs for scrollTo https://github.com/ant-design/ant-design/blob/master/components/tree/index.en-US.md#tree-methods
treeRef.current &&
containerHeight &&
// bug in ant's typings, impossible to create correct ref type
// eslint-disable-next-line
// @ts-ignore
if (treeRef.current && containerHeight) {
treeRef.current.scrollTo({ key: scrollToLocator, align: 'top', offset: containerHeight / 2 });
}
}, 500);
}
}, [expandedKeys]);
Expand All @@ -173,6 +171,7 @@ export const LocatorsTree: React.FC<LocatorTreeProps> = ({ locatorIds, viewProps
{...{ expandedKeys, onExpand, autoExpandParent }}
switcherIcon={<CaretDown color="#878A9C" size={14} />}
treeData={treeNodes}
height={containerHeight || 0} // necessary for scrollTo works
style={{ height: 'inherit' }}
/>
</div>
Expand Down

0 comments on commit 0e1048d

Please sign in to comment.