Skip to content

Commit

Permalink
Block ID is not an integer but UUID
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric committed Oct 28, 2022
1 parent 88a7579 commit a9b9620
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions components/block/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('ngl-block', () => {
},
});

const element = await fixture(html`<ngl-block blockId="1"></ngl-block>`);
const element = await fixture(html`<ngl-block blockId="dfc6a013-75ee-4076-b228-050e28c0b0c0"></ngl-block>`);

assert.shadowDom.equal(
element,
Expand Down Expand Up @@ -75,7 +75,7 @@ describe('ngl-block', () => {
},
});

const element = await fixture(html`<ngl-block blockId="1"></ngl-block>`);
const element = await fixture(html`<ngl-block blockId="dfc6a013-75ee-4076-b228-050e28c0b0c0"></ngl-block>`);

assert.shadowDom.equal(
element,
Expand All @@ -102,7 +102,7 @@ describe('ngl-block', () => {
},
});

const element = await fixture(html`<ngl-block blockId="1"></ngl-block>`);
const element = await fixture(html`<ngl-block blockId="dfc6a013-75ee-4076-b228-050e28c0b0c0"></ngl-block>`);

assert.shadowDom.equal(
element,
Expand Down Expand Up @@ -132,12 +132,12 @@ describe('ngl-block', () => {
},
});

const element = await fixture(html`<ngl-block blockId="1"></ngl-block>`);
const element = await fixture(html`<ngl-block blockId="dfc6a013-75ee-4076-b228-050e28c0b0c0"></ngl-block>`);

// Here we stub method fetch to return our test HTML
sinon
.stub(element, 'fetch')
.resolves('<ngl-block blockId="1">Hello world</ngl-block>');
.resolves('<ngl-block blockId="dfc6a013-75ee-4076-b228-050e28c0b0c0">Hello world</ngl-block>');

await element.refresh();

Expand Down
4 changes: 2 additions & 2 deletions dev/ngl-block.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<body>
<h1>Demos</h1>

<ngl-block blockId="1">
<ngl-block blockId="dfc6a013-75ee-4076-b228-050e28c0b0c0">
<div class="ngl-block">
<h1>This is inner content of block 1</h1>
<p>
Expand All @@ -47,7 +47,7 @@ <h1>This is inner content of block 1</h1>
</div>
</ngl-block>

<ngl-block blockId="2">
<ngl-block blockId="7513c0d8-55f6-4853-a552-3a19a9323aee">
<div class="ngl-block">
<h1>This is inner content of block 2</h1>
<p>
Expand Down

0 comments on commit a9b9620

Please sign in to comment.