@nextclaw/x-harness 0.2.44 → 0.2.45

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/SOURCE.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Corresponding source
2
2
 
3
- Version 0.2.44, commit 5f83f4e0fa5f5d3e052b63498a4878f18e12e48b.
3
+ Version 0.2.45, commit 52258a7e88c8ebdab05e3981d37ec78becabffe6.
4
4
 
5
- Complete source, build scripts and dependencies: https://github.com/Peiiii/x-harness/tree/5f83f4e0fa5f5d3e052b63498a4878f18e12e48b
5
+ Complete source, build scripts and dependencies: https://github.com/Peiiii/x-harness/tree/52258a7e88c8ebdab05e3981d37ec78becabffe6
6
6
 
7
7
  Clone this revision, run npm ci, npm run bootstrap and npm run release:build.
8
8
 
@@ -3,6 +3,7 @@ export declare class DOMCapabilities {
3
3
  #private;
4
4
  constructor(dependencies: Pick<DOMDependencies, "tab" | "nativeSubmit">);
5
5
  capabilities(operation: any): any;
6
+ private quoteCapabilities;
6
7
  private creatorCapabilities;
7
8
  private collectionCapabilities;
8
9
  }
@@ -89,19 +89,8 @@ export class DOMCapabilities {
89
89
  "press",
90
90
  ]));
91
91
  }
92
- if (operation === "openQuoteComposer") {
93
- base.push(...missingMethods(this.#tab?.playwright, ["locator", "getByRole"]));
94
- if (typeof this.#tab?.playwright?.getByRole === "function") {
95
- base.push(...missingMethods(this.#tab.playwright.getByRole("article"), [
96
- "filter",
97
- "getByRole",
98
- ]));
99
- base.push(...missingMethods(this.#tab.playwright.getByRole("button"), [
100
- "press",
101
- "waitFor",
102
- ]));
103
- }
104
- }
92
+ if (operation === "openQuoteComposer")
93
+ return this.quoteCapabilities(base);
105
94
  if (operation === "attachAssets")
106
95
  base.push(...missingMethods(this.#tab?.playwright, [
107
96
  "waitForEvent",
@@ -112,6 +101,26 @@ export class DOMCapabilities {
112
101
  base.push(...missingMethods(this.#tab, ["getAXState", "click"]));
113
102
  return base;
114
103
  }
104
+ quoteCapabilities(base) {
105
+ base.push(...missingMethods(this.#tab?.playwright, ["getByTestId"]));
106
+ if (typeof this.#tab?.playwright?.getByTestId === "function")
107
+ base.push(...missingMethods(this.#tab.playwright.getByTestId("attachments"), [
108
+ "getByTestId",
109
+ "waitFor",
110
+ ]));
111
+ base.push(...missingMethods(this.#tab?.playwright, ["locator", "getByRole"]));
112
+ if (typeof this.#tab?.playwright?.getByRole === "function") {
113
+ base.push(...missingMethods(this.#tab.playwright.getByRole("article"), [
114
+ "filter",
115
+ "getByRole",
116
+ ]));
117
+ base.push(...missingMethods(this.#tab.playwright.getByRole("button"), [
118
+ "press",
119
+ "waitFor",
120
+ ]));
121
+ }
122
+ return base;
123
+ }
115
124
  creatorCapabilities(base, operation) {
116
125
  base.push(...missingMethods(this.#tab, [
117
126
  "url",
@@ -426,6 +426,10 @@ export class DOMEditing {
426
426
  });
427
427
  await menu.waitFor({ state: "visible", timeoutMs: 2000 });
428
428
  await (await this.#unique(menu)).press("Enter");
429
+ await this.#tab.playwright
430
+ .getByTestId("attachments")
431
+ .getByTestId("tweetText")
432
+ .waitFor({ state: "visible", timeoutMs: 2000 });
429
433
  this.#session.quoteBinding = {
430
434
  postId: post.id,
431
435
  author: post.author,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextclaw/x-harness",
3
- "version": "0.2.44",
3
+ "version": "0.2.45",
4
4
  "type": "module",
5
5
  "description": "Typed X task harness with compact business results and explicit diagnostics.",
6
6
  "main": "./dist/index.js",
@@ -42,5 +42,5 @@
42
42
  "publishConfig": {
43
43
  "access": "public"
44
44
  },
45
- "gitHead": "5f83f4e0fa5f5d3e052b63498a4878f18e12e48b"
45
+ "gitHead": "52258a7e88c8ebdab05e3981d37ec78becabffe6"
46
46
  }