Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Add binding validation on fetch bindings #1381

Merged
merged 5 commits into from
Mar 10, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
324 changes: 324 additions & 0 deletions src/reducers/entities/__snapshots__/apps.test.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,324 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`bindings Invalid channel header get filtered 1`] = `
Object {
"bindings": Array [
Object {
"app_id": "1",
"bindings": Array [
Object {
"app_id": "1",
"bindings": undefined,
"call": Object {},
"label": "a",
"location": "/post_menu/locA",
},
],
"call": Object {},
"location": "/post_menu",
},
Object {
"app_id": "2",
"bindings": Array [
Object {
"app_id": "2",
"bindings": undefined,
"call": Object {},
"label": "a",
"location": "/post_menu/locA",
},
],
"call": Object {},
"location": "/post_menu",
},
Object {
"app_id": "1",
"bindings": Array [
Object {
"app_id": "1",
"bindings": undefined,
"call": Object {},
"icon": "icon",
"label": "b",
"location": "/channel_header/locB",
},
],
"call": Object {},
"location": "/channel_header",
},
Object {
"app_id": "2",
"bindings": Array [
Object {
"app_id": "2",
"bindings": undefined,
"call": Object {},
"icon": "icon",
"label": "c",
"location": "/channel_header/locC",
},
],
"call": Object {},
"location": "/channel_header",
},
Object {
"app_id": "3",
"bindings": Array [],
"location": "/channel_header",
},
Object {
"app_id": "3",
"bindings": Array [
Object {
"app_id": "3",
"bindings": undefined,
"call": Object {},
"label": "c",
"location": "/command/locC",
},
],
"call": Object {},
"location": "/command",
},
],
}
`;

exports[`bindings Invalid commands get filtered 1`] = `
Object {
"bindings": Array [
Object {
"app_id": "1",
"bindings": Array [
Object {
"app_id": "1",
"bindings": undefined,
"call": Object {},
"label": "a",
"location": "/post_menu/locA",
},
Object {
"app_id": "1",
"bindings": undefined,
"call": Object {},
"label": "a",
"location": "/post_menu/locB",
},
],
"call": Object {},
"location": "/post_menu",
},
Object {
"app_id": "1",
"bindings": Array [
Object {
"app_id": "1",
"bindings": undefined,
"call": Object {},
"icon": "icon",
"label": "b",
"location": "/channel_header/locB",
},
],
"call": Object {},
"location": "/channel_header",
},
Object {
"app_id": "3",
"bindings": Array [
Object {
"app_id": "3",
"bindings": Array [
Object {
"app_id": "3",
"bindings": undefined,
"call": Object {},
"label": "c2",
"location": "/command/locC/subC2",
},
],
"call": Object {},
"label": "c",
"location": "/command/locC",
},
],
"call": Object {},
"location": "/command",
},
Object {
"app_id": "1",
"bindings": Array [],
"location": "/command",
},
Object {
"app_id": "2",
"bindings": Array [
Object {
"app_id": "2",
"bindings": Array [
Object {
"app_id": "2",
"bindings": undefined,
"call": Object {},
"label": "c1",
"location": "/command/locC/subC1",
},
Object {
"app_id": "2",
"bindings": undefined,
"call": Object {},
"label": "c2",
"location": "/command/locC/subC2",
},
],
"call": Object {},
"label": "c",
"location": "/command/locC",
},
],
"call": Object {},
"location": "/command",
},
],
}
`;

exports[`bindings Invalid post menu get filtered 1`] = `
Object {
"bindings": Array [
Object {
"app_id": "1",
"bindings": Array [
Object {
"app_id": "1",
"bindings": undefined,
"call": Object {},
"label": "a",
"location": "/post_menu/locB",
},
],
"call": Object {},
"location": "/post_menu",
},
Object {
"app_id": "2",
"bindings": Array [
Object {
"app_id": "2",
"bindings": undefined,
"call": Object {},
"label": "a",
"location": "/post_menu/locA",
},
Object {
"app_id": "2",
"bindings": undefined,
"call": Object {},
"label": "b",
"location": "/post_menu/locB",
},
],
"call": Object {},
"location": "/post_menu",
},
Object {
"app_id": "3",
"bindings": Array [],
"location": "/post_menu",
},
Object {
"app_id": "1",
"bindings": Array [
Object {
"app_id": "1",
"bindings": undefined,
"call": Object {},
"icon": "icon",
"label": "b",
"location": "/channel_header/locB",
},
],
"call": Object {},
"location": "/channel_header",
},
Object {
"app_id": "3",
"bindings": Array [
Object {
"app_id": "3",
"bindings": undefined,
"call": Object {},
"label": "c",
"location": "/command/locC",
},
],
"call": Object {},
"location": "/command",
},
],
}
`;

exports[`bindings No element get filtered 1`] = `
Object {
"bindings": Array [
Object {
"app_id": "1",
"bindings": Array [
Object {
"app_id": "1",
"bindings": undefined,
"call": Object {},
"label": "a",
"location": "/post_menu/locA",
},
],
"call": Object {},
"location": "/post_menu",
},
Object {
"app_id": "2",
"bindings": Array [
Object {
"app_id": "2",
"bindings": undefined,
"call": Object {},
"label": "a",
"location": "/post_menu/locA",
},
],
"call": Object {},
"location": "/post_menu",
},
Object {
"app_id": "1",
"bindings": Array [
Object {
"app_id": "1",
"bindings": undefined,
"call": Object {},
"icon": "icon",
"label": "b",
"location": "/channel_header/locB",
},
],
"call": Object {},
"location": "/channel_header",
},
Object {
"app_id": "3",
"bindings": Array [
Object {
"app_id": "3",
"bindings": undefined,
"call": Object {},
"label": "c",
"location": "/command/locC",
},
],
"call": Object {},
"location": "/command",
},
],
}
`;
Loading