Open
Conversation
maayarosama
suggested changes
Aug 14, 2024
client/src/api/axios.ts
Outdated
Comment on lines
+29
to
+34
| await AuthClient.post(`/test_suites/${project_id}/`) | ||
| .then(response=>{ | ||
| }) | ||
| .catch(error=>{ | ||
| return error | ||
| }) |
There was a problem hiding this comment.
Suggested change
| await AuthClient.post(`/test_suites/${project_id}/`) | |
| .then(response=>{ | |
| }) | |
| .catch(error=>{ | |
| return error | |
| }) | |
| return await AuthClient.post(`/test_suites/${project_id}/`) | |
handle it with try and catch when you call it
client/src/api/axios.ts
Outdated
| return error | ||
| }) | ||
| } | ||
| async function GetTestSuites(project_id:any){ |
client/src/api/axios.ts
Outdated
| }) | ||
| } | ||
|
|
||
| async function SearchSuite(project_id:any,key_word:any){ |
| } | ||
| }; | ||
|
|
||
| const createTestSuite=async()=>{ |
Mahmoud-Emad
requested changes
Aug 25, 2024
Collaborator
Mahmoud-Emad
left a comment
There was a problem hiding this comment.
Good job ya Nabila :)
Comment on lines
+4
to
+8
| baseURL: import.meta.env.VITE_APP_ENDPOINT, | ||
| timeout: 1000, | ||
| headers: { | ||
| 'Content-Type': 'application/json', | ||
| 'Authorization': 'Bearer ' + localStorage.getItem("token"), | ||
| Authorization: 'Bearer ' + localStorage.getItem('token'), |
Collaborator
There was a problem hiding this comment.
We need to merge your previous PRs to load the changes here instead of re-declared them
| } | ||
| } | ||
|
|
||
| async function CreateNewTestSuite (testSuiteDetails: any, projectId:any) { |
Collaborator
There was a problem hiding this comment.
Let's define the testSuiteDetails type, when using typescript you need to define all required types, the language name is type script
please apply this to all functions/requests
| }); | ||
| }) | ||
|
|
||
| async function GetPlans (projectId:any) { |
Collaborator
There was a problem hiding this comment.
What is the type of projectId?
Comment on lines
+58
to
+64
| await axios.CreateNewTestSuite(details, projectId) | ||
| notifier.notify({ | ||
| title: 'success', | ||
| description: 'test suite created successfully', | ||
| showProgressBar: true, | ||
| timeout: 7_000, | ||
| type: 'success', |
Collaborator
There was a problem hiding this comment.
You understand now, we load it from the backend, you can wrap it for sure
Comment on lines
+69
to
+71
| onMounted(() => { | ||
| getSuites(); | ||
| }); |
Collaborator
There was a problem hiding this comment.
Suggested change
| onMounted(() => { | |
| getSuites(); | |
| }); | |
| onMounted(getSuites()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
add new test suite and view test suites
Changes
Related issues
#27