@tui-sandbox/library 11.4.1 → 11.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/browser/assets/{index-AMa2FE-g.js → index-BIcK2_KN.js} +1 -1
- package/dist/browser/index.html +1 -1
- package/dist/src/client/cypress-assertions.js +14 -12
- package/dist/src/client/cypress-assertions.js.map +1 -1
- package/dist/src/scripts/parseArguments.js +1 -1
- package/dist/src/scripts/parseArguments.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/client/cypress-assertions.ts +14 -16
- package/src/scripts/parseArguments.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tui-sandbox/library",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.5.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/mikavilpas/tui-sandbox"
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@catppuccin/palette": "1.7.1",
|
|
15
|
-
"@trpc/client": "11.4.
|
|
16
|
-
"@trpc/server": "11.4.
|
|
15
|
+
"@trpc/client": "11.4.4",
|
|
16
|
+
"@trpc/server": "11.4.4",
|
|
17
17
|
"@xterm/addon-fit": "0.10.0",
|
|
18
18
|
"@xterm/addon-unicode11": "0.8.0",
|
|
19
19
|
"@xterm/xterm": "5.5.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@types/command-exists": "1.2.3",
|
|
33
33
|
"@types/cors": "2.8.19",
|
|
34
34
|
"@types/express": "5.0.3",
|
|
35
|
-
"@types/node": "24.
|
|
35
|
+
"@types/node": "24.2.0",
|
|
36
36
|
"nodemon": "3.1.10",
|
|
37
37
|
"tsx": "4.20.3",
|
|
38
38
|
"vite": "7.0.6",
|
|
@@ -10,28 +10,26 @@
|
|
|
10
10
|
* Limitation: text spanning multiple lines will not be detected.
|
|
11
11
|
*/
|
|
12
12
|
export function textIsVisibleWithColor(text: string, color: string): Cypress.Chainable<JQuery> {
|
|
13
|
-
return cy
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
return cy
|
|
14
|
+
.get("div.xterm-rows span")
|
|
15
|
+
.filter(`:contains(${text})`)
|
|
16
|
+
.should("exist") // ensures there's at least one match
|
|
17
|
+
.should($els => {
|
|
18
|
+
const colors = $els.map((_, el) => window.getComputedStyle(el).color).toArray()
|
|
19
|
+
expect(colors).to.include(color)
|
|
18
20
|
})
|
|
19
|
-
|
|
20
|
-
expect(JSON.stringify(colors.toArray())).to.contain(color)
|
|
21
|
-
})
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
/** Like `textIsVisibleWithColor`, but checks the background color instead
|
|
25
24
|
* of the text color.
|
|
26
25
|
*/
|
|
27
26
|
export function textIsVisibleWithBackgroundColor(text: string, color: string): Cypress.Chainable<JQuery> {
|
|
28
|
-
return cy
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
return cy
|
|
28
|
+
.get("div.xterm-rows span")
|
|
29
|
+
.filter(`:contains(${text})`)
|
|
30
|
+
.should("exist") // ensures there's at least one match
|
|
31
|
+
.should($els => {
|
|
32
|
+
const colors = $els.map((_, el) => window.getComputedStyle(el).backgroundColor).toArray()
|
|
33
|
+
expect(colors).to.include(color)
|
|
33
34
|
})
|
|
34
|
-
|
|
35
|
-
expect(JSON.stringify(colors.toArray())).to.contain(color)
|
|
36
|
-
})
|
|
37
35
|
}
|
|
@@ -14,7 +14,7 @@ export const parseArguments = async (args: string[]): Promise<ParseArgumentsResu
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
{
|
|
17
|
-
// tui neovim exec <command>
|
|
17
|
+
// tui neovim exec <command>
|
|
18
18
|
const schema = z.tuple([z.literal("neovim"), z.literal("exec"), z.string()])
|
|
19
19
|
const execArguments = schema.safeParse(args)
|
|
20
20
|
if (execArguments.success) {
|