Skip to content

Commit 33c03fd

Browse files
committed
fix: follow (and understand) custom-element HTML spec
1 parent 86d50d2 commit 33c03fd

File tree

5 files changed

+32
-14
lines changed

5 files changed

+32
-14
lines changed

Diff for: packages/ui-predicate-vue/src/UIPredicateComparison.vue renamed to packages/ui-predicate-vue/src/ui-predicate-comparison.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
<div class="ui-predicate--col">
1414
<input type="text" :value="predicate.arguments"></input>
1515
</div>
16-
<UIPredicateOptions :predicate="predicate"></UIPredicateOptions>
16+
<ui-predicate-options :predicate="predicate"></ui-predicate-options>
1717
</div>
1818
</template>
1919

2020
<script>
2121
module.exports = {
22-
name: 'UIPredicateComparison',
22+
name: 'ui-predicate-comparison',
2323
props: {
2424
predicate: {
2525
type: Object,

Diff for: packages/ui-predicate-vue/src/UIPredicateCompound.vue renamed to packages/ui-predicate-vue/src/ui-predicate-compound.vue

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,29 @@
77
<option v-for="logicalType in columns.logicalTypes" :value="logicalType.logicalType_id">{{logicalType.label}}</option>
88
</select>
99
</div>
10-
<UIPredicateOptions :predicate="compound"></UIPredicateOptions>
10+
<ui-predicate-options :predicate="compound"></ui-predicate-options>
1111
</div>
1212

1313
<div class="ui-predicate predicates ui-predicate--row">
1414
<div class="ui-predicate predicate" v-for="(model, index) in compound.predicates">
15-
<UIPredicateCompound
15+
<ui-predicate-compound
1616
v-if="model.$_type === 'CompoundPredicate'"
1717
:compound="model"
1818
:columns="columns"
19-
></UIPredicateCompound>
20-
<UIPredicateComparison
19+
></ui-predicate-compound>
20+
<ui-predicate-comparison
2121
v-if="model.$_type === 'ComparisonPredicate'"
2222
:predicate="model"
2323
:columns="columns"
24-
></UIPredicateComparison>
24+
></ui-predicate-comparison>
2525
</div>
2626
</div>
2727
</div>
2828
</template>
2929

3030
<script>
3131
module.exports = {
32-
name: 'UIPredicateCompound',
32+
name: 'ui-predicate-compound',
3333
props: {
3434
compound: {
3535
type: Object,

Diff for: packages/ui-predicate-vue/src/UIPredicateOptions.vue renamed to packages/ui-predicate-vue/src/ui-predicate-options.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<script>
99
module.exports = {
10-
name: 'UIPredicateOptions',
10+
name: 'ui-predicate-options',
1111
props: {
1212
predicate: {
1313
type: Object,

Diff for: packages/ui-predicate-vue/src/ui-predicate.test.js

+21-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
1-
import { mount } from '@vue/test-utils';
2-
import Component from '..';
1+
import UIPredicateCore, { UIPredicate } from '..';
2+
import a, { mount, createLocalVue, shallow } from '@vue/test-utils';
3+
4+
import DEFAULT_CONFIG from './__fixtures__';
35

46
describe('<ui-predicate/>', () => {
57
describe('minimal-configuration', () => {
6-
it('works', () => {});
8+
// it('requires :config prop', () => {
9+
// expect(() => {
10+
// shallow(UIPredicate, { propsData: { config: DEFAULT_CONFIG } });
11+
// }).toThrow();
12+
// });
13+
14+
it('works', () => {
15+
const localVue = createLocalVue();
16+
localVue.use(UIPredicateCore);
17+
const wrapper = mount(UIPredicate, {
18+
propsData: { config: DEFAULT_CONFIG },
19+
// stubs: UIPredicateCore.components,
20+
localVue,
21+
});
22+
23+
// console.log(wrapper.text());
24+
});
725
});
826
});

Diff for: packages/ui-predicate-vue/src/UIPredicate.vue renamed to packages/ui-predicate-vue/src/ui-predicate.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="">
33
<div class="ui-predicate main">
4-
<UIPredicateCompound v-bind:compound="root" v-bind:columns="columns"></UIPredicateCompound>
4+
<ui-predicate-compound v-bind:compound="root" v-bind:columns="columns"></ui-predicate-compound>
55
</div>
66
</div>
77
</template>
@@ -10,7 +10,7 @@
1010
import { PredicateCore } from 'ui-predicate-core';
1111
1212
module.exports = {
13-
name: 'UIPredicate',
13+
name: 'ui-predicate',
1414
props: {
1515
config: {
1616
type: Object,

0 commit comments

Comments
 (0)