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

Testsuite - app and computer APIs #1253

Merged

Conversation

Sadaf-A
Copy link
Contributor

@Sadaf-A Sadaf-A commented May 16, 2024

Description

This PR adds additional testcases for app API and computer API for better coverage

Changes proposed

Following testcases have been added

app API

exit()

  • throws an error for invalid exit codes

getConfig()

  • JSON object contains the right fields

broadcast()

  • throws an error for an invalid event name
  • broadcasts an event with no listeners registered
  • handles high load by broadcasting multiple events rapidly
  • triggers all registered listeners when broadcasting an event
  • handles errors in listeners gracefully
  • executes listeners in the order they were added

computer API

getMemoryInfo()

  • returns consistent and valid memory info

getArch()

  • returns a supported architecture

getMousePosition()

  • returns the current mouse cursor position and it is within the screen bounds

How to test it

  • Run specs/tests

Next steps

None.

Deploy notes

None.

@Sadaf-A Sadaf-A changed the title GSoC24: Testsuite - app and computer APIs Testsuite - app and computer APIs May 18, 2024
spec/app.spec.js Outdated Show resolved Hide resolved
Copy link
Member

@shalithasuranga shalithasuranga 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 sending this @Sadaf-A. This looks great. I've added some comments. We can merge this once we resolve them 🎉

@Sadaf-A
Copy link
Contributor Author

Sadaf-A commented May 21, 2024

Thanks for sending this @Sadaf-A. This looks great. I've added some comments. We can merge this once we resolve them 🎉

Sure, I'll try to resolve them as soon as possible

Copy link
Member

@shalithasuranga shalithasuranga left a comment

Choose a reason for hiding this comment

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

Now, there is only one comment. We can merge this PR as soon as that comment gets resolved. Thanks 🎉

@Sadaf-A
Copy link
Contributor Author

Sadaf-A commented May 22, 2024

Now, there is only one comment. We can merge this PR as soon as that comment gets resolved. Thanks 🎉

Hey, I have resolved the last comment
Thank You

Copy link
Member

@shalithasuranga shalithasuranga left a comment

Choose a reason for hiding this comment

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

Thanks, looks great 🎉

@shalithasuranga shalithasuranga merged commit 97c64ab into neutralinojs:main May 22, 2024
6 of 7 checks passed
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.

None yet

2 participants