Skip to content

test(ui-source-code-editor): migrate old SourceCodeEditor tests#1943

Merged
git-nandor merged 1 commit intomasterfrom
INSTUI-4505_convert_ui-source-code-editor_to_the_new_test_format
Apr 29, 2025
Merged

test(ui-source-code-editor): migrate old SourceCodeEditor tests#1943
git-nandor merged 1 commit intomasterfrom
INSTUI-4505_convert_ui-source-code-editor_to_the_new_test_format

Conversation

@git-nandor
Copy link
Contributor

No description provided.

@git-nandor git-nandor self-assigned this Apr 16, 2025
@github-actions
Copy link

github-actions bot commented Apr 16, 2025

PR Preview Action v1.6.1
Preview removed because the pull request was closed.
2025-04-29 08:57 UTC

@git-nandor git-nandor requested review from ToMESSKa and balzss April 16, 2025 12:59

expect(allGutterElements[1]).toHaveClass('cm-activeLineGutter')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the old test checks allGutterElements[0] instead if 1, but I'm not sure it's important

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first gutter element is always a hidden element.
With the old Karma tests, the selector worked differently.

Comment on lines -338 to -345

it('should not wrap lines by default', async () => {
await mount(<SourceCodeEditor label="foo" defaultValue={longText} />)
const editor = await SourceCodeEditorLocator.find()
const scroller = await editor.findScroller()
const { scrollWidth, clientWidth } = scroller.getDOMNode()

expect(scrollWidth > clientWidth).to.be.true()
})
Copy link
Contributor

@ToMESSKa ToMESSKa Apr 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot find new version of this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has been moved under the Cypress tests, combining the two cases: wrap and no wrap
it('should wrap lines when lineWrapping is true'

@git-nandor git-nandor force-pushed the INSTUI-4505_convert_ui-source-code-editor_to_the_new_test_format branch from 05920e5 to ad6ad8d Compare April 24, 2025 08:26
@git-nandor git-nandor requested a review from ToMESSKa April 24, 2025 12:55
@git-nandor git-nandor merged commit 6101ea6 into master Apr 29, 2025
11 checks passed
@git-nandor git-nandor deleted the INSTUI-4505_convert_ui-source-code-editor_to_the_new_test_format branch April 29, 2025 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments