I have the following code from which i have to select 'Role 1' The problem I have is that the addition '+4' is changing or even not present. The cypress code i use is but it doesnt work because it's completely similar to the text in the dropdown:
cy.get('[ng-model="ctrl.userModel.selectedJobTitle"]').select('Role 1')
Does anyone has a clue how to select an select element using contains()
<select ng-model="ctrl.userModel.selectedJobTitle">
<option label="Role 1 +4" value="object:401">Role 1 +4</option>
<option label="Role 2 (Standaard) +2" value="object:402" selected="selected">Role 2 (Standaard) +2</option>
<option label="Role 3 +3" value="object:403">Role 3 +3</option>
<option label="Role 4 " value="object:404">Role 4 </option>
<option label="Role 5 " value="object:405">Role 5 </option></select>