Skip to content

Commit 3c20943

Browse files
added tests to check for proper arrow icon
1 parent bbc58fa commit 3c20943

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

packages/frontend/tests/integration/components/program-year/collapsed-objectives-test.gjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ module('Integration | Component | program-year/collapsed-objectives', function (
4343
);
4444

4545
assert.strictEqual(component.title, 'Objectives (4)');
46+
assert.ok(component.hasExpandIcon);
4647
assert.strictEqual(component.objectiveCount, 'There are 4 objectives');
4748
assert.strictEqual(component.parentCount, '1 has a linked competency');
4849
assert.strictEqual(component.meshCount, '1 has MeSH');

packages/frontend/tests/integration/components/program-year/objectives-test.gjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ module('Integration | Component | program-year/objectives', function (hooks) {
4242
</template>,
4343
);
4444

45+
assert.ok(component.hasCollapseIcon);
4546
assert.strictEqual(component.objectiveList.objectives.length, 2);
4647
assert.strictEqual(
4748
component.objectiveList.objectives[0].description.text,

packages/frontend/tests/pages/components/program-year/collapsed-objectives.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { create, collection, clickable, hasClass, text } from 'ember-cli-page-ob
33
const definition = {
44
scope: '[data-test-program-year-collapsed-objectives]',
55
title: text('[data-test-title]'),
6+
hasExpandIcon: hasClass('fa-caret-right', '[data-test-title] svg'),
67
expand: clickable('[data-test-title]'),
78
headers: collection('thead th'),
89
objectiveCount: text('[data-test-objective-count]'),

packages/frontend/tests/pages/components/program-year/objectives.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import { clickable, create, text } from 'ember-cli-page-object';
1+
import { clickable, create, hasClass, text } from 'ember-cli-page-object';
22
import newObjective from 'ilios-common/page-objects/components/new-objective';
33
import objectiveList from './objective-list';
44

55
const definition = {
66
scope: '[data-test-program-year-objectives]',
77
title: text('[data-test-title]'),
8+
hasCollapseIcon: hasClass('fa-caret-down', '[data-test-title] svg'),
89
createNew: clickable('[data-test-actions] [data-test-expand-collapse-button] button'),
910
newObjective,
1011
objectiveList,

0 commit comments

Comments
 (0)