@fluid-experimental/odsp-end-to-end-tests 2.33.2 → 2.40.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 +4 -0
- package/lib/test/TestDataObject.js +9 -2
- package/lib/test/TestDataObject.js.map +1 -1
- package/package.json +17 -17
- package/src/test/TestDataObject.ts +9 -12
package/CHANGELOG.md
CHANGED
|
@@ -10,7 +10,10 @@ class TestDataObjectClass extends DataObject {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
TestDataObjectClass.Name = "@fluid-example/test-data-object";
|
|
13
|
-
TestDataObjectClass.factory = new DataObjectFactory(
|
|
13
|
+
TestDataObjectClass.factory = new DataObjectFactory({
|
|
14
|
+
type: TestDataObjectClass.Name,
|
|
15
|
+
ctor: TestDataObjectClass,
|
|
16
|
+
});
|
|
14
17
|
export const TestDataObject = createDataObjectKind(TestDataObjectClass);
|
|
15
18
|
export class CounterTestDataObjectClass extends DataObject {
|
|
16
19
|
/**
|
|
@@ -38,6 +41,10 @@ export class CounterTestDataObjectClass extends DataObject {
|
|
|
38
41
|
}
|
|
39
42
|
}
|
|
40
43
|
CounterTestDataObjectClass.Name = "@fluid-example/counter-test-data-object";
|
|
41
|
-
CounterTestDataObjectClass.factory = new DataObjectFactory(
|
|
44
|
+
CounterTestDataObjectClass.factory = new DataObjectFactory({
|
|
45
|
+
type: CounterTestDataObjectClass.Name,
|
|
46
|
+
ctor: CounterTestDataObjectClass,
|
|
47
|
+
sharedObjects: [SharedCounter.getFactory()],
|
|
48
|
+
});
|
|
42
49
|
export const CounterTestDataObject = createDataObjectKind(CounterTestDataObjectClass);
|
|
43
50
|
//# sourceMappingURL=TestDataObject.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestDataObject.js","sourceRoot":"","sources":["../../src/test/TestDataObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,UAAU,EACV,i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AAW,KAAK;QACf,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;IAC3B,CAAC;IAED,IAAY,OAAO;QAClB,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QAClD,CAAC;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;;AArBsB,+BAAI,GAAG,yCAAyC,CAAC;AAEjD,kCAAO,GAAG,IAAI,iBAAiB,CAAC;IACtD,IAAI,EAAE,0BAA0B,CAAC,IAAI;IACrC,IAAI,EAAE,0BAA0B;IAChC,aAAa,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC;CAC3C,CAAC,CAAC;AAkBJ,MAAM,CAAC,MAAM,qBAAqB,GAAG,oBAAoB,CAAC,0BAA0B,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tDataObject,\n\tDataObjectFactory,\n\tIDataObjectProps,\n\tcreateDataObjectKind,\n} from \"@fluidframework/aqueduct/internal\";\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { SharedCounter } from \"@fluidframework/counter/internal\";\n\nclass TestDataObjectClass extends DataObject {\n\tpublic static readonly Name = \"@fluid-example/test-data-object\";\n\n\tpublic static readonly factory = new DataObjectFactory({\n\t\ttype: TestDataObjectClass.Name,\n\t\tctor: TestDataObjectClass,\n\t});\n\n\tconstructor(props: IDataObjectProps) {\n\t\tsuper(props);\n\t}\n}\n\nexport const TestDataObject = createDataObjectKind(TestDataObjectClass);\nexport type TestDataObject = TestDataObjectClass;\n\nexport class CounterTestDataObjectClass extends DataObject {\n\tprivate _counter: SharedCounter | undefined;\n\n\t/**\n\t * Do setup work here\n\t */\n\tprotected async initializingFirstTime(): Promise<void> {\n\t\tconst counter = SharedCounter.create(this.runtime);\n\t\tthis.root.set(\"counter-key\", counter.handle);\n\t}\n\n\tprotected async hasInitialized(): Promise<void> {\n\t\tconst counterHandle = this.root.get<IFluidHandle<SharedCounter>>(\"counter-key\");\n\t\tthis._counter = await counterHandle?.get();\n\t}\n\n\tpublic static readonly Name = \"@fluid-example/counter-test-data-object\";\n\n\tpublic static readonly factory = new DataObjectFactory({\n\t\ttype: CounterTestDataObjectClass.Name,\n\t\tctor: CounterTestDataObjectClass,\n\t\tsharedObjects: [SharedCounter.getFactory()],\n\t});\n\n\tpublic increment(): void {\n\t\tthis.counter.increment(1);\n\t}\n\n\tpublic get value(): number {\n\t\treturn this.counter.value;\n\t}\n\n\tprivate get counter(): SharedCounter {\n\t\tif (this._counter === undefined) {\n\t\t\tthrow new Error(\"SharedCounter not initialized\");\n\t\t}\n\t\treturn this._counter;\n\t}\n}\n\nexport const CounterTestDataObject = createDataObjectKind(CounterTestDataObjectClass);\nexport type CounterTestDataObject = CounterTestDataObjectClass;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-experimental/odsp-end-to-end-tests",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.40.0",
|
|
4
4
|
"description": "Odsp client end to end tests",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -33,22 +33,22 @@
|
|
|
33
33
|
"temp-directory": "nyc/.nyc_output"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fluid-internal/mocha-test-setup": "~2.
|
|
37
|
-
"@fluid-private/test-version-utils": "~2.
|
|
38
|
-
"@fluidframework/aqueduct": "~2.
|
|
39
|
-
"@fluidframework/container-definitions": "~2.
|
|
40
|
-
"@fluidframework/container-loader": "~2.
|
|
41
|
-
"@fluidframework/core-interfaces": "~2.
|
|
42
|
-
"@fluidframework/counter": "~2.
|
|
43
|
-
"@fluidframework/fluid-static": "~2.
|
|
44
|
-
"@fluidframework/map": "~2.
|
|
45
|
-
"@fluidframework/matrix": "~2.
|
|
46
|
-
"@fluidframework/odsp-client": "~2.
|
|
47
|
-
"@fluidframework/odsp-doclib-utils": "~2.
|
|
48
|
-
"@fluidframework/odsp-driver-definitions": "~2.
|
|
49
|
-
"@fluidframework/sequence": "~2.
|
|
50
|
-
"@fluidframework/telemetry-utils": "~2.
|
|
51
|
-
"@fluidframework/test-utils": "~2.
|
|
36
|
+
"@fluid-internal/mocha-test-setup": "~2.40.0",
|
|
37
|
+
"@fluid-private/test-version-utils": "~2.40.0",
|
|
38
|
+
"@fluidframework/aqueduct": "~2.40.0",
|
|
39
|
+
"@fluidframework/container-definitions": "~2.40.0",
|
|
40
|
+
"@fluidframework/container-loader": "~2.40.0",
|
|
41
|
+
"@fluidframework/core-interfaces": "~2.40.0",
|
|
42
|
+
"@fluidframework/counter": "~2.40.0",
|
|
43
|
+
"@fluidframework/fluid-static": "~2.40.0",
|
|
44
|
+
"@fluidframework/map": "~2.40.0",
|
|
45
|
+
"@fluidframework/matrix": "~2.40.0",
|
|
46
|
+
"@fluidframework/odsp-client": "~2.40.0",
|
|
47
|
+
"@fluidframework/odsp-doclib-utils": "~2.40.0",
|
|
48
|
+
"@fluidframework/odsp-driver-definitions": "~2.40.0",
|
|
49
|
+
"@fluidframework/sequence": "~2.40.0",
|
|
50
|
+
"@fluidframework/telemetry-utils": "~2.40.0",
|
|
51
|
+
"@fluidframework/test-utils": "~2.40.0",
|
|
52
52
|
"@types/sinon": "^17.0.3",
|
|
53
53
|
"mocha": "^10.8.2",
|
|
54
54
|
"mocha-multi-reporters": "^1.5.1",
|
|
@@ -15,12 +15,10 @@ import { SharedCounter } from "@fluidframework/counter/internal";
|
|
|
15
15
|
class TestDataObjectClass extends DataObject {
|
|
16
16
|
public static readonly Name = "@fluid-example/test-data-object";
|
|
17
17
|
|
|
18
|
-
public static readonly factory = new DataObjectFactory(
|
|
19
|
-
TestDataObjectClass.Name,
|
|
20
|
-
TestDataObjectClass,
|
|
21
|
-
|
|
22
|
-
{},
|
|
23
|
-
);
|
|
18
|
+
public static readonly factory = new DataObjectFactory({
|
|
19
|
+
type: TestDataObjectClass.Name,
|
|
20
|
+
ctor: TestDataObjectClass,
|
|
21
|
+
});
|
|
24
22
|
|
|
25
23
|
constructor(props: IDataObjectProps) {
|
|
26
24
|
super(props);
|
|
@@ -48,12 +46,11 @@ export class CounterTestDataObjectClass extends DataObject {
|
|
|
48
46
|
|
|
49
47
|
public static readonly Name = "@fluid-example/counter-test-data-object";
|
|
50
48
|
|
|
51
|
-
public static readonly factory = new DataObjectFactory(
|
|
52
|
-
CounterTestDataObjectClass.Name,
|
|
53
|
-
CounterTestDataObjectClass,
|
|
54
|
-
[SharedCounter.getFactory()],
|
|
55
|
-
|
|
56
|
-
);
|
|
49
|
+
public static readonly factory = new DataObjectFactory({
|
|
50
|
+
type: CounterTestDataObjectClass.Name,
|
|
51
|
+
ctor: CounterTestDataObjectClass,
|
|
52
|
+
sharedObjects: [SharedCounter.getFactory()],
|
|
53
|
+
});
|
|
57
54
|
|
|
58
55
|
public increment(): void {
|
|
59
56
|
this.counter.increment(1);
|