Tests
This commit is contained in:
		
							parent
							
								
									d30bf89db3
								
							
						
					
					
						commit
						d70d86e940
					
				
					 2 changed files with 7 additions and 13 deletions
				
			
		|  | @ -6,7 +6,8 @@ | ||||||
|         {{on 'blur' @handleBlur}} |         {{on 'blur' @handleBlur}} | ||||||
|         data-action-up |         data-action-up | ||||||
|         role="button" |         role="button" | ||||||
|         class="text-gray-800 outline-none absolute left-0 top-0 p-2 m-4 bg-white rounded-lg border-2 border-gray-800 focus:border-teal-400 shadow-sm"> |         class="text-gray-800 outline-none absolute left-0 top-0 p-2 m-4 bg-white rounded-lg border-2 border-gray-800 focus:border-teal-400 shadow-sm" | ||||||
|  |         data-test-id='sort-down'> | ||||||
|         <svg class="fill-current" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M23.677 18.52c.914 1.523-.183 3.472-1.967 3.472h-19.414c-1.784 0-2.881-1.949-1.967-3.472l9.709-16.18c.891-1.483 3.041-1.48 3.93 0l9.709 16.18z"/></svg> |         <svg class="fill-current" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M23.677 18.52c.914 1.523-.183 3.472-1.967 3.472h-19.414c-1.784 0-2.881-1.949-1.967-3.472l9.709-16.18c.891-1.483 3.041-1.48 3.93 0l9.709 16.18z"/></svg> | ||||||
|       </button> |       </button> | ||||||
|       <button |       <button | ||||||
|  | @ -14,7 +15,8 @@ | ||||||
|         {{on 'blur' @handleBlur}} |         {{on 'blur' @handleBlur}} | ||||||
|         data-action-down |         data-action-down | ||||||
|         role="button" |         role="button" | ||||||
|         class="transform rotate-180 text-gray-800 outline-none absolute left-0 bottom-0 p-2 m-4 bg-white rounded-lg border-2 border-gray-800 focus:border-teal-400 shadow-sm"> |         class="transform rotate-180 text-gray-800 outline-none absolute left-0 bottom-0 p-2 m-4 bg-white rounded-lg border-2 border-gray-800 focus:border-teal-400 shadow-sm" | ||||||
|  |         data-test-id='sort-up'> | ||||||
|         <svg class="fill-current" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M23.677 18.52c.914 1.523-.183 3.472-1.967 3.472h-19.414c-1.784 0-2.881-1.949-1.967-3.472l9.709-16.18c.891-1.483 3.041-1.48 3.93 0l9.709 16.18z"/></svg> |         <svg class="fill-current" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M23.677 18.52c.914 1.523-.183 3.472-1.967 3.472h-19.414c-1.784 0-2.881-1.949-1.967-3.472l9.709-16.18c.891-1.483 3.041-1.48 3.93 0l9.709 16.18z"/></svg> | ||||||
|       </button> |       </button> | ||||||
|     {{/if}} |     {{/if}} | ||||||
|  |  | ||||||
|  | @ -6,21 +6,13 @@ import { hbs } from 'ember-cli-htmlbars'; | ||||||
| module('Integration | Component | sortable-item-accessible', function(hooks) { | module('Integration | Component | sortable-item-accessible', function(hooks) { | ||||||
|   setupRenderingTest(hooks); |   setupRenderingTest(hooks); | ||||||
| 
 | 
 | ||||||
|   test('it renders', async function(assert) { |   test('it can yield text', async function(assert) { | ||||||
|     // Set any properties with this.set('myProperty', 'value');
 |  | ||||||
|     // Handle any actions with this.set('myAction', function(val) { ... });
 |  | ||||||
| 
 |  | ||||||
|     await render(hbs`<SortableItemAccessible />`); |  | ||||||
| 
 |  | ||||||
|     assert.equal(this.element.textContent.trim(), ''); |  | ||||||
| 
 |  | ||||||
|     // Template block usage:
 |  | ||||||
|     await render(hbs` |     await render(hbs` | ||||||
|       <SortableItemAccessible> |       <SortableItemAccessible> | ||||||
|         template block text |         yielded text | ||||||
|       </SortableItemAccessible> |       </SortableItemAccessible> | ||||||
|     `);
 |     `);
 | ||||||
| 
 | 
 | ||||||
|     assert.equal(this.element.textContent.trim(), 'template block text'); |     assert.equal(this.element.textContent.trim(), 'yielded text'); | ||||||
|   }); |   }); | ||||||
| }); | }); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Ava Wroten
						Ava Wroten