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

refactor(server): e2e #7265

Merged
merged 3 commits into from Feb 21, 2024
Merged

refactor(server): e2e #7265

merged 3 commits into from Feb 21, 2024

Conversation

jrasm91
Copy link
Contributor

@jrasm91 jrasm91 commented Feb 20, 2024

Man, the person e2e tests are rough. There's not enough functionality exposed through the API at the moment.

Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0d48139
Status: ✅  Deploy successful!
Preview URL: https://c548b763.immich.pages.dev
Branch Preview URL: https://refactor-server-e2e.immich.pages.dev

View logs

Copy link
Member

@danieldietzler danieldietzler left a comment

Choose a reason for hiding this comment

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

Nice! 🎉

type: ReactionType.LIKE,
});
const { status, body } = await request(server)
const [reaction] = await Promise.all([
Copy link
Member

Choose a reason for hiding this comment

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

What's the reason for the promise.all here and a few lines below? Future-proofing?


expect(status).toBe(200);
expect(body).toEqual({
total: 2,
Copy link
Member

Choose a reason for hiding this comment

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

Why is that total 2?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The response has total: number and items: Person[] or something like that. This returns both people.

Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it only return the visible person?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Idk. Maybe the test case is mislabelled now. I just copied it is as.

@jrasm91 jrasm91 merged commit f798e03 into main Feb 21, 2024
25 of 26 checks passed
@jrasm91 jrasm91 deleted the refactor/server-e2e branch February 21, 2024 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants