Falko Schindler пре 2 година
родитељ
комит
4f99625f67
1 измењених фајлова са 11 додато и 13 уклоњено
  1. 11 13
      tests/test_table.py

+ 11 - 13
tests/test_table.py

@@ -66,25 +66,23 @@ def test_add_remove(screen: Screen):
     screen.should_not_contain('Alice')
     screen.should_not_contain('Alice')
 
 
 
 
-def test_slot(screen: Screen):
-    with ui.table(columns=columns, rows=rows, pagination=None) as table:
+def test_slots(screen: Screen):
+    with ui.table(columns=columns, rows=rows) as table:
         with table.add_slot('top-row'):
         with table.add_slot('top-row'):
             with table.row():
             with table.row():
                 with table.cell():
                 with table.cell():
-                    ui.label('This is top slot.')
+                    ui.label('This is the top slot.')
         table.add_slot('body', '''
         table.add_slot('body', '''
-        <q-tr :props="props">
-          <q-td key="name" :props="props">overriden</q-td>
-          <q-td key="age" :props="props">
-            <q-badge color="green">
-              {{ props.row.age }}
-            </q-badge>
-          </q-td>
-        </q-tr>
+            <q-tr :props="props">
+            <q-td key="name" :props="props">overridden</q-td>
+            <q-td key="age" :props="props">
+                <q-badge color="green">{{ props.row.age }}</q-badge>
+            </q-td>
+            </q-tr>
         ''')
         ''')
 
 
     screen.open('/')
     screen.open('/')
-    screen.should_contain('This is top slot.')
+    screen.should_contain('This is the top slot.')
     screen.should_not_contain('Alice')
     screen.should_not_contain('Alice')
-    screen.should_contain('overriden')
+    screen.should_contain('overridden')
     screen.should_contain('21')
     screen.should_contain('21')