Skip to content

Commit

Permalink
BC-6367-Test-implementaion-for-BBB-tool (#3443)
Browse files Browse the repository at this point in the history
* Add data testid to create bbb modal, and delete dynamic naming of data test id for cancel button

* Add data-testid for bbb tool bar


---------

Co-authored-by: wiaderwek <[email protected]>
Co-authored-by: marcinpasscon <[email protected]>
  • Loading branch information
3 people authored May 6, 2024
1 parent 90b9a59 commit 9b14893
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions static/scripts/courses.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ $(document).ready(() => {
e.preventDefault();
const courseId = $(this).parent().attr('data-courseId');
const $createVideoconferenceModal = $('.create-videoconference-modal');
$createVideoconferenceModal.attr('data-testid', 'createVideoConference');

const moderatorCardClickHandler = () => {
$.ajax({
Expand Down
10 changes: 5 additions & 5 deletions views/courses/components/tools.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@


{{#if this.isBBB}}
<div class="card-title-directory bbb-state bbb-guest-inactive-state">
<div class="card-title-directory bbb-state bbb-guest-inactive-state" data-testid="bbb_tool_guest_inactive">
<img src="{{getAssetPath '/images/tools/bbb/not_started.png'}}" class="float-left" style="width:auto; height:75px;" />
<span>{{$t "global.text.videoconferenceNotStartedYet"}}</span>
<a class="bbbTool-info-icon">
Expand All @@ -65,23 +65,23 @@
</a>
</div>

<div class="card-title-directory bbb-state bbb-moderator-inactive-state">
<div class="card-title-directory bbb-state bbb-moderator-inactive-state" data-testid="bbb_tool_moderator_inactive">

<img src="{{getAssetPath '/images/tools/bbb/available.png'}}" class="float-left" style="width:auto; height:75px;" />

<span>{{$t "courses._course.tools.text.videoConferenceBBB"}}</span>

{{#userHasPermission "TOOL_CREATE" }}
{{#unless @root.isArchived}}
<a class="delete-tool" href="/courses/{{../../_id}}/tools/delete/{{../_id}}" target="_blank"
<a class="delete-tool" href="/courses/{{../../_id}}/tools/delete/{{../_id}}" target="_blank" data-testid="bbb_tool_delete"
data-method="DELETE" data-name="{{../name}}" redirect="/courses/{{../../_id}}/?activeTab=tools">
<i class="fa fa-trash-o"></i>
</a>
{{/unless}}
{{/userHasPermission}}
</div>

<div class="card-title-directory bbb-state bbb-running-videoconference-state">
<div class="card-title-directory bbb-state bbb-running-videoconference-state" data-testid="bbb_tool_running">

<img src="{{getAssetPath '/images/tools/bbb/available.png'}}" class="float-left" style="width:auto; height:75px;" />

Expand All @@ -90,7 +90,7 @@

</div>

<div class="card-title-directory bbb-state ">
<div class="card-title-directory bbb-state" data-testid="bbb_tool_not_running">
<img src="{{getAssetPath '/images/tools/bbb/not_started.png'}}" class="float-left" style="width:auto; height:75px;" />
<span>{{$t "courses._course.tools.text.videoConferenceBBB"}}</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion views/lib/components/modal-form.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{{#block "fields"}}{{/block}}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary btn-close" data-testid="btn-cancel-{{title}}">
<button type="button" class="btn btn-secondary btn-close" data-testid="btn-cancel">
{{closeLabel}}
</button>

Expand Down

0 comments on commit 9b14893

Please sign in to comment.