123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269 |
- // Jest Snapshot v1, https://goo.gl/fbAQLP
-
- exports[`#Feature should render correctly 1`] = `
- <div
- className="feature"
- >
- <ul
- className="categories spacer-bottom"
- >
- <li
- key="BitBucket"
- style={
- Object {
- "backgroundColor": "#0000ff",
- }
- }
- >
- BitBucket
- </li>
- </ul>
- <span>
- BitBucket branch decoration
- </span>
- <a
- className="learn-more"
- href="http://example.com"
- rel="noopener noreferrer nofollow"
- target="_blank"
- >
- learn_more
- </a>
- </div>
- `;
-
- exports[`#Feature should render correctly 2`] = `
- <div
- className="feature"
- >
- <ul
- className="categories spacer-bottom"
- >
- <li
- key="Java"
- style={
- Object {
- "backgroundColor": "#ff0000",
- }
- }
- >
- Java
- </li>
- <li
- key="Rules"
- style={
- Object {
- "backgroundColor": "#00ff00",
- }
- }
- >
- Rules
- </li>
- </ul>
- <span>
- 10 new Java rules
- </span>
- </div>
- `;
-
- exports[`#Notification should render correctly 1`] = `
- <div
- className="notifications-sidebar-slice"
- >
- <h4>
- <DateFormatter
- date="2018-04-05"
- long={false}
- />
- </h4>
- <Feature
- feature={
- Object {
- "categories": Array [
- Object {
- "color": "#0000ff",
- "name": "BitBucket",
- },
- ],
- "description": "BitBucket branch decoration",
- "readMore": "http://example.com",
- }
- }
- key="0"
- />
- </div>
- `;
-
- exports[`#Notification should render correctly 2`] = `
- <div
- className="notifications-sidebar-slice unread"
- >
- <h4>
- <DateFormatter
- date="2018-04-05"
- long={false}
- />
- </h4>
- <Feature
- feature={
- Object {
- "categories": Array [
- Object {
- "color": "#0000ff",
- "name": "BitBucket",
- },
- ],
- "description": "BitBucket branch decoration",
- "readMore": "http://example.com",
- }
- }
- key="0"
- />
- </div>
- `;
-
- exports[`#NotificationSidebar should render correctly if there are new features 1`] = `
- <Modal
- contentLabel="embed_docs.whats_new"
- onRequestClose={[MockFunction]}
- >
- <div
- className="notifications-sidebar"
- >
- <div
- className="notifications-sidebar-top"
- >
- <h3>
- embed_docs.whats_new
- </h3>
- <ClearButton
- className="button-tiny"
- iconProps={
- Object {
- "size": 12,
- "thin": true,
- }
- }
- onClick={[MockFunction]}
- />
- </div>
- <div
- className="notifications-sidebar-content"
- >
- <div
- className="text-center"
- >
- <DeferredSpinner
- className="big-spacer-top"
- timeout={200}
- />
- </div>
- </div>
- </div>
- </Modal>
- `;
-
- exports[`#NotificationSidebar should render correctly if there are new features 2`] = `
- <Modal
- contentLabel="embed_docs.whats_new"
- onRequestClose={[MockFunction]}
- >
- <div
- className="notifications-sidebar"
- >
- <div
- className="notifications-sidebar-top"
- >
- <h3>
- embed_docs.whats_new
- </h3>
- <ClearButton
- className="button-tiny"
- iconProps={
- Object {
- "size": 12,
- "thin": true,
- }
- }
- onClick={[MockFunction]}
- />
- </div>
- <div
- className="notifications-sidebar-content"
- >
- <Notification
- key="2018-04-06"
- notification={
- Object {
- "features": Array [
- Object {
- "categories": Array [
- Object {
- "color": "#ff0000",
- "name": "Java",
- },
- Object {
- "color": "#00ff00",
- "name": "Rules",
- },
- ],
- "description": "10 new Java rules",
- },
- Object {
- "categories": Array [
- Object {
- "color": "#0000ff",
- "name": "BitBucket",
- },
- ],
- "description": "BitBucket branch decoration",
- "readMore": "http://example.com",
- },
- ],
- "notification": "10 Java rules, Github checks, Security Hotspots, BitBucket branch decoration",
- "publicationDate": "2018-04-06",
- }
- }
- unread={true}
- />
- <Notification
- key="2018-04-05"
- notification={
- Object {
- "features": Array [
- Object {
- "categories": Array [
- Object {
- "color": "#0000ff",
- "name": "BitBucket",
- },
- ],
- "description": "BitBucket branch decoration",
- "readMore": "http://example.com",
- },
- ],
- "notification": "Some other notification",
- "publicationDate": "2018-04-05",
- }
- }
- unread={true}
- />
- </div>
- <div
- className="notifications-sidebar-footer"
- >
- <div
- className="spacer-top note text-center"
- >
- <a
- className="spacer-left"
- href="#"
- onClick={[MockFunction]}
- >
- show_more
- </a>
- </div>
- </div>
- </div>
- </Modal>
- `;
|