Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Apr 11, 2024
1 parent 3ce0ac2 commit aefe91a
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 40 deletions.
74 changes: 37 additions & 37 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { dirname } from 'path';
import { fileURLToPath } from 'url';
import { appPath } from '../../app-path.js';
import { {{pascal_case zome_manifest.name}}Client } from '../../../../ui/src/{{dna_role_name}}/{{kebab_case zome_manifest.name}}/{{kebab_case zome_manifest.name}}-client.js';
import { {{pascal_case zome_manifest.name}}Store } from '../../../../ui/src//{{dna_role_name}}/{{kebab_case zome_manifest.name}}/{{kebab_case zome_manifest.name}}-store.js';
import { {{pascal_case zome_manifest.name}}Store } from '../../../../ui/src/{{dna_role_name}}/{{kebab_case zome_manifest.name}}/{{kebab_case zome_manifest.name}}-store.js';

export async function setup(scenario: Scenario) {
// Add 2 players with the test hApp to the Scenario. The returned players
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async fn link_a_{{snake_case from_referenceable.name}}_to_a_{{snake_case to_refe
{{/if}}
{{/if}}
{{#if (eq to_referenceable.hash_type "AgentPubKey")}}
let target_address = alice.agentPubKey;
let target_address = alice.agent_pubkey();
{{else}}
let target_record = create_{{snake_case to_referenceable.name}}(&conductors[0], &alice_zome, sample_{{snake_case to_referenceable.name}}_1(&conductors[0], &alice_zome).await).await;
{{#if (eq to_referenceable.hash_type "EntryHash")}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ test('link a {{pascal_case from_referenceable.name}} to a {{pascal_case to_refer

// Bob gets the links, should be empty
let linksOutput = await toPromise(bob.store.{{#if (ne from_referenceable.hash_type "ActionHash")}}{{camel_case (plural to_referenceable.name)}}For{{pascal_case from_referenceable.name}}.get(baseAddress){{else}}{{camel_case (plural from_referenceable.name)}}.get(baseAddress).{{camel_case (plural to_referenceable.name)}}{{/if}}{{#if delete}}.live{{/if}});
{{#if (eq to_referenceable.hash_type "AgentPubKey")}}
assert.equal(linksOutput.length, 0);
{{else}}
assert.equal(linksOutput.size, 0);
{{/if}}

// Alice creates a link from {{pascal_case from_referenceable.name}} to {{pascal_case to_referenceable.name}}
await alice.store.client.add{{pascal_case to_referenceable.name}}For{{pascal_case from_referenceable.name}}(baseAddress, targetAddress);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async fn link_a_{{snake_case from_referenceable.name}}_to_a_{{snake_case to_refe
{{/if}}
{{/if}}
{{#if (eq to_referenceable.hash_type "AgentPubKey")}}
let target_address = alice.agentPubKey;
let target_address = alice.agent_pubkey();
{{else}}
let target_record = create_{{snake_case to_referenceable.name}}(&conductors[0], &alice_zome, sample_{{snake_case to_referenceable.name}}_1(&conductors[0], &alice_zome).await).await;
{{#if (eq to_referenceable.hash_type "EntryHash")}}
Expand Down

0 comments on commit aefe91a

Please sign in to comment.