|
| 1 | +// Jest Snapshot v1, https://goo.gl/fbAQLP |
| 2 | + |
| 3 | +exports[`Header renders correctly with basic props 1`] = ` |
| 4 | +<div |
| 5 | + className="auth0-lock-header" |
| 6 | +> |
| 7 | + <div |
| 8 | + className="auth0-lock-header-bg auth0-lock-blur-support" |
| 9 | + > |
| 10 | + <div |
| 11 | + className="auth0-lock-header-bg-blur auth0-lock-no-grayscale" |
| 12 | + style={ |
| 13 | + Object { |
| 14 | + "backgroundImage": "url('some-image.png')", |
| 15 | + } |
| 16 | + } |
| 17 | + /> |
| 18 | + <div |
| 19 | + className="auth0-lock-header-bg-solid" |
| 20 | + style={ |
| 21 | + Object { |
| 22 | + "backgroundColor": "red", |
| 23 | + } |
| 24 | + } |
| 25 | + /> |
| 26 | + </div> |
| 27 | + <div |
| 28 | + className="auth0-lock-header-welcome" |
| 29 | + > |
| 30 | + <div |
| 31 | + className="auth0-lock-firstname" |
| 32 | + title="Header" |
| 33 | + > |
| 34 | + Header |
| 35 | + </div> |
| 36 | + </div> |
| 37 | +</div> |
| 38 | +`; |
| 39 | + |
| 40 | +exports[`Header sets the header size property on the document element 1`] = ` |
| 41 | +<div |
| 42 | + className="auth0-lock-header" |
| 43 | +> |
| 44 | + <div |
| 45 | + className="auth0-lock-header-bg auth0-lock-blur-support" |
| 46 | + > |
| 47 | + <div |
| 48 | + className="auth0-lock-header-bg-blur auth0-lock-no-grayscale" |
| 49 | + style={ |
| 50 | + Object { |
| 51 | + "backgroundImage": "url('some-image.png')", |
| 52 | + } |
| 53 | + } |
| 54 | + /> |
| 55 | + <div |
| 56 | + className="auth0-lock-header-bg-solid" |
| 57 | + style={ |
| 58 | + Object { |
| 59 | + "backgroundColor": "red", |
| 60 | + } |
| 61 | + } |
| 62 | + /> |
| 63 | + </div> |
| 64 | + <div |
| 65 | + className="auth0-lock-header-welcome" |
| 66 | + > |
| 67 | + <div |
| 68 | + className="auth0-lock-firstname" |
| 69 | + title="Header" |
| 70 | + > |
| 71 | + Header |
| 72 | + </div> |
| 73 | + </div> |
| 74 | +</div> |
| 75 | +`; |
| 76 | + |
| 77 | +exports[`Header shows the back button when there is a handler 1`] = ` |
| 78 | +<div |
| 79 | + className="auth0-lock-header" |
| 80 | +> |
| 81 | + <span |
| 82 | + aria-label="back" |
| 83 | + className="auth0-lock-back-button" |
| 84 | + dangerouslySetInnerHTML={ |
| 85 | + Object { |
| 86 | + "__html": "<svg aria-hidden=\\"true\\" focusable=\\"false\\" enable-background=\\"new 0 0 24 24\\" version=\\"1.0\\" viewBox=\\"0 0 24 24\\" xml:space=\\"preserve\\" xmlns=\\"http://www.w3.org/2000/svg\\" xmlns:xlink=\\"http://www.w3.org/1999/xlink\\"> <polyline fill=\\"none\\" points=\\"12.5,21 3.5,12 12.5,3 \\" stroke=\\"#000000\\" stroke-miterlimit=\\"10\\" stroke-width=\\"2\\"></polyline> <line fill=\\"none\\" stroke=\\"#000000\\" stroke-miterlimit=\\"10\\" stroke-width=\\"2\\" x1=\\"22\\" x2=\\"3.5\\" y1=\\"12\\" y2=\\"12\\"></line> </svg>", |
| 87 | + } |
| 88 | + } |
| 89 | + id="undefined-back-button" |
| 90 | + onClick={[Function]} |
| 91 | + onKeyPress={[Function]} |
| 92 | + role="button" |
| 93 | + tabIndex={0} |
| 94 | + /> |
| 95 | + <div |
| 96 | + className="auth0-lock-header-bg auth0-lock-blur-support" |
| 97 | + > |
| 98 | + <div |
| 99 | + className="auth0-lock-header-bg-blur auth0-lock-no-grayscale" |
| 100 | + style={ |
| 101 | + Object { |
| 102 | + "backgroundImage": "url('some-image.png')", |
| 103 | + } |
| 104 | + } |
| 105 | + /> |
| 106 | + <div |
| 107 | + className="auth0-lock-header-bg-solid" |
| 108 | + style={ |
| 109 | + Object { |
| 110 | + "backgroundColor": "red", |
| 111 | + } |
| 112 | + } |
| 113 | + /> |
| 114 | + </div> |
| 115 | + <div |
| 116 | + className="auth0-lock-header-welcome" |
| 117 | + > |
| 118 | + <div |
| 119 | + className="auth0-lock-firstname" |
| 120 | + title="Header" |
| 121 | + > |
| 122 | + Header |
| 123 | + </div> |
| 124 | + </div> |
| 125 | +</div> |
| 126 | +`; |
| 127 | + |
| 128 | +exports[`Header shows the logoUrl when there is no name 1`] = ` |
| 129 | +<div |
| 130 | + className="auth0-lock-header" |
| 131 | +> |
| 132 | + <div |
| 133 | + className="auth0-lock-header-bg auth0-lock-blur-support" |
| 134 | + > |
| 135 | + <div |
| 136 | + className="auth0-lock-header-bg-blur" |
| 137 | + style={ |
| 138 | + Object { |
| 139 | + "backgroundImage": "url('some-image.png')", |
| 140 | + } |
| 141 | + } |
| 142 | + /> |
| 143 | + <div |
| 144 | + className="auth0-lock-header-bg-solid" |
| 145 | + style={ |
| 146 | + Object { |
| 147 | + "backgroundColor": "red", |
| 148 | + } |
| 149 | + } |
| 150 | + /> |
| 151 | + </div> |
| 152 | + <div |
| 153 | + className="auth0-lock-header-welcome" |
| 154 | + > |
| 155 | + <img |
| 156 | + alt="" |
| 157 | + className="auth0-lock-header-logo" |
| 158 | + src="some-logo.png" |
| 159 | + /> |
| 160 | + <div |
| 161 | + className="auth0-lock-name" |
| 162 | + title="This is the header" |
| 163 | + > |
| 164 | + This is the header |
| 165 | + </div> |
| 166 | + </div> |
| 167 | +</div> |
| 168 | +`; |
0 commit comments