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

Test that select tool GRS works with only one anchor #2502

Merged

Conversation

rahat2134
Copy link
Contributor

Fix a part of #2465

@rahat2134
Copy link
Contributor Author

@0HyperCube Please have a look!

@rahat2134 rahat2134 changed the title Test to check everything works fine with only one anchor Added Tests to check everything works fine with only one anchor Mar 30, 2025
@rahat2134 rahat2134 requested a review from 0HyperCube April 2, 2025 04:51
@rahat2134
Copy link
Contributor Author

@0HyperCube PTAL, If now everything is fine or not?

async fn test_grs_single_anchor() {
let mut editor = EditorTestUtils::create();
editor.new_document().await;
editor.drag_tool(ToolType::Rectangle, 100., 100., 200., 200., ModifierKeys::empty()).await;
Copy link
Member

Choose a reason for hiding this comment

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

Since you've created a rectangle, this will have 4 points already.

You can create an empty layer with no points using DocumentMessage::CreateEmptyFolder (a folder is the same as a layer).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yeah right!

Just pushing the changes! Thanks for this - DocumentMessage::CreateEmptyFolder

@rahat2134 rahat2134 requested a review from 0HyperCube April 2, 2025 18:32
Copy link
Member

@0HyperCube 0HyperCube left a comment

Choose a reason for hiding this comment

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

Thanks for adding this test.

@0HyperCube 0HyperCube merged commit 6de235f into GraphiteEditor:master Apr 2, 2025
4 checks passed
@Keavon Keavon changed the title Added Tests to check everything works fine with only one anchor Add tests to check everything works fine with only one anchor Apr 2, 2025
@Keavon Keavon changed the title Add tests to check everything works fine with only one anchor Test that select tool GRS works with only one anchor Apr 2, 2025
@Keavon Keavon mentioned this pull request Apr 12, 2025
7 tasks
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.

2 participants