Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BC-2936 Dynamic selector for task tests #3533

Merged
merged 6 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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-{{@index}}">
UzaeirKhan marked this conversation as resolved.
Show resolved Hide resolved
<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-{{@index}}"
UzaeirKhan marked this conversation as resolved.
Show resolved Hide resolved
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-{{@index}}">
UzaeirKhan marked this conversation as resolved.
Show resolved Hide resolved
</button>
{{/userHasPermission}}
{{#userHasPermission "FILESTORAGE_REMOVE"}}
<button
class="file-btn"
data-method="delete"
data-testid="file-delete-btn-{{@index}}"
UzaeirKhan marked this conversation as resolved.
Show resolved Hide resolved
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 index=@index}}
UzaeirKhan marked this conversation as resolved.
Show resolved Hide resolved
</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" [email protected]}}
{{> "calendar/forms/form-create-event" [email protected] testIdPrefix="create"}}
UzaeirKhan marked this conversation as resolved.
Show resolved Hide resolved
{{/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
Loading