Closed YuraPetrovskyi closed 1 month ago
Visit the deploys page to approve it
Name | Link |
---|---|
Latest commit | 0af188ced229da21ecc254570d641ff63374decc |
Hi @YuraPetrovskyi could you run npx cypress open
on your branch and check what's causing a fail in one of our authorisation tests? The workflow is flagging it
closes #260
Hi @camelPhonso . I fail the new user authorization test. Incidentally, I cannot register a new user, and I use previously created users. When trying to create a new user, I do not receive a confirmation email. A user is created in the database, but it is impossible to log in later under this name. Not sure if my code changes have any effect on this. I must say that I made some corrections in supabaseTypes.ts ( I changed id: String to id: string, email: String to email: string ), but I checked where they are used and I think my changes do not change the logic of the program. What should my next steps be, what do you recommend? I can roll back the changes regarding supabaseTypes.ts and make the appropriate changes in my code, what do you say? (I have already tried different options, it does not affect authorization)
Hi @camelPhonso . I fail the new user authorization test. Incidentally, I cannot register a new user, and I use previously created users. When trying to create a new user, I do not receive a confirmation email. A user is created in the database, but it is impossible to log in later under this name. Not sure if my code changes have any effect on this. I must say that I made some corrections in supabaseTypes.ts ( I changed id: String to id: string, email: String to email: string ), but I checked where they are used and I think my changes do not change the logic of the program. What should my next steps be, what do you recommend? I can roll back the changes regarding supabaseTypes.ts and make the appropriate changes in my code, what do you say? (I have already tried different options, it does not affect authorization)
I remember there being a discussion on the discord about 'String' vs 'string' in one of our types that was causing some trouble. In any case, unless there's a specific reason why we think it's better to refactor this I wouldn't be changing the types anyway so it's worth reverting those and running tests again. If they still fail maybe share the error message you get so we can figure out what's causing it
Hi @camelPhonso . I turned back the data types and a miracle happened 🤪🙃
Hi @camelPhonso , it seems I'm done with the main work) and have completed all your comments except for the test. Could you please clarify what I need to do for the test? Whether to create a new test in cypress or to make changes to some existing one, since I do not know deeply about these thing🤪🤦♂️🤷♀️🙏
Locally, the test works for me, but previously I created the 'give_away' item and made the reservation, and then the test "went like clockwork" 🙃
Hi @camelPhonso , it seems I'm done with the main work) and have completed all your comments except for the test. Could you please clarify what I need to do for the test? Whether to create a new test in cypress or to make changes to some existing one, since I do not know deeply about these thing🤪🤦♂️🤷♀️🙏
ok so it seems like your test is running into issues because it assumes the shoes have been marked as reserved, but when we start with the seed data that's not the case.
The shoes are used in the resrved.cy.js
suite so we should leave those as they are but the best thing to do would be to have one of the other items reserved and then run the test to give away on that one.
To do this, the best way is to follow these steps:
npx supabase db reset
to start with clean data againTo do this, the best way is to follow these steps:
npx supabase db reset
to start with clean data again- log in as the refugee and request an item - maybe the summer dress
- log in as the donor and mark the summer dress as reserved
- do a data dump to update our seed data
- then adjust your test to target the summer dress and mark it as given away
Thanks @camelPhonso for the advice👍 now everything is working 🥳
@YuraPetrovskyi , Looks great 👍The test ran successfully, and the giveaway functionality works as expected.
Another smashing contribution 🙌 Thanks Yurii
I am very happy🥳🤩 Thanks @camelPhonso for the tips and for the right direction💪it was great to work on this assignment👍
Checklist:
Description
Relates #260 #254
Files changed
DonatedItemsList.tsx
GiveAwayConfirmationModal.tsx (New)
ItemCard.tsx
ItemDetailsPage.tsx
ReserveForUserModal.tsx
supabase/migrations/20240913135301_add_given_away_to_column.sql (New)
-Added migration to include given_away_to column in the items table to track the user receiving the donated item.
supabase/models/filtering-items/searchItems.ts
supabase/models/messaging/findConversationByItemAndUsers.ts (New)
types/supabaseTypes.ts
Tests
All tests have been conducted manually, and no errors have been identified.