UNPKG

@applicaster/zapp-react-native-ui-components

Version:

Applicaster Zapp React Native ui components for the Quick Brick App

56 lines (51 loc) 1.43 kB
import React from "react"; import { shallow } from "enzyme"; import { shallowToJson } from "enzyme-to-json"; import { AudioPlayer } from "../AudioPlayer"; const audioPlayerProps = { audio_item: { title: "tittle", summary: "Summary", content: { src: "https://example.com", }, media_group: [ { type: "audio", media_item: [ { type: "audio", src: "https://example.com", key: "base_code", }, ], }, ], extensions: { audio_player_artwork_aspect_ratio: "1:1", audio_player_background_image: "https://example.com", audio_player_background_color: "black", audio_player_channel_icon: "https://example.com", audio_player_title_color: "white", audio_player_summary_color: "white", audio_player_rtl: true, start_time: "10:10", end_time: "11:11", }, }, plugin_configuration: { audio_player_background_color: "black", audio_player_title_color: "white", audio_player_summary_color: "white", audio_player_rtl: true, audio_player_background_image: "https://example.com", audio_player_artwork_aspect_ratio: "1:1", }, styles: {}, }; describe("<AudioPlayer />", () => { const wrapper = shallow(<AudioPlayer {...audioPlayerProps} />); it("renders correctly", () => { expect(shallowToJson(wrapper)).toMatchSnapshot(); }); });