Skip to content
This repository was archived by the owner on Jun 21, 2024. It is now read-only.

[COD-53] Verify complete flow and add missing parts#57

Open
MikhailZaitsau wants to merge 17 commits into
mainfrom
COD-53-Verify-complete-flow-and-add-missing-parts
Open

[COD-53] Verify complete flow and add missing parts#57
MikhailZaitsau wants to merge 17 commits into
mainfrom
COD-53-Verify-complete-flow-and-add-missing-parts

Conversation

@MikhailZaitsau

@MikhailZaitsau MikhailZaitsau commented Jun 10, 2023

Copy link
Copy Markdown
Contributor

Next flow was checked by me and completed to work fine:

  1. Registered user can create a course and lessons, attached to the course.
  2. User must enter name for course and title and description for lesson.
  3. User can see created courses and lessons attached to each.

Link to JIRA issue.

Page "My courses" let user search and see all courses created by him:
001
002
011
012

Page "All courses" let user search and see all courses:
003

On course page user can see all attached lessons and add new one:
004
005
006
007
008
009

010

…ked courses spec

[COD-53] Added spec for courses searching
…urrent user (backend)

[COD-53] Added user last name display
[COD-53] Added request spec for courses/show

[COD-53] Added show service for courses, logic to course controller, fixed spec issues
[COD-53] Added lessons logic to course page (frontend)
…ckend)

[COD-53] Added spec for lessons/index
…n a course page (frontend)

[COD-53] Added button 'add lesson' to course page
@Set27

Set27 commented Jun 10, 2023

Copy link
Copy Markdown
Contributor

Can you make PR more pretty to read?
Use can use text to link except show all link path (JIRA)
Also, you can heads like:

1 (# 1)

2 (## 2)

3 (### 3)

to separate important parts of the pull request.

Additionally, making a list of changes will help to read it.

  1. User can...
  2. Implement.....

Sign a screenshot to make sure that a reader understands the context.

Comment on lines +12 to +13
in Success(*courses_found)
render json: courses_found, status: :ok

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

courses_found is an array and using * we pass each element of the array as a separate argument. Then render each course?
E.g. courses_found = [course1, course2, course3]. Success(*courses_found) will render Sucess three times? Or I am wrong?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If I clearly understand * in DryMonads use to capture an array value. You can read more about this here: https://dry-rb.org/gems/dry-monads/1.3/pattern-matching/

Comment thread backend/app/services/courses/show.rb Outdated
Comment thread backend/app/services/lessons/fetch.rb Outdated
factory :course do
name { 'MyString' }
user
name { Faker::Hacker.say_something_smart }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can this method return a string length more than we expect in the model?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No. It never return more than 256 symbols.

@MikhailZaitsau MikhailZaitsau force-pushed the COD-53-Verify-complete-flow-and-add-missing-parts branch from 34d5dd1 to 42a855b Compare June 11, 2023 17:55
@MikhailZaitsau MikhailZaitsau requested a review from Set27 June 11, 2023 18:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants