I have the following DOM on the page
<button type="submit" ng-reflect-disabled="true" disabled="">
Save & Exit
</button>
Also i have a (screen-play) component to target it's attribute
import {Attribute, Target} from "serenity-js/lib/serenity-protractor";
import {by} from "protractor";
export class myComponent {
public static saveAndExit = Target.the('"Save & Exit" submit button')
.located(by.buttonText("Save & Exit"));
public static saveAndExitAttribute = Attribute.of(CreateClientComponent.saveAndExit);
}
All I want to do is to make sure that DOM has the disabled attribute flagged, but my following attempt in a step_definitain file is getting nowhere
this.Then(
/^he should see "Save & Exit" button still is disabled$/,
function(buttonText) {
return expect(
this.stage.theActorInTheSpotlight().toSee(CreateClientComponent.saveAndExitAttribute),
).to.equal("");
});
Basiccaly i dont have enough undrestaing of how to target any attribute, using the attribute's question
Also I didnt mange to find any use-case of it, any advice, hint would be really appreciated