I am trying to grab a title off of a LWC button that is a basic component button with a title as title='Enabled button'
. Right now I am checking if it is disabled by doing expect(selectBtn.disabled).toBe(false);
and this is working to check if it is disabled or not.
1 Answer
To get this to work do expect(selectBtn.title).toBe('Enabled button');
as this will go ahead and select the title attribute off of the button