-
Notifications
You must be signed in to change notification settings - Fork 2
Add Test Suite #48
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
base: development_2.0.0
Are you sure you want to change the base?
Add Test Suite #48
Conversation
client/src/api/axios.ts
Outdated
| await AuthClient.post(`/test_suites/${project_id}/`) | ||
| .then(response=>{ | ||
| }) | ||
| .catch(error=>{ | ||
| return error | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
client/src/api/axios.ts
Outdated
| }) | ||
| } | ||
|
|
||
| async function SearchSuite(project_id:any,key_word:any){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
| } | ||
| }; | ||
|
|
||
| const createTestSuite=async()=>{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implement notifier
Mahmoud-Emad
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job ya Nabila :)
| baseURL: import.meta.env.VITE_APP_ENDPOINT, | ||
| timeout: 1000, | ||
| headers: { | ||
| 'Content-Type': 'application/json', | ||
| 'Authorization': 'Bearer ' + localStorage.getItem("token"), | ||
| Authorization: 'Bearer ' + localStorage.getItem('token'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to merge your previous PRs to load the changes here instead of re-declared them
| } | ||
| } | ||
|
|
||
| async function CreateNewTestSuite (testSuiteDetails: any, projectId:any) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the type of projectId?
| await axios.CreateNewTestSuite(details, projectId) | ||
| notifier.notify({ | ||
| title: 'success', | ||
| description: 'test suite created successfully', | ||
| showProgressBar: true, | ||
| timeout: 7_000, | ||
| type: 'success', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You understand now, we load it from the backend, you can wrap it for sure
| onMounted(() => { | ||
| getSuites(); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| onMounted(() => { | |
| getSuites(); | |
| }); | |
| onMounted(getSuites()); |
Description
add new test suite and view test suites
Changes
Related issues
#27