Skip to content

test suite for js/turtledefs.js and js/protoblocks.js#4371

Closed
omsuneri wants to merge 5 commits intosugarlabs:masterfrom
omsuneri:test00
Closed

test suite for js/turtledefs.js and js/protoblocks.js#4371
omsuneri wants to merge 5 commits intosugarlabs:masterfrom
omsuneri:test00

Conversation

@omsuneri
Copy link
Member

@omsuneri omsuneri commented Feb 8, 2025

@walterbender I had created test suite for js/turtledefs.js and js/protoblocks.js
Screenshot 2025-02-09 at 2 30 59 AM

@omsuneri
Copy link
Member Author

omsuneri commented Feb 8, 2025

@walterbender i m stuck and getting the error in two tests of the turtledefs.js
not getting the desired output :(
should i add those in the test file by commenting out as if someone finds the way can make them work as i tried a lot but unable to debug the cause of error
what would you say ??
or should left this test partially completed ??

@walterbender
Copy link
Member

Which specific tests are failing?

@omsuneri
Copy link
Member Author

omsuneri commented Feb 8, 2025

@walterbender these are the tests
Screenshot 2025-02-09 at 2 44 36 AM

@omsuneri
Copy link
Member Author

omsuneri commented Feb 8, 2025

@walterbender i ll try again by force mocking the getMainToolbarButtonNames.... lets keep it draft till then

@walterbender
Copy link
Member

(1) I am not sure that those functions are actually used anywhere. Maybe they are deprecated?
(2) the button names are lower case in the arrays being indexed.
(3) the button names you are testing for are not in the list.

@omsuneri
Copy link
Member Author

omsuneri commented Feb 9, 2025

@walterbender I tried with force mocking and it works well pushing changes soon

adding 2 more test in the test suite
@omsuneri
Copy link
Member Author

omsuneri commented Feb 9, 2025

@walterbender i had added 2 more tests which are earlier failing
Screenshot 2025-02-09 at 5 06 03 PM

@omsuneri omsuneri marked this pull request as ready for review February 9, 2025 11:37
@walterbender
Copy link
Member

Maybe I am missing something, but I don't understand why we need to mock the toolbar arrays. Any why are you testing for button names that don't exist?

@omsuneri
Copy link
Member Author

omsuneri commented Feb 9, 2025

@walterbender do we need more changes in these tests

@omsuneri
Copy link
Member Author

omsuneri commented Feb 9, 2025

@walterbender actually i think i must separate the tutledefs and protoblocks test in two separate PR as
when i go through to the files i found those in exported so i think about creating tests for those too but if you want i can remove them as well what do you think ??
Screenshot 2025-02-10 at 3 10 42 AM

@walterbender
Copy link
Member

Please make separate PRs as I am getting a bit lost in this one.

@omsuneri
Copy link
Member Author

omsuneri commented Feb 9, 2025

@walterbender fine i ll make it now

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