Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect click emulation on monaco code editor #1385

Closed
kirovboris opened this issue Apr 10, 2017 · 9 comments
Closed

Incorrect click emulation on monaco code editor #1385

kirovboris opened this issue Apr 10, 2017 · 9 comments
Labels
AREA: client BROWSER: Chrome STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: automations TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@kirovboris
Copy link
Collaborator

Are you requesting a feature or reporting a bug?

bug

What is the current behavior?

TestCafe doesn't set the cursor position in monaco editor at during click action.

Provide the test code and the tested page URL (if applicable)

import { Selector } from 'testcafe';

fixture `Monaco test`.page('https://microsoft.github.io/monaco-editor/playground.html');

test('Set cursor position', async t => {
	const seventhLine = Selector('.monaco-editor .view-line').nth(7);
		
	await t.click(seventhLine, { offsetX: 10, offsetY: 5 });
	
	const cursor = Selector('.cursors-layer .cursor');	
	
	await t
		.expect(cursor.getAttribute('linenumber')).eql(7)
		.expect(cursor.getAttribute('column')).eql(1)
});

Specify your

  • operating system: win 7
  • testcafe version: 0.14.0
  • node.js version: 6.5.0
@AlexanderMoskovkin
Copy link
Contributor

I'm working on this

@AlexanderMoskovkin
Copy link
Contributor

Waiting for DevExpress/testcafe-hammerhead#1084

@AlexanderMoskovkin
Copy link
Contributor

It's fixed after Hammerhead is updated to v10.6.5 (#1414). I'll close the issue when I add a functional test

@TestAndunR
Copy link

Hello,
Does typeText() method works for monaco code editor in a web application

@AndreyBelym
Copy link
Contributor

@TestAndunR, yes, it works. Do you have a page which has a problem with typeText?

@TestAndunR
Copy link

Hi @AndreyBelym ,
Yes I'm working with an online IDE. And followig is the code i used. typeText() method did not worked in this scenario

fixture`Login and Creating a new Project`



.page`https://sigma.slappforge.com`

test('write on monaco editor',async t=> {
    const resourceElement = await Selector('.mtk1').withText("event").with({ visibilityCheck: true })();
    await t
        .typeText(Selector('input[name=email]'), 'username')
        .typeText(Selector('input[name=password]'), 'password')
        .click(Selector('button[type=button]'))
        .typeText(Selector('input[name=projectName]'), "TestCafeProject")
        .click(Selector('button[type=button]'))
        .wait(5000)
        .click(Selector('.view-line').nth(3))
        .typeText(Selector('.view-line').nth(3),"asas");
})```

@AndreyBelym
Copy link
Contributor

@TestAndunR, thanks for the test, I'll check it.

@TestAndunR
Copy link

@AndreyBelym Thank you 👍

@lock
Copy link

lock bot commented Mar 28, 2019

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Mar 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 28, 2019
kirovboris pushed a commit to kirovboris/testcafe-phoenix that referenced this issue Dec 18, 2019
…oses DevExpress#1385) (DevExpress#1429)

* Add test for caretRangeFromPoint and caretPositionFromPoint usage (closes DevExpress#1385)

* Fix linting
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AREA: client BROWSER: Chrome STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: automations TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

4 participants