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

feat: cypress testing #17

Merged
merged 12 commits into from
Feb 28, 2024
Merged

Conversation

gentlementlegen
Copy link
Member

Resolves #14

@ubiquity-os-deployer
Copy link

ubiquity-os-deployer bot commented Feb 26, 2024

@gentlementlegen gentlementlegen marked this pull request as ready for review February 26, 2024 12:02
@0x4007
Copy link
Member

0x4007 commented Feb 26, 2024

You have some conflicts

# Conflicts:
#	.env.example
#	.github/workflows/build.yml
#	.github/workflows/cloudflare-deploy.yml
Copy link
Member

@0x4007 0x4007 left a comment

Choose a reason for hiding this comment

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

Cool stuff. Reviewed from my phone.

let issue1: Record<string, unknown>;
let issue2: Record<string, unknown>;
let loginToken: Record<string, unknown>;
let githubUser: Record<string, unknown>;
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Can do. I didn't bother because they are populated from a string, so type checking is not relevant as I don't manipulate them. Will change it

});

it("User can log in", () => {
cy.intercept("https://api.github.com/repos/*/*/issues**", (req) => {
Copy link
Member

Choose a reason for hiding this comment

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

If you are intercepting everything doesn't that kill the point of the test? Why don't we do real end-to-end tests? What if Supabase is broken and we can't oauth etc

Copy link
Member Author

Choose a reason for hiding this comment

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

Since we don't develop the other end (eg the backend) I didn't think it was relevant to test it. If GitHub backend breaks there is nothing we can do. The proper way to handle that would be to have BE error test cases, and to have a health check running on the production instance.

Copy link
Member

Choose a reason for hiding this comment

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

Okay sounds smart I'm in. You can file some issues for this with sufficient details so we can get around to it?

Copy link
Member Author

Choose a reason for hiding this comment

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

You mean an issue mentioning the creation of e2e testing with the real endpoint correct?

Copy link
Member

Choose a reason for hiding this comment

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

The proper way as you say

@0x4007 0x4007 merged commit 268c566 into ubiquity:development Feb 28, 2024
2 checks passed
@0x4007
Copy link
Member

0x4007 commented Feb 28, 2024

Just be sure to handle the unresolved comments @FernandVEYRIER

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.

Stale data is displayed without a full cache clean
2 participants