ui5-uiveri5 icon indicating copy to clipboard operation
ui5-uiveri5 copied to clipboard

Limit in the View Settings dialog

Open skultetymichal opened this issue 3 years ago • 5 comments

I have an issue regarding the View Settings dialog in UI5 apps:

I have an assertion to check number of records in View Settings dialog:

expect(settingsWindow.getAllPossibleFields().count()).toEqual(Constants.adaptTable.additionalColumns.length); //shoul be some number, in this case 66

getAllPossibleFields() {
    let xpath = '//td[@class="sapMListTblCell"]//bdi';

    return this.getAllByXPath(xpath);

In all of our apps no matter how many records in View Settings dialog there is, It seems the limit stored in the count() is always 25 image

skultetymichal avatar Jul 19 '21 08:07 skultetymichal

I can't comment what this XPath returns, can you please run it in browser control and confirm what number it would really give?

maximnaidenov avatar Jul 19 '21 08:07 maximnaidenov

thank you Maxim for you reply I evaluated using following expression in the console $x('//td[@class="sapMListTblCell"]//bdi').length and the result is 70 image

skultetymichal avatar Jul 19 '21 10:07 skultetymichal

Maybe this getAllByXPath adds another level of filtering, for example showing only visible items ?

maximnaidenov avatar Jul 19 '21 11:07 maximnaidenov

I dont think that the issue is in the getAllByXPath

I use another function: it checks whether the column is present in the dialog, it loops the list of columns that should be there:

hasColumnsUnderSettings: function(columns) { columns.forEach(column => { expect(tableBuilderInstance.getAvailableColumnName(column).isPresent()).toBeTruthy('Column ' + column + ' is visible'); });

You can see that the resulting number of hits returned by XPATH is 1, and the column "WIP" is not visible in the screen image

I normally use isDisplayed in the function, but when I use isPresent, as you can see in the code snippet, It is strange that the limit is reached eventhough isPresent checks just if the element is present in DOM

skultetymichal avatar Jul 19 '21 11:07 skultetymichal

Is this issue still relevant?

hmanchev avatar Apr 08 '22 06:04 hmanchev