-
Notifications
You must be signed in to change notification settings - Fork 67
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
1458 [Transactions] Edit & Delete implementation for Transactions #1459
1458 [Transactions] Edit & Delete implementation for Transactions #1459
Conversation
transaction: TTransaction; | ||
} | ||
|
||
const EditTransaction = ({transaction}: IProps) => { |
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.
Basically the same implementation we have for tests
</S.Title> | ||
<S.Text>{transaction?.description}</S.Text> | ||
</div> | ||
</S.Section> | ||
<S.Section> | ||
<TestCardActions testId={transaction?.id || ''} onDelete={noop} /> | ||
<TestCardActions testId={transaction?.id || ''} onDelete={() => onDelete(transaction.id, transaction.name)} /> |
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.
adding delete capability
{items.map((test, index) => ( | ||
// eslint-disable-next-line react/no-array-index-key | ||
<TestItem key={`${test.id}-${index}`} test={test} onDelete={onDelete} /> | ||
{items.map(({id, test}) => ( |
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.
I found a bug when selecting the same test twice (that is a valid scenario) and the drag & drop, I fixed it by adding an extra unique id
|
||
return ( | ||
<> | ||
<TransactionHeader onBack={() => navigate(`/transaction/${transactionId}`)} /> |
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 layout mechanism as tests
query: () => `/tests`, | ||
providesTags: result => [{type: TracetestApiTags.TRANSACTION, id: result?.id}], | ||
transformResponse: () => TransactionMock.model(), | ||
transformResponse: () => ({ |
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.
mock mock mock
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.
🔥
This PR Adds the edit and delete implementation for transactions, it includes the initial designs and wire-up for the transactions run page, similar to what we have for tests, having the edit form and execution results in the same context.
Changes
Fixes
Checklist
https://www.loom.com/share/be52d5887e734e04af480217ee8b45a7