Skip to content

Commit

Permalink
modernize component integration test.
Browse files Browse the repository at this point in the history
  • Loading branch information
stopfstedt committed Mar 14, 2024
1 parent a324dc3 commit 97d70e7
Show file tree
Hide file tree
Showing 2 changed files with 184 additions and 139 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import { clickable, collection, fillable, hasClass, notHasClass } from 'ember-cli-page-object';
import {
clickable,
collection,
create,
fillable,
hasClass,
isPresent,
notHasClass,
} from 'ember-cli-page-object';
import userNameInfo from './user-name-info';

export default {
const definition = {
scope: '[data-test-leadership-manager]',
selectedDirectors: collection('[data-test-directors] ul li', {
remove: clickable('.remove'),
}),
directorSearch: {
scope: '[data-test-director-search] [data-test-leadership-search]',
search: fillable('input[type=search]'),
Expand All @@ -23,9 +29,6 @@ export default {
isSelected: notHasClass('clickable'),
}),
},
selectedAdministrators: collection('[data-test-administrators] ul li', {
remove: clickable('.remove'),
}),
studentAdvisorSearch: {
scope: '[data-test-student-advisor-search] [data-test-leadership-search]',
search: fillable('input[type=search]'),
Expand All @@ -35,7 +38,22 @@ export default {
isSelected: notHasClass('clickable'),
}),
},
selectedDirectors: collection('[data-test-directors] ul li', {
userNameInfo,
remove: clickable('.remove'),
isDisabled: isPresent('.disabled-user'),
}),
selectedAdministrators: collection('[data-test-administrators] ul li', {
userNameInfo,
remove: clickable('.remove'),
isDisabled: isPresent('.disabled-user'),
}),
selectedStudentAdvisors: collection('[data-test-student-advisors] ul li', {
userNameInfo,
remove: clickable('.remove'),
isDisabled: isPresent('.disabled-user'),
}),
};

export default definition;
export const component = create(definition);
Loading

0 comments on commit 97d70e7

Please sign in to comment.