Skip to content

Commit

Permalink
#4455 - 'Update sequence' modal window: display the number of nucleot…
Browse files Browse the repository at this point in the history
…ides to be changed
  • Loading branch information
ilya-asiyuk-epam committed Apr 12, 2024
1 parent 670ef26 commit f8384a4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('UpdateSequenceInRNABuilder modal component', () => {
<UpdateSequenceInRNABuilder {...mockProps} />,
{
rnaBuilder: {
sequenceSelection: [labeledNucleotide],
sequenceSelection: [labeledNucleotide, labeledNucleotide],
},
},
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const UpdateSequenceInRNABuilder = ({ isModalOpen, onClose }: Props) => {
const dispatch = useAppDispatch();
const sequenceSelection = useAppSelector(selectSequenceSelection);
const editor = useAppSelector(selectEditor);
const countOfSequenceSelection = sequenceSelection.length;
const onCloseCallback = useCallback(() => {
onClose();
}, [onClose]);
Expand Down Expand Up @@ -69,7 +70,8 @@ const UpdateSequenceInRNABuilder = ({ isModalOpen, onClose }: Props) => {
>
<Modal.Content>
<TextWrapper>
You are going to make multiple changes in your sequence. Are you sure?
You are going to modify {countOfSequenceSelection} nucleotides. Are
you sure?
</TextWrapper>
</Modal.Content>
<Modal.Footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ Object {
<div
class="css-pp7hf1"
>
You are going to make multiple changes in your sequence. Are you sure?
You are going to modify
2
nucleotides. Are you sure?
</div>
</div>
<div
Expand Down

0 comments on commit f8384a4

Please sign in to comment.