@capillarytech/creatives-library 7.17.63 → 7.17.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1016,7 +1016,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
1016
1016
|
} = {},
|
|
1017
1017
|
} = {},
|
|
1018
1018
|
} = {},
|
|
1019
|
-
} = template;
|
|
1019
|
+
} = template || {};
|
|
1020
1020
|
if (this.props.isFullMode && !this.props.isDltFromRcs && !(this.state.channel.toUpperCase() === WHATSAPP && status === WHATSAPP_STATUSES.approved) && !(this.state.hostName === HOST_GUPSHUP)) {
|
|
1021
1021
|
templateData.extra.push(<CapDropdown
|
|
1022
1022
|
overlay={
|
|
@@ -89,10 +89,10 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
89
89
|
|
|
90
90
|
// we only show channels which other than commonChannels
|
|
91
91
|
// if it is coming in enableNewChannels array
|
|
92
|
-
filteredPanes.filter((item) => {
|
|
92
|
+
filteredPanes = filteredPanes.filter((item) => {
|
|
93
93
|
const channel = item.key;
|
|
94
94
|
if (!commonChannels.includes(channel)) {
|
|
95
|
-
return
|
|
95
|
+
return enableNewChannels.includes(channel.toUpperCase());
|
|
96
96
|
}
|
|
97
97
|
return true;
|
|
98
98
|
});
|
|
@@ -77,7 +77,9 @@ describe("Test TemplatesV2", () => {
|
|
|
77
77
|
expect(getByText('Email')).toBeInTheDocument();
|
|
78
78
|
expect(getByText('Line')).toBeInTheDocument();
|
|
79
79
|
expect(getByText('Gallery')).toBeInTheDocument();
|
|
80
|
-
expect(queryByText('RCS')).
|
|
80
|
+
expect(queryByText('RCS')).not.toBeInTheDocument();
|
|
81
|
+
expect(queryByText('WhatsApp')).not.toBeInTheDocument();
|
|
82
|
+
expect(queryByText('Zalo')).not.toBeInTheDocument();
|
|
81
83
|
});
|
|
82
84
|
|
|
83
85
|
it("Should show all other channels", () => {
|