Skip to content

test: fix the test of toolabar and the planet#4490

Merged
walterbender merged 3 commits intosugarlabs:masterfrom
apsinghdev:test/fix
May 2, 2025
Merged

test: fix the test of toolabar and the planet#4490
walterbender merged 3 commits intosugarlabs:masterfrom
apsinghdev:test/fix

Conversation

@apsinghdev
Copy link
Contributor

fixes: #4489

This PR fixes the tests related to the toolbar and the planet.

Screenshot 2025-03-04 at 3 48 15 PM

@walterbender Please have a look.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2025

✅ All Jest tests passed! This PR is ready to merge.

@BeNikk
Copy link
Contributor

BeNikk commented Mar 4, 2025

Thank you for looking into this Ajeet, were the tests broken due to some recent PRs? Earlier all tests ran fine.

@apsinghdev
Copy link
Contributor Author

@BeNikk Actually, I don't know which commit introduced this. I ran the tests and found it failing.

@walterbender
Copy link
Member

Since the Planet had been down, I am not sure this test would ever have run properly. Now that the Planet is back up, we can sort things out.

@apsinghdev
Copy link
Contributor Author

@walterbender Actually, this issue is related only to the frontend, i.e., the icon, text, etc., and is independent of the functionality of the planet.

@BeNikk
Copy link
Contributor

BeNikk commented Mar 4, 2025

@walterbender @apsinghdev Actually when i wrote this test for planet, it was redirecting the user to planet page by the click of the icon and ensuring whether the page exist or not.

@apsinghdev
Copy link
Contributor Author

@BeNikk If you run it now, it breaks. Try to run the cypress test and let me know if it breaks to your side or not?

@BeNikk
Copy link
Contributor

BeNikk commented Mar 4, 2025

On the latest pull, all the tests were running fine on my end, Strange!
Are the tests failing on your system too @walterbender ?
Screenshot from 2025-03-04 19-56-11

@walterbender
Copy link
Member

The tests pass on my system.

@apsinghdev
Copy link
Contributor Author

@walterbender @BeNikk Can you please confirm that I am running it the same way as you do?

Screen.Recording.2025-03-04.at.9.23.49.PM.mov

@BeNikk
Copy link
Contributor

BeNikk commented Mar 4, 2025

I think you have not started your server in the background as the tests were skipped, MB should be running locally before running these tests

@walterbender
Copy link
Member

When I run npm run cypress:run, the local server is launched as part of the process.

@BeNikk
Copy link
Contributor

BeNikk commented Mar 4, 2025

I am not sure of this, when i don't start the server i get result something similar to what ajeet sees

@apsinghdev
Copy link
Contributor Author

@BeNikk Still the same result.

testss.mp4

@apsinghdev
Copy link
Contributor Author

When I run npm run cypress:run, the local server is launched as part of the process.

Have you checked the terminal after that process?

@bhangbh
Copy link

bhangbh commented Mar 4, 2025

@apsinghdev I think loading time in different operating systems and browsers might differ slightly and because of that tests are failing, what do you think, I'm using an ubuntu machine

@apsinghdev
Copy link
Contributor Author

@apsinghdev I think loading time in different operating systems and browsers might differ slightly and because of that tests are failing, what do you think, I'm using an ubuntu machine

I am using mac and it's dev env is pretty much the same as ubuntu as it's based on Unix. Also we are using a chromium image for testing that is the same on each machine ig.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@apsinghdev
Copy link
Contributor Author

Screenshot 2025-03-21 at 10 12 03 PM

@walterbender All the cypress tests are passing. Please take a look.

@walterbender
Copy link
Member

Still a few minor linting issues here.

@apsinghdev
Copy link
Contributor Author

@walterbender fixed a conflict. please have a look again!

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

});

cy.window().then((win) => {
win.document.getElementById("planet-iframe").style.display = 'block';
Copy link
Member

Choose a reason for hiding this comment

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

Could you please use double quotes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed it. please take a look.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Contributor

github-actions bot commented May 1, 2025

✅ All Jest tests passed! This PR is ready to merge.

@apsinghdev
Copy link
Contributor Author

@walterbender Please take a look at this. I guess it's ready.

@walterbender walterbender merged commit 24d635b into sugarlabs:master May 2, 2025
5 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.

Toolbar and planet tests are failing in cypress testing

4 participants