mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
fix(many): innerHTML is disabled by default (#27029)
BREAKING CHANGE: The `innerHTMLTemplatesEnabled` Ionic Config now defaults to `false`. Developers can set this option to `true` if they would like to continue to use custom HTML features in `ion-alert`, `ion-infinite-scroll-content`, `ion-loading`, `ion-refresher-content`, and `ion-toast`.
This commit is contained in:
@ -3,7 +3,7 @@ import { RefresherContent } from '../refresher-content';
|
||||
import { config } from '../../../global/config';
|
||||
|
||||
describe('refresher-content: custom html', () => {
|
||||
it('should allow for custom html by default', async () => {
|
||||
it('should not allow for custom html by default', async () => {
|
||||
const page = await newSpecPage({
|
||||
components: [RefresherContent],
|
||||
html: `<ion-refresher-content pulling-text="<button class='custom-pulling-html'>Custom Pulling Text</button>" refreshing-text="<button class='custom-refreshing-html'>Custom Refreshing Text</button>"></ion-refresher-content>`,
|
||||
@ -11,11 +11,11 @@ describe('refresher-content: custom html', () => {
|
||||
|
||||
const pullingContent = page.body.querySelector('.refresher-pulling-text');
|
||||
expect(pullingContent.textContent).toContain('Custom Pulling Text');
|
||||
expect(pullingContent.querySelector('button.custom-pulling-html')).not.toBe(null);
|
||||
expect(pullingContent.querySelector('button.custom-pulling-html')).toBe(null);
|
||||
|
||||
const refreshingContent = page.body.querySelector('.refresher-refreshing-text');
|
||||
expect(refreshingContent.textContent).toContain('Custom Refreshing Text');
|
||||
expect(refreshingContent.querySelector('button.custom-refreshing-html')).not.toBe(null);
|
||||
expect(refreshingContent.querySelector('button.custom-refreshing-html')).toBe(null);
|
||||
});
|
||||
|
||||
it('should allow for custom html', async () => {
|
||||
|
||||
Reference in New Issue
Block a user