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 f9598ee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
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 f9598ee

Please sign in to comment.