mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-18 09:14:01 -04:00
* updated dank to support aqueous
* further updates
* aqueous support work
* updated to support workspace options better in aqueous
* added blur to dms shell for aqueous
* added keybinding update
* remove unneeded blur
* clean up per claud review
* swapped to ipc
* aqueous: move IPC integration to QML, delete test fixtures (since we
dont have a QML test structure even setup), delete in-repo docs
* fix staticcheck
* aqueous: consolidate more aqueous specific stuff
* add aqueous logo
---------
Co-authored-by: Zoey <[email protected]>
(cherry picked from commit b9365610c8)
26 lines
700 B
Go
26 lines
700 B
Go
package main
|
|
|
|
import (
|
|
"errors"
|
|
"fmt"
|
|
"testing"
|
|
|
|
"github.com/AvengeMedia/DankMaterialShell/core/internal/keybinds/providers"
|
|
)
|
|
|
|
func TestKeybindEditFailure(t *testing.T) {
|
|
for _, tc := range []struct {
|
|
err error
|
|
code string
|
|
}{
|
|
{&providers.AqueousError{Code: "external_change", Message: "changed"}, "external_change"},
|
|
{fmt.Errorf("helper: %w", &providers.AqueousError{Code: "read_only", Message: "denied"}), "read_only"},
|
|
{errors.New("transport failed"), "command_failed"},
|
|
} {
|
|
result := keybindEditFailure(tc.err)
|
|
if result["success"] != false || result["code"] != tc.code || result["message"] != tc.err.Error() {
|
|
t.Fatalf("unexpected failure result: %#v", result)
|
|
}
|
|
}
|
|
}
|