Paint a destructive Dialog button with Nextcloud's error text color.
The theme's error background is a pale pink, so a white label looked disabled.
This commit is contained in:
@@ -350,6 +350,13 @@ func TestConfirmYesNoAndDestructive(t *testing.T) {
|
||||
if plain == destructive {
|
||||
return fmt.Errorf("destructive button color %q matches Cancel", destructive)
|
||||
}
|
||||
var text string
|
||||
if err := chromedp.Evaluate(`getComputedStyle(document.getElementById("exapp-dialog-agree")).color`, &text).Do(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
if text == "rgb(255, 255, 255)" || text == destructive {
|
||||
return fmt.Errorf("destructive label color %q on background %q", text, destructive)
|
||||
}
|
||||
var label string
|
||||
if err := chromedp.Evaluate(`document.getElementById("exapp-dialog-agree").textContent`, &label).Do(ctx); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user