I'm currently in the process of testing a webpage and I've encountered an issue with using a repeater and model to verify the text input.
My attempt at ensuring that the expected text matches what I want resulted in the following code snippet:
expect(element.all(by.repeater('n in [].constructor(product.config.num_streamers) track by $index')).get(1).all(by.model('name.value')).getAttribute('value')).toEqual("testtext");
The problem lies in the output showing an object with brackets instead of just plain text within quotes. The failed exception reads as follows: Expected [ 'testtext' ] to equal 'testtext'.
This failure is solely due to the presence of unnecessary brackets and spaces. Can someone please assist me in finding a solution and explaining why these brackets are appearing?