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(tests): noteList.test #95

Closed
wants to merge 48 commits into from
Closed

feat(tests): noteList.test #95

wants to merge 48 commits into from

Conversation

e11sy
Copy link
Contributor

@e11sy e11sy commented Oct 22, 2023

  • added test added for /notes of one user
  • added insertUserSessions function
  • added json file for insertUserSessions function
  • added notes to notes.json (now 50) with one user_id *renamed notes-settings to camelcase
    notesSettings now

GeekaN2 and others added 5 commits October 22, 2023 22:29
*added test added for /notes of one user
*added insertUserSessions function
*added json file for insertUserSessions function
*added notes to notes.json (now 50) with one user_id
*renamed notes-settings to camelcase
notesSettings now
src/presentation/http/router/noteList.test.ts Outdated Show resolved Hide resolved
headers: {
authorization: `Bearer ${access_token}`,
},
url: '/notes/&page=3',
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
url: '/notes/&page=3',
url: '/notes/?page=3',

Copy link
Member

Choose a reason for hiding this comment

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

move "3" to a constant please.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

expect(body).toHaveLength(portionSize);
});

test('Returns noteList with no items if page*portionSize > numberOfNotes', async () => {
Copy link
Member

Choose a reason for hiding this comment

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

better to write with normal sentences

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

expect(response?.statusCode).toBe(expextedStatus);
});

test('Returns 400 when page > 0', async () => {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
test('Returns 400 when page > 0', async () => {
test('Returns 400 when page is too large', async () => {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

neSpecc and others added 10 commits October 23, 2023 02:48
- fixed comments logic
- trying to fix directoru error
chore: move bis-logic from ui do domain, decouple domains
fixed sql syntax
fixed sql syntax
changed variable name
feat(editor-tools): default tools added to user tools, global "underscore" options in models
@e11sy e11sy changed the title feat(noteList.test) feat(tests): noteList.test Oct 23, 2023
GoldenJaden and others added 13 commits October 24, 2023 00:42
On pull/push: run build check, eslint check, tests. On push to main additionally deploy.
Added installing dependencies for build check
- trying to fix test problem with auth
- deleted error for tests throw
- lint fixes
Divided enlist and build-push action to 2 separated actions
New data for tests were added to the test database
url for a fake request define using the find method
fix implicit arrange
GoldenJaden and others added 2 commits October 31, 2023 16:15
Quickfix: added synchronize trigger on PR to actions
- noteList test logic fixed (authorization for specific user needed)
kloV148 and others added 18 commits November 1, 2023 14:32
Fix multiple run of github action
Need to decide what to do with the note creator.
Removed 1 test case for 406
- new Globally exposed method for creating accessToken using id (global.auth)
- added description of global.auth method into readme
- renamed variable from id to userId
- typo fixed
- authtorization with global.auth instead of fake request function
- data variables renamed to camelCase
- solved conflicts in test data
@e11sy e11sy closed this Nov 7, 2023
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.

7 participants