diff --git a/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts b/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts index b87ef610a5..77fbfe6997 100644 --- a/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts +++ b/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts @@ -85,92 +85,29 @@ describe("plugin-wrapper", () => { }); test("getSchema -- plugin schema", async () => { - const client = await getClient(); - const schema: string = await client.getSchema( - "wrap://ens/js-logger.polywrap.eth" - ); + const testPluginUri = "ens/test-plugin.eth"; + const pluginSchema = "type Module { someMethod(arg: String): String }"; - expect(schema).toStrictEqual( - `### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -### Polywrap Header END ### - -type Module implements Logger_Module @imports( - types: [ - "Logger_Module", - "Logger_LogLevel" - ] -) { - log( - level: Logger_LogLevel! - message: String! - ): Boolean! -} - -### Imported Modules START ### - -type Logger_Module @imported( - uri: "ens/logger.core.polywrap.eth", - namespace: "Logger", - nativeType: "Module" -) { - log( - level: Logger_LogLevel! - message: String! - ): Boolean! -} - -### Imported Modules END ### - -### Imported Objects START ### - -enum Logger_LogLevel @imported( - uri: "ens/logger.core.polywrap.eth", - namespace: "Logger", - nativeType: "LogLevel" -) { - DEBUG - INFO - WARN - ERROR -} - -### Imported Objects END ### -` - ); + const pluginPackage = { + factory: () => ({} as PluginModule<{}>), + manifest: { + schema: pluginSchema, + implements: [], + }, + }; + + const client = new PolywrapClient({ + plugins: [ + { + uri: testPluginUri, + plugin: pluginPackage, + }, + ], + }); + + const schema: string = await client.getSchema(testPluginUri); + + expect(schema).toStrictEqual(pluginSchema); }); it("plugin map types", async () => { diff --git a/packages/js/test-env/src/wrappers/ens/schema.graphql b/packages/js/test-env/src/wrappers/ens/schema.graphql index b7cae7ce0a..1b939e94f5 100644 --- a/packages/js/test-env/src/wrappers/ens/schema.graphql +++ b/packages/js/test-env/src/wrappers/ens/schema.graphql @@ -308,11 +308,6 @@ type Module @imports( ): CreateSubdomainInOpenDomainAndSetContentHashResponse } -type TxOverrides { - gasPrice: BigInt - gasLimit: BigInt -} - type ConfigureOpenDomainResponse { fifsRegistrarAddress: String! registerOpenDomainTxReceipt: Ethereum_TxResponse! @@ -336,6 +331,11 @@ type RegistrationResult { tx: Ethereum_TxResponse } +type TxOverrides { + gasPrice: BigInt + gasLimit: BigInt +} + ### Imported Modules START ### type Ethereum_Module @imported( diff --git a/packages/js/test-env/src/wrappers/ens/wrap.info b/packages/js/test-env/src/wrappers/ens/wrap.info index 4f2aa7e5bb..d71d19b91b 100644 Binary files a/packages/js/test-env/src/wrappers/ens/wrap.info and b/packages/js/test-env/src/wrappers/ens/wrap.info differ diff --git a/packages/test-cases/cases/cli/wasm/run/workflows/output.json b/packages/test-cases/cases/cli/wasm/run/workflows/output.json deleted file mode 100644 index 513054b1da..0000000000 --- a/packages/test-cases/cases/cli/wasm/run/workflows/output.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "id": "cases.0", - "error": {} - }, - { - "id": "cases.case1.0", - "error": {} - }, - { - "id": "cases.case1.1", - "error": {} - } -] \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap-temp.yaml b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap-temp.yaml deleted file mode 100644 index 41f4623e9f..0000000000 --- a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap-temp.yaml +++ /dev/null @@ -1,8 +0,0 @@ -format: 0.0.1-prealpha.9 -name: SimpleStorage -language: wasm/assemblyscript -build: ./polywrap.build.yaml -meta: ./polywrap.meta.yaml -schema: ./schema.graphql -module: ./src/index.ts -deploy: ./polywrap.deploy-temp.yaml diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.deploy-temp.yaml b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.deploy-temp.yaml deleted file mode 100644 index 541b321ea8..0000000000 --- a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.deploy-temp.yaml +++ /dev/null @@ -1,15 +0,0 @@ -format: 0.0.1-prealpha.1 -stages: - ipfsDeploy: - package: ipfs - uri: >- - fs//home/cesar/dev/polywrap/monorepo/packages/test-cases/cases/wrappers/wasm-as/simple-storage/build - config: - gatewayUri: http://localhost:5001 - ensPublish: - package: ens - depends_on: ipfsDeploy - config: - domainName: simple-storage.eth - provider: http://localhost:8545 - ensRegistryAddress: '0xe78A0F7E598Cc8b0Bb87894B0F60dD2a88d6a8Ab'