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

More tests for index page #14

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

More tests for index page #14

wants to merge 1 commit into from

Conversation

catcatchong
Copy link
Collaborator

@catcatchong catcatchong commented Jun 24, 2022

This PR is intended to add more tests for the index page.

@catcatchong catcatchong requested a review from thislight June 24, 2022 14:28
@github-actions
Copy link

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
./dist/assets/Button.349d821a.js, ./dist/assets/CardActions.d0feed90.js, ./dist/assets/IconButton.b5ef68aa.js, ./dist/assets/Popover.7a090c08.js, ./dist/assets/TextField.72761cf7.js, ./dist/assets/getDeviceId.e8f3946a.js, ./dist/assets/index.1f3398b3.js, ./dist/assets/index.29d632d5.js, ./dist/assets/index.2b474bb8.js, ./dist/assets/index.2ed1ce5d.js, ./dist/assets/index.4662220c.js, ./dist/assets/index.4794b167.js, ./dist/assets/index.655f37a5.js, ./dist/assets/index.9328f956.js, ./dist/assets/index.9e1babc5.js, ./dist/assets/index.bbe60921.js, ./dist/assets/isHostComponent.9ebad583.js, ./dist/assets/solid.d27caad2.js 0 B (-100% 🔽) 0 ms (-100% 🔽) 0 ms (-100% 🔽) 0 ms
./dist/assets/Button.a6e1343b.js, ./dist/assets/CardActions.8f7d9256.js, ./dist/assets/IconButton.86a5746b.js, ./dist/assets/Popover.d6863746.js, ./dist/assets/TextField.dae92380.js, ./dist/assets/getDeviceId.e8f3946a.js, ./dist/assets/index.2c2b8370.js, ./dist/assets/index.2c7035e5.js, ./dist/assets/index.50065cc8.js, ./dist/assets/index.50f6b1c3.js, ./dist/assets/index.53296cf6.js, ./dist/assets/index.55cd3c10.js, ./dist/assets/index.8613e5e6.js, ./dist/assets/index.9c53241f.js, ./dist/assets/index.eb352346.js, ./dist/assets/index.f95d4ac7.js, ./dist/assets/isHostComponent.9ebad583.js, ./dist/assets/solid.dff0da03.js 119.1 KB (+100% 🔺) 2.4 s (+100% 🔺) 4.5 s (+100% 🔺) 6.9 s

@cypress
Copy link

cypress bot commented Jun 24, 2022



Test summary

4 1 0 0


Run details

Project Magicboard
Status Failed
Commit af430ec ℹ️
Started Jun 24, 2022 3:03 PM
Ended Jun 24, 2022 3:06 PM
Duration 02:15 💡
OS Linux Ubuntu - 20.04
Browser Electron 100

View run in Cypress Dashboard ➡️


Failures

cypress/e2e/index.cy.ts Failed
1 the index page > the signing out button > click and jump to the login page

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@catcatchong catcatchong modified the milestone: 0.1.0-rc Jun 24, 2022
@thislight
Copy link
Contributor

@catcatchong The functional testing is still failed, please fix it before requesting another review.

Copy link
Contributor

@thislight thislight left a comment

Choose a reason for hiding this comment

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

I did ask for a change in testing. It's better if you can use aria- tags to identify the elements.

beforeEach(() => {
cy.resetLogin();
cy.login("TEST_USER_1");
cy.visit("/");
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should wait for the page loading after visiting.

@@ -72,6 +72,7 @@ const UserInfoAvatarButton: Component = () => {//头像组件
return (
<>
<IconButton
id="user-info-avatar-button"
Copy link
Contributor

Choose a reason for hiding this comment

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

I can accept using id for testing, but it's better to use aria- tags to identify the elements.

I found a related issue from testing-library/react-testing-library: testing-library/react-testing-library#16.

@@ -101,7 +102,7 @@ const UserInfoAvatarButton: Component = () => {//头像组件
</CardContent >
<Divider />
<CardActions sx={{ justifyContent: "end" }}>
<Button sx={{padding: "8px"}} color="error" variant="text" size="small" onClick={userSignOut}>
<Button id="sign-out-button" sx={{padding: "8px"}} color="error" variant="text" size="small" onClick={userSignOut}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as L75 in the incoming change: it's better to use aria- tags.

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