I am writing automated tests with Protractor and Jasmine in TypeScript, but I cannot modify conentents of non-input fields of a table.
I have already tried using Protractor .sendKeys() and browser.executeScript("arguments[0].textContent= arguments[2];", cell, value).
Protractor .sendKeys() fails to modify it as I wish, instead it creates "0" value in the cell.
browser.executeScript("arguments[0].textContent= arguments[2];", cell, value) does change the value in the cell, at least visually. However, once I try saving the changes with pressing "Save" button on the page, the change get discarded and the value of the cell return to default.
I also tried it without .click() and .sendKeys(). Does not work.
My code:
const index = await this.components.indexOf(componentName);
const cell = await element(by.css('[row-index="'+index+'"] [col-id="value"]'));
await cell.click();
await cell.sendKeys(value);
await browser.executeScript("arguments[0].textContent= arguments[1];", cell, value);
the DOM with the cell in question

The table itself
I expect the values to be modified and preserved after I modify them in the table and press "Save" button