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

Region captures can't capture the whole screen #45

Closed
s1hofmann opened this issue Jan 21, 2021 · 0 comments · Fixed by #46
Closed

Region captures can't capture the whole screen #45

s1hofmann opened this issue Jan 21, 2021 · 0 comments · Fixed by #46
Labels
bug Something isn't working

Comments

@s1hofmann
Copy link
Member

Version
2.1.0

Short overview
Due to an off by one error it's impossible to capture the whole screen when specifying a region.

Steps to reproduce error

describe("Capture", () => {
  it("fullScreen capture", () => {
    // GIVEN
    const screenSize = libnut.getScreenSize()

    // WHEN
    const capture = () => libnut.screen.capture(0, 0, screenSize.width, screenSize.height);

    // THEN
    expect(capture).not.toThrowError("Error: Given width exceeds display dimensions");
  });
});
@s1hofmann s1hofmann added the bug Something isn't working label Jan 21, 2021
@s1hofmann s1hofmann linked a pull request Jan 23, 2021 that will close this issue
s1hofmann added a commit that referenced this issue Feb 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant