Skip to content

Commit

Permalink
BC-2936 Dynamic selector for task tests (#3533)
Browse files Browse the repository at this point in the history
  • Loading branch information
UzaeirKhan authored Nov 4, 2024
1 parent d4594ec commit ae89485
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
8 changes: 5 additions & 3 deletions views/lib/components/files-storage/files-card.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
tabindex="0"
aria-label="{{$t "files.label.clickToOpenFile" (dict "name" this.name)}}"
role="button">
<div class="card-title" data-testid="file-title-card">
<div class="card-title" data-testid="file-title-card-{{fileIndex}}">
<div class="file-preview-wrapper col-sm-1 no-padding hidden-xs-down">
<div class="file-preview" style="background-image: url({{getThumbnailIcon this.name}}); -webkit-background-size: 25px ;background-size: 25px;"></div>
</div>
Expand All @@ -37,7 +37,7 @@
data-file-name="{{../this.name}}"
class="file-btn"
data-method="download"
data-testid="file-download-btn"
data-testid="file-download-btn-{{../fileIndex}}"
title="{{$t "files.label.downloadFile"}}">
<i aria-hidden="true" class="fa fa-cloud-download"></i>
</button>
Expand All @@ -48,13 +48,15 @@
data-file-id="{{../this.id}}"
data-file-name="{{../this.name}}"
title="{{$t "files.label.renameFile"}}"
class="file-btn fa fa-edit file-name-edit">
class="file-btn fa fa-edit file-name-edit"
data-testid="file-rename-btn-{{../fileIndex}}">
</button>
{{/userHasPermission}}
{{#userHasPermission "FILESTORAGE_REMOVE"}}
<button
class="file-btn"
data-method="delete"
data-testid="file-delete-btn-{{../fileIndex}}"
title="{{$t "files.label.deleteFile"}}"
data-file-id="{{../this.id}}"
data-file-name="{{../this.name}}">
Expand Down
2 changes: 1 addition & 1 deletion views/lib/components/files-storage/files-grid.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="row">
{{#each files}}
<div class="col-sm-12">
{{> "lib/components/files-storage/files-card" readonly=../readonly}}
{{> "lib/components/files-storage/files-card" readonly=../readonly fileIndex=@index}}
</div>
{{/each}}
</div>
Expand Down
17 changes: 9 additions & 8 deletions views/lib/components/files-storage/forms/form-name-edit.hbs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<div class="form-group">
<label for="newNameInput">{{$t "files.label.chooseANewName"}}</label>
<input id="newNameInput" class="form-control" type="text" />
<input
id="fileRecordId"
class="form-control"
type="hidden"
/>
<div class='form-group'>
<label for='newNameInput'>{{$t 'files.label.chooseANewName'}}</label>
<input
id='newNameInput'
data-testid='rename-file-input'
class='form-control'
type='text'
/>
<input id='fileRecordId' class='form-control' type='hidden' />
</div>
4 changes: 2 additions & 2 deletions views/teams/team.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,13 @@
{{#embed "lib/components/modal-form" class="create-event-modal" action=../createEventAction collapseId=1
userId=../userId teamId=../teamId}}
{{#content "fields"}}
{{> "calendar/forms/form-create-event" showVideoconferenceOption=@root.showVideoconferenceOption}}
{{> "calendar/forms/form-create-event" showVideoconferenceOption=@root.showVideoconferenceOption testIdPrefix="create"}}
{{/content}}
{{/embed}}

{{#embed "lib/components/modal-form" method="put" action="/calendar/events/" class="edit-event-modal"}}
{{#content "fields"}}
{{> "calendar/forms/form-create-event" collapseIdCourse="4" collapseIdTeam="5"}}
{{> "calendar/forms/form-create-event" collapseIdCourse="4" collapseIdTeam="5" testIdPrefix="edit"}}
{{/content}}
{{#content "additional-actions"}}
<button type="button" class="btn btn-primary btn-danger btn-delete pull-left" data-testid="delete_team_event">
Expand Down

0 comments on commit ae89485

Please sign in to comment.