Skip to content

Commit

Permalink
test: bring back named node
Browse files Browse the repository at this point in the history
  • Loading branch information
tpluscode committed Nov 28, 2024
1 parent 35d4164 commit ff29f65
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .changeset/wise-pumas-eat.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"@hydrofoil/shaperone-wc": minor
---

Default resource node is now a blank node. Also fixes an issue that the form would not render when the node was `<>` (empty string URI)
Fixes an issue that the form would not render when the node was `<>` (empty string URI)
2 changes: 1 addition & 1 deletion demos/storybook/stories/Simple.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const meta: Meta = {
export default meta

/**
* Without setting the data graph, the form will be empty and a blank node used for focus node.
* Without setting the data graph, the form will be empty and a `<>` IRI used for focus node.
*/
export const EmptyDataGraph: Story = {
name: 'Empty data graph',
Expand Down
2 changes: 1 addition & 1 deletion packages/wc/ShaperoneForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export class ShaperoneForm extends connect(store(), LitElement) {
this[notify] = (detail: any) => {
this.dispatchEvent(new CustomEvent('changed', { detail }))
}
this.resource = this.env.clownface().blankNode()
this.resource = this.env.clownface().namedNode('')
}

async connectedCallback() {
Expand Down
4 changes: 3 additions & 1 deletion packages/wc/test/shaperone-form.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import { id } from '../ShaperoneForm.js'
import { configure } from '../configure.js'

describe('shaperone-form', () => {
before(configure)
before(async () => {
await configure()
})

beforeEach(() => {
setEnv(rdf)
Expand Down

0 comments on commit ff29f65

Please sign in to comment.