如何使用 fillIn 附加预填充的文本区域内容

How to append an pre-filled textarea content using fillIn

我有一个文本区域,它已经使用 fillIn 函数填充了值。但现在我想在同一个文本区域中附加另一个字符“@”。但是当我再次尝试使用 fillIn 时;它重写文本区域。我怎样才能附加文本。我需要它分两步进行。

HTML:

<textarea data-test-id='descriptor'></textarea>

测试:

test('testing-fillIn', async function(assert){
await fillIn(testSelector('descriptor'), 'First text ');
await fillIn(testSelector('descriptor'), '@');
});

输出应该是:第一个文本@

test('testing-fillIn', async function(assert){
await fillIn(testSelector('descriptor'), 'First text ');
var textVal =document.getElementById('textArea').val();
await fillIn(testSelector('descriptor'), textVal+'@');
});
<textarea id="textArea" data-test-id='descriptor'></textarea>