Nicegui user should find elements created by Quasar code #3794
MasterSergius
started this conversation in
Ideas / Feature Requests
Replies: 1 comment 1 reply
-
The NiceGUI user fixture only knows about python elements. Thats the whole trick. You could either use the screen fixture which does start a real browser or change the implementation to use colors = ['red', 'green', 'blue']
columns = [
{'name': 'product', 'label': 'Product', 'field': 'product', 'align': 'center'},
{'name': 'color', 'label': 'Color', 'field': 'color', 'align': 'center'},
]
rows = [
{'product': 'A', 'color': 'red'},
{'product': 'B', 'color': 'green'},
{'product': 'C', 'color': 'blue'},
]
table = ui.table(columns=columns, rows=rows, row_key='product').classes('w-72')
table.add_slot('body-cell-color', r'''<q-td key="color" :props="props"></q-td>''')
for r, row in enumerate(rows):
with ui.teleport(f'#c{table.id} tr:nth-child({r+1}) td:nth-child(2)'):
ui.select(colors).bind_value(row, 'color').mark(f'row{r+1}') |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Example.
I have a table and the only way to create selects dynamically is using quasar syntax:
In tests I want user find this select and change value. But user.find(kind=Select) doesn't work for this case
Beta Was this translation helpful? Give feedback.
All reactions