My strategy for this examination was to extract the inner text of an element, modify it, and then verify that the change had taken place by comparing the element with the variable.
var fixedValue = element(by.xpath('/html/body/section/div/section/section[2]/div[1]/ul/li[4]/a/span[2]')).getText();
var totalValue = element(by.xpath('/html/body/section/div/section/section[2]/div[1]/ul/li[1]/a/span[2]')).getText();
var progressValue = element(by.xpath('/html/body/section/div/section/section[2]/div[1]/ul/li[3]/a/span[2]')).getText();
Modify elements then validate changes
expect(element(by.xpath('/html/body/section/div/section/section[2]/div[1]/ul/li[3]/a/span[2]')).getText()).toEqual(progressValue);
Unfortunately, my console displayed a failed assertion message
Expected '17' to equal NaN
This issue seems to be due to the fact that the promise of the first variable has not been fulfilled yet, leaving nothing to compare against.
Therefore, I'm wondering how I can instruct the expectation to take into account the initial variable value.