Skip to content

Commit

Permalink
fix(beta): fix api incompatibilities in elements for native integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
pheekus committed Jan 27, 2024
1 parent 7249fd8 commit e291acc
Show file tree
Hide file tree
Showing 10 changed files with 318 additions and 341 deletions.
44 changes: 22 additions & 22 deletions custom-elements.json
Original file line number Diff line number Diff line change
Expand Up @@ -17640,70 +17640,70 @@
"name": "webhook-legacy-xml-url:after"
},
{
"name": "webhook-webflow-site-id:before"
"name": "webflow-site-id:before"
},
{
"name": "webhook-webflow-site-id:after"
"name": "webflow-site-id:after"
},
{
"name": "webhook-webflow-site-name:before"
"name": "webflow-site-name:before"
},
{
"name": "webhook-webflow-site-name:after"
"name": "webflow-site-name:after"
},
{
"name": "webhook-webflow-collection-id:before"
"name": "webflow-collection-id:before"
},
{
"name": "webhook-webflow-collection-id:after"
"name": "webflow-collection-id:after"
},
{
"name": "webhook-webflow-collection-name:before"
"name": "webflow-collection-name:before"
},
{
"name": "webhook-webflow-collection-name:after"
"name": "webflow-collection-name:after"
},
{
"name": "webhook-webflow-sku-field-id:before"
"name": "webflow-sku-field-id:before"
},
{
"name": "webhook-webflow-sku-field-id:after"
"name": "webflow-sku-field-id:after"
},
{
"name": "webhook-webflow-sku-field-name:before"
"name": "webflow-sku-field-name:before"
},
{
"name": "webhook-webflow-sku-field-name:after"
"name": "webflow-sku-field-name:after"
},
{
"name": "webhook-webflow-inventory-field-id:before"
"name": "webflow-inventory-field-id:before"
},
{
"name": "webhook-webflow-inventory-field-id:after"
"name": "webflow-inventory-field-id:after"
},
{
"name": "webhook-webflow-inventory-field-name:before"
"name": "webflow-inventory-field-name:before"
},
{
"name": "webhook-webflow-inventory-field-name:after"
"name": "webflow-inventory-field-name:after"
},
{
"name": "webhook-webflow-auth:before"
"name": "webflow-auth:before"
},
{
"name": "webhook-webflow-auth:after"
"name": "webflow-auth:after"
},
{
"name": "webhook-zapier-event:before"
"name": "zapier-event:before"
},
{
"name": "webhook-zapier-event:after"
"name": "zapier-event:after"
},
{
"name": "webhook-zapier-url:before"
"name": "zapier-url:before"
},
{
"name": "webhook-zapier-url:after"
"name": "zapier-url:after"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ describe('NativeIntegrationCard', () => {
it('renders line 1 text for zapier when loaded', async () => {
const data = await getTestData<Data>('./hapi/native_integrations/0');

data.provider = 'webhook';
data.config = JSON.stringify(defaults.webhookZapier);
data.provider = 'zapier';
data.config = JSON.stringify(defaults.zapier);

const card = await fixture<Card>(html`
<foxy-native-integration-card .data=${data}></foxy-native-integration-card>
Expand All @@ -103,8 +103,8 @@ describe('NativeIntegrationCard', () => {
it('renders line 1 text for webflow when loaded', async () => {
const data = await getTestData<Data>('./hapi/native_integrations/0');

data.provider = 'webhook';
data.config = JSON.stringify(defaults.webhookWebflow);
data.provider = 'webflow';
data.config = JSON.stringify(defaults.webflow);

const card = await fixture<Card>(html`
<foxy-native-integration-card .data=${data}></foxy-native-integration-card>
Expand Down Expand Up @@ -205,8 +205,8 @@ describe('NativeIntegrationCard', () => {
it('renders line 2 text for zapier when loaded', async () => {
const data = await getTestData<Data>('./hapi/native_integrations/0');

data.provider = 'webhook';
data.config = JSON.stringify(defaults.webhookZapier);
data.provider = 'zapier';
data.config = JSON.stringify(defaults.zapier);

const card = await fixture<Card>(html`
<foxy-native-integration-card .data=${data}></foxy-native-integration-card>
Expand All @@ -215,14 +215,14 @@ describe('NativeIntegrationCard', () => {

expect(text).to.exist;
expect(text).to.have.attribute('infer', '');
expect(text).to.have.deep.property('options', defaults.webhookZapier);
expect(text).to.have.deep.property('options', defaults.zapier);
});

it('renders line 2 text for webflow when loaded', async () => {
const data = await getTestData<Data>('./hapi/native_integrations/0');

data.provider = 'webhook';
data.config = JSON.stringify(defaults.webhookWebflow);
data.provider = 'webflow';
data.config = JSON.stringify(defaults.webflow);

const card = await fixture<Card>(html`
<foxy-native-integration-card .data=${data}></foxy-native-integration-card>
Expand All @@ -231,7 +231,7 @@ describe('NativeIntegrationCard', () => {

expect(text).to.exist;
expect(text).to.have.attribute('infer', '');
expect(text).to.have.deep.property('options', defaults.webhookWebflow);
expect(text).to.have.deep.property('options', defaults.webflow);
});

it('renders line 2 text for legacy json webhook when loaded', async () => {
Expand Down
33 changes: 7 additions & 26 deletions src/elements/public/NativeIntegrationCard/NativeIntegrationCard.ts

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ const summary: Summary = {
'webhook-json-events',
'webhook-legacy-xml-title',
'webhook-legacy-xml-url',
'webhook-webflow-site-id',
'webhook-webflow-site-name',
'webhook-webflow-collection-id',
'webhook-webflow-collection-name',
'webhook-webflow-sku-field-id',
'webhook-webflow-sku-field-name',
'webhook-webflow-inventory-field-id',
'webhook-webflow-inventory-field-name',
'webhook-webflow-auth',
'webhook-zapier-event',
'webhook-zapier-url',
'webflow-site-id',
'webflow-site-name',
'webflow-collection-id',
'webflow-collection-name',
'webflow-sku-field-id',
'webflow-sku-field-name',
'webflow-inventory-field-id',
'webflow-inventory-field-name',
'webflow-auth',
'zapier-event',
'zapier-url',
],
},
};
Expand Down
Loading

0 comments on commit e291acc

Please sign in to comment.