@@ -11,8 +11,8 @@ describe('UIButton', () => {
1111
1212 it ( 'creates a button' , ( ) => {
1313 expect ( 'button' ) . toHaveClass ( 'pui-btn' ) ;
14- expect ( 'button' ) . toHaveClass ( 'pui-btn-default' ) ;
15- expect ( 'button' ) . toHaveText ( 'Click here' ) ;
14+ expect ( 'button' ) . toHaveClass ( 'pui-btn-- default' ) ;
15+ expect ( 'button .pui-btn__inner-content ' ) . toHaveText ( 'Click here' ) ;
1616 } ) ;
1717
1818 describe ( 'when href attribute is set' , ( ) => {
@@ -135,7 +135,7 @@ describe('UIButton', () => {
135135 } ) ;
136136
137137 it ( 'adds the kind class to the button' , ( ) => {
138- expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-default' ) ;
138+ expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-- default' ) ;
139139 } ) ;
140140 } ) ;
141141
@@ -145,7 +145,7 @@ describe('UIButton', () => {
145145 } ) ;
146146
147147 it ( 'adds the kind class to the button' , ( ) => {
148- expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-danger' ) ;
148+ expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-- danger' ) ;
149149 } ) ;
150150 } ) ;
151151
@@ -155,7 +155,7 @@ describe('UIButton', () => {
155155 } ) ;
156156
157157 it ( 'adds the kind class to the button' , ( ) => {
158- expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-brand' ) ;
158+ expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-- brand' ) ;
159159 } ) ;
160160 } ) ;
161161
@@ -165,7 +165,7 @@ describe('UIButton', () => {
165165 } ) ;
166166
167167 it ( 'adds the kind class to the button' , ( ) => {
168- expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-primary' ) ;
168+ expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-- primary' ) ;
169169 } ) ;
170170 } ) ;
171171
@@ -175,7 +175,7 @@ describe('UIButton', () => {
175175 } ) ;
176176
177177 it ( 'adds the large button class' , ( ) => {
178- expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-lg' ) ;
178+ expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-- lg' ) ;
179179 } ) ;
180180 } ) ;
181181
@@ -185,7 +185,7 @@ describe('UIButton', () => {
185185 } ) ;
186186
187187 it ( 'adds the large button class' , ( ) => {
188- expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-full' ) ;
188+ expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-- full' ) ;
189189 } ) ;
190190 } ) ;
191191
@@ -195,7 +195,7 @@ describe('UIButton', () => {
195195 } ) ;
196196
197197 it ( 'adds the large button class' , ( ) => {
198- expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-sm' ) ;
198+ expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-- sm' ) ;
199199 } ) ;
200200 } ) ;
201201
@@ -205,7 +205,7 @@ describe('UIButton', () => {
205205 } ) ;
206206
207207 it ( 'adds the large button class' , ( ) => {
208- expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-icon' ) ;
208+ expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-- icon' ) ;
209209 } ) ;
210210 } ) ;
211211
@@ -214,44 +214,8 @@ describe('UIButton', () => {
214214 subject::setProps ( { alt : true } ) ;
215215 } ) ;
216216
217- describe ( 'when kind is default' , ( ) => {
218- beforeEach ( ( ) => {
219- subject::setProps ( { kind : 'default' } ) ;
220- } ) ;
221-
222- it ( 'adds appropriate alt class to the button' , ( ) => {
223- expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-default-alt' ) ;
224- } ) ;
225- } ) ;
226-
227- describe ( 'when kind is danger' , ( ) => {
228- beforeEach ( ( ) => {
229- subject::setProps ( { kind : 'danger' } ) ;
230- } ) ;
231-
232- it ( 'adds appropriate alt class to the button' , ( ) => {
233- expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-danger-alt' ) ;
234- } ) ;
235- } ) ;
236-
237- describe ( 'when kind is brand' , ( ) => {
238- beforeEach ( ( ) => {
239- subject::setProps ( { kind : 'brand' } ) ;
240- } ) ;
241-
242- it ( 'adds appropriate alt class to the button' , ( ) => {
243- expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-brand-alt' ) ;
244- } ) ;
245- } ) ;
246-
247- describe ( 'when kind is primary' , ( ) => {
248- beforeEach ( ( ) => {
249- subject::setProps ( { kind : 'primary' } ) ;
250- } ) ;
251-
252- it ( 'adds appropriate alt class to the button' , ( ) => {
253- expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-primary-alt' ) ;
254- } ) ;
217+ it ( 'adds appropriate alt class to the button' , ( ) => {
218+ expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn--alt' ) ;
255219 } ) ;
256220 } ) ;
257221
@@ -260,44 +224,8 @@ describe('UIButton', () => {
260224 subject::setProps ( { flat : true } ) ;
261225 } ) ;
262226
263- describe ( 'when kind is default' , ( ) => {
264- beforeEach ( ( ) => {
265- subject::setProps ( { kind : 'default' } ) ;
266- } ) ;
267-
268- it ( 'adds appropriate flat class to the button' , ( ) => {
269- expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-default-flat' ) ;
270- } ) ;
271- } ) ;
272-
273- describe ( 'when kind is danger' , ( ) => {
274- beforeEach ( ( ) => {
275- subject::setProps ( { kind : 'danger' } ) ;
276- } ) ;
277-
278- it ( 'adds appropriate flat class to the button' , ( ) => {
279- expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-danger-flat' ) ;
280- } ) ;
281- } ) ;
282-
283- describe ( 'when kind is brand' , ( ) => {
284- beforeEach ( ( ) => {
285- subject::setProps ( { kind : 'brand' } ) ;
286- } ) ;
287-
288- it ( 'adds appropriate flat class to the button' , ( ) => {
289- expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-brand-flat' ) ;
290- } ) ;
291- } ) ;
292-
293- describe ( 'when kind is primary' , ( ) => {
294- beforeEach ( ( ) => {
295- subject::setProps ( { kind : 'primary' } ) ;
296- } ) ;
297-
298- it ( 'adds appropriate flat class to the button' , ( ) => {
299- expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn-primary-flat' ) ;
300- } ) ;
227+ it ( 'adds appropriate flat class to the button' , ( ) => {
228+ expect ( 'button.pui-btn' ) . toHaveClass ( 'pui-btn--flat' ) ;
301229 } ) ;
302230 } ) ;
303231
0 commit comments