Skip to content

Add Test Suite#48

Open
nabilasherif wants to merge 6 commits intodevelopment_2.0.0from
AddTestSuite
Open

Add Test Suite#48
nabilasherif wants to merge 6 commits intodevelopment_2.0.0from
AddTestSuite

Conversation

@nabilasherif
Copy link
Copy Markdown

Description
add new test suite and view test suites

Changes

  • added new test suite dialog

Related issues
#27

Comment on lines +29 to +34
await AuthClient.post(`/test_suites/${project_id}/`)
.then(response=>{
})
.catch(error=>{
return error
})
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

return error
})
}
async function GetTestSuites(project_id:any){
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

same here

})
}

async function SearchSuite(project_id:any,key_word:any){
Copy link
Copy Markdown

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()=>{
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

implement notifier

Copy link
Copy Markdown
Collaborator

@Mahmoud-Emad Mahmoud-Emad left a 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 :)

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'),
Copy link
Copy Markdown
Collaborator

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) {
Copy link
Copy Markdown
Collaborator

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) {
Copy link
Copy Markdown
Collaborator

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?

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',
Copy link
Copy Markdown
Collaborator

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

Comment on lines +69 to +71
onMounted(() => {
getSuites();
});
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
onMounted(() => {
getSuites();
});
onMounted(getSuites());

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.

3 participants