Skip to content

Commit fdca5cf

Browse files
authored
Remove superfluous test attributes (#5927)
I found while working on #5926 that x-icon already adds assertion-compatible selectors, so these wrappers are unnecessary.
1 parent 42a53ff commit fdca5cf

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

ui/app/templates/allocations/allocation/task/fs.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<tbody>
4646
<tr data-test-entry>
4747
<td colspan="3">
48-
<span data-test-empty-icon>{{x-icon "alert-circle-outline"}}</span>
48+
{{x-icon "alert-circle-outline"}}
4949
<span class="name" data-test-name>Directory is empty</span>
5050
</td>
5151
</tr>

ui/app/templates/components/fs-directory-entry.hbs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<td>
33
{{#link-to "allocations.allocation.task.fs" task.allocation task pathToEntry activeClass="is-active"}}
44
{{#if entry.IsDir}}
5-
<span data-test-directory-icon>{{x-icon "folder-outline"}}</span>
5+
{{x-icon "folder-outline"}}
66
{{else}}
7-
<span data-test-file-icon>{{x-icon "file-outline"}}</span>
7+
{{x-icon "file-outline"}}
88
{{/if}}
99

1010
<span class="name" data-test-name>{{entry.Name}}</span>

ui/tests/pages/allocations/task/fs.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ export default create({
2828
directoryEntries: collection('[data-test-entry]', {
2929
name: text('[data-test-name]'),
3030

31-
isFile: isPresent('[data-test-file-icon]'),
32-
isDirectory: isPresent('[data-test-directory-icon]'),
33-
isEmpty: isPresent('[data-test-empty-icon]'),
31+
isFile: isPresent('.icon-is-file-outline'),
32+
isDirectory: isPresent('.icon-is-folder-outline'),
33+
isEmpty: isPresent('.icon-is-alert-circle-outline'),
3434

3535
size: text('[data-test-size]'),
3636
lastModified: text('[data-test-last-modified]'),

0 commit comments

Comments
 (0)