mirror of
https://github.com/gradio-app/gradio.git
synced 2025-04-06 12:30:29 +08:00
fix tests
This commit is contained in:
parent
4e5df36046
commit
73300d1822
@ -127,7 +127,7 @@
|
||||
.examples_table_holder:not(.gallery) .examples_table {
|
||||
@apply table-auto p-2 bg-gray-50 dark:bg-gray-600 rounded max-w-full border-collapse;
|
||||
tbody tr {
|
||||
@apply cursor-pointer;
|
||||
@apply cursor-pointer transition;
|
||||
}
|
||||
thead {
|
||||
@apply border-b-2 dark:border-gray-600;
|
||||
@ -152,7 +152,7 @@
|
||||
@apply font-bold;
|
||||
}
|
||||
td {
|
||||
@apply cursor-pointer p-2 rounded bg-gray-50 dark:bg-gray-700;
|
||||
@apply cursor-pointer p-2 rounded bg-gray-50 dark:bg-gray-700 transition;
|
||||
}
|
||||
}
|
||||
.pages {
|
||||
|
@ -82,7 +82,9 @@
|
||||
}
|
||||
.input_image {
|
||||
.snapshot {
|
||||
@apply dark:bg-red-600;
|
||||
button {
|
||||
@apply dark:bg-red-600;
|
||||
}
|
||||
}
|
||||
}
|
||||
.input_checkbox_group, .input_checkbox {
|
||||
|
@ -111,10 +111,10 @@
|
||||
}
|
||||
.input_audio {
|
||||
.start {
|
||||
@apply bg-gradient-to-t from-gray-100 to-gray-50 text-gray-600 py-1.5 px-3 hover:to-gray-100 dark:text-gray-50 dark:from-gray-600 dark:to-gray-500 dark:hover:to-gray-600 dark:border-none;
|
||||
@apply bg-gradient-to-t border from-gray-100 to-gray-50 text-gray-600 py-1.5 px-3 hover:to-gray-100 dark:text-gray-50 dark:from-gray-600 dark:to-gray-500 dark:hover:to-gray-600 dark:border-none;
|
||||
}
|
||||
.stop {
|
||||
@apply bg-gradient-to-t from-red-200 to-red-50 text-red-600 py-1.5 px-3 hover:to-gray-100 dark:from-red-700 dark:to-red-600 dark:text-red-100;
|
||||
@apply border border-red-200 bg-gradient-to-t from-red-200 to-red-50 text-red-600 py-1.5 px-3 hover:to-red-100 dark:from-red-700 dark:to-red-600 dark:text-red-100;
|
||||
}
|
||||
}
|
||||
/* Output Components */
|
||||
|
@ -99,7 +99,7 @@ class TestDemo(unittest.TestCase):
|
||||
elem.click()
|
||||
elem = WebDriverWait(driver, TIMEOUT).until(
|
||||
EC.presence_of_element_located((By.CSS_SELECTOR,
|
||||
".panel:nth-child(2) .component:nth-child(2) .output_text"))
|
||||
".panel:nth-child(2) .component:nth-child(2) .textfield"))
|
||||
)
|
||||
|
||||
total_sleep = 0
|
||||
@ -107,7 +107,7 @@ class TestDemo(unittest.TestCase):
|
||||
time.sleep(0.2)
|
||||
total_sleep += 0.2
|
||||
|
||||
self.assertEqual(elem.text, "LeWant's tgo see a magic trick?!")
|
||||
self.assertEqual(elem.text, "L+e+W-a-n-t'+s+ t-g+o see a magic trick?-!+")
|
||||
golden_img = os.path.join(current_dir, GOLDEN_PATH.format(
|
||||
"diff_texts", "magic_trick"))
|
||||
tmp = os.path.join(current_dir, "test/tmp/{}.png".format(
|
||||
@ -138,7 +138,7 @@ class TestDemo(unittest.TestCase):
|
||||
elem.click()
|
||||
WebDriverWait(driver, TIMEOUT).until(
|
||||
EC.visibility_of_element_located(
|
||||
(By.CSS_SELECTOR, ".panel:nth-child(2) .component:nth-child(2) .output_image"))
|
||||
(By.CSS_SELECTOR, ".panel:nth-child(2) .component:nth-child(2) .textfield"))
|
||||
)
|
||||
|
||||
time.sleep(GAP_TO_SCREENSHOT)
|
||||
|
@ -179,7 +179,8 @@ class TestHighlightedText(unittest.TestCase):
|
||||
self.assertEqual(ht_output.get_template_context(), {
|
||||
'color_map': {'pos': 'green', 'neg': 'red'},
|
||||
'name': 'highlightedtext',
|
||||
'label': None
|
||||
'label': None,
|
||||
'show_legend': False
|
||||
})
|
||||
ht = {
|
||||
"pos": "Hello ",
|
||||
|
Loading…
x
Reference in New Issue
Block a user