Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
selectPageNumber: fillable('select'),
selectPageNumberDisabled: property('disabled', 'select'),
selectedPageNumber: value('select'),
goToLastPage: clickable('button:eq(3)'),
goToLastPageDisabled: hasClass('disabled', 'button:eq(3)'),
goToNextPage: clickable('button:eq(2)'),
goToNextPageDisabled: hasClass('disabled', 'button:eq(2)'),
goToPrevPage: clickable('button:eq(1)'),
goToPrevPageDisabled: hasClass('disabled', 'button:eq(1)'),
goToFirstPage: clickable('button:eq(0)'),
goToFirstPageDisabled: hasClass('disabled', 'button:eq(0)'),
navigationButtons: text('button', {multiple: true}),
btns: collection('button', {
icon: attribute('class', 'i')
}),
disabledNavigationLinksCount: count('button.disabled')
},
numericNavigation: collection('.table-nav button', {
label: text()
}),
allRows: collection('tbody tr:not(.expand-row)', {
isGroupingRow: getter(function () {
return !!this.cells.toArray().find(c => c.isGroupingRowCell);
}),
cells: collection('td', {
isGroupingRowCell: hasClass('grouping-cell')
})
}),
rows: collection('tbody tr:not(.expand-row):not(.grouping-row)', {
expand: clickable('button.expand-row'),
collapse: clickable('button.collapse-row'),
expanded: hasClass('expanded-row'),
import PageObject, {
text,
count,
collection
} from 'ember-cli-page-object';
export default PageObject.create({
title: text('.FreestyleUsage-title'),
content: text('.FreestyleUsage-rendered'),
numTitles: count('.FreestyleUsage-title'),
numFocusButtons: count('.FreestyleUsage-focusCta'),
numNotesSection: count('.FreestyleUsage-notes'),
numCodeSection: count('.FreestyleUsage-usage'),
notesSection: {
scope: '.FreestyleUsage-notes',
snippets: collection('.FreestyleUsage-snippet')
},
usageSection: {
scope: '.FreestyleUsage-usage',
snippets: collection('.FreestyleUsage-snippet', {
rawText: text('', { normalize: false })
})
}
});
title: text('[data-test-report-title]'),
yearsFilterExists: isPresent('[data-test-year-filter]'),
chooseYear: fillable('[data-test-year-filter]'),
currentYear: value('[data-test-year-filter]'),
results: collection('[data-test-results] li', {
title: text(),
}),
},
newReport: {
scope: '[data-test-new-report]',
setTitle: fillable('[data-test-report-title]'),
chooseSchool: fillable('[data-test-report-school]'),
chooseSubject: fillable('[data-test-report-subject]'),
chooseObjectType: fillable('[data-test-report-object-type]'),
chooseObject: fillable('[data-test-report-object]'),
objectCount: count('[data-test-report-object] option'),
chooseAcademicYear: fillable('[data-test-report-year-filter]'),
fillMeshSearch: fillable('[data-test-mesh-manager] [data-test-search-box] input'),
runMeshSearch: clickable('[data-test-mesh-manager] [data-test-search-box] .search-icon'),
meshSearchResults: collection('[data-test-search-results] li', {
name: text('[data-test-name]'),
pick: clickable()
}),
save: clickable('[data-test-report-save]'),
}
};
export default definition;
export const component = create(definition);
import PageObject, {
text,
count,
collection
} from 'ember-cli-page-object';
export default PageObject.create({
title: text('.FreestyleUsage-title'),
content: text('.FreestyleUsage-rendered'),
numTitles: count('.FreestyleUsage-title'),
numFocusButtons: count('.FreestyleUsage-focusCta'),
numNotesSection: count('.FreestyleUsage-notes'),
numCodeSection: count('.FreestyleUsage-usage'),
notesSection: {
scope: '.FreestyleUsage-notes',
snippets: collection('.FreestyleUsage-snippet')
},
usageSection: {
scope: '.FreestyleUsage-usage',
snippets: collection('.FreestyleUsage-snippet', {
rawText: text('', { normalize: false })
})
}
});
import { collection, count } from 'ember-cli-page-object';
import skillListItem from './skill-list-item';
export default {
scope: 'ul.skills',
listItemCount: count('li'),
listItems: collection('li', skillListItem)
};
itemScope: '[data-test-courses] [data-test-active-row]',
item: {
title: text('td', { at: 0 }),
school: text('td', { at: 1 }),
year: text('td', { at: 2 }),
level: text('td', { at: 3 }),
startDate: text('td', { at: 4 }),
endDate: text('td', { at: 5 }),
status: text('td', { at: 6 }),
isLocked: hasClass('fa-lock', 'svg', {scope: 'td:eq(6)', at: 0}),
isUnlocked: hasClass('fa-unlock', 'svg', {scope: 'td:eq(6)', at: 0}),
lock: clickable('.fa-unlock', {scope: 'td:eq(6)'}),
unLock: clickable('.fa-lock', {scope: 'td:eq(6)'}),
remove: clickable('.remove', {scope: 'td:eq(6)'}),
removeActionCount: count('.remove', {scope: 'td:eq(6)'}),
},
}),
emptyListRowIsVisible: isVisible('[data-test-empty-list]'),
sortByTitle: clickable('th', {scope: '[data-test-ilios-course-list] [data-test-course-headings]', at: 0}),
sortByLevel: clickable('th', {scope: '[data-test-ilios-course-list] [data-test-course-headings]', at: 3}),
sortByStartDate: clickable('th', {scope: '[data-test-ilios-course-list] [data-test-course-headings]', at: 4}),
sortByEndDate: clickable('th', {scope: '[data-test-ilios-course-list] [data-test-course-headings]', at: 5}),
sortByStatus: clickable('th', {scope: '[data-test-ilios-course-list] [data-test-course-headings]', at: 6}),
confirmCourseRemoval: clickable('[data-test-courses] .confirm-removal button.remove'),
});
}
export const definition = {
scope: '.models-table-wrapper',
tablesCount: count('table'),
summary: text('.table-summary'),
globalFilterLabel: text('.globalSearch label'),
globalFilterFocused: getter(function () {
return document.activeElement === findElement(document, '.globalSearch input')[0];
}),
clickGlobalFilterLabel: clickable('.globalSearch label'),
doGlobalFilter: fillable('.filterString'),
clearGlobalFilter: clickable('.globalSearch .clearFilterIcon'),
clearGlobalFilterExists: exists('.globalSearch .clearFilterIcon'),
clearGlobalFilterDisabled: attribute('disabled', '.globalSearch .clearFilterIcon'),
tableFooterCount: count('.table-footer'),
clearAllFilters: clickable('.clearFilters'),
clearAllFiltersExists: exists('.clearFilters'),
clearAllFiltersDisabled: attribute('disabled', '.clearFilters'),
changePageSize: fillable('select.changePageSize'),
pageSize: value('select.changePageSize'),
expandAllRows: clickable('thead .expand-all-rows'),
collapseAllRows: clickable('thead .collapse-all-rows'),
toggleAllSelection: clickable('thead .toggle-all'),
expandRowButtons: count('button.expand-row'),
collapseRowButtons: count('button.collapse-row'),
filters: collection('table thead tr:eq(1) th', {
content: text(),
inputFilter: fillable('input'),
inputValue: value('input'),
inputPlaceholder: attribute('placeholder', 'input'),
inputFilterExists: exists('input'),
import {
count,
property,
text
} from 'ember-cli-page-object';
export default {
scope: '.user-projects-list',
header: text('h3'),
emptyState: text('.empty-state strong'),
listItemCount: count('li'),
projectDescription: text('li:first p'),
projectIconSrc: property('src', 'li:first img'),
projectTitle: text('li:first h4')
};
newCourseForm: {
scope: '[data-test-new-course]',
title: fillable('[data-test-title]'),
chooseYear: fillable('[data-test-year]'),
save: clickable('.done'),
years: collection({
itemScope: '[data-test-year] option',
item: {
text: text(),
selected: property('selected'),
},
}),
},
newCourseLink: text('[data-test-new-course] a'),
newCourseLinkIsHidden: isHidden('[data-test-new-course] a'),
savedCoursesCount: count('[data-test-courses] [data-test-active-row]'),
visitNewCourse: clickable('[data-test-new-course] a'),
courses: collection({
scope: '[data-test-ilios-course-list]',
itemScope: '[data-test-courses] [data-test-active-row]',
item: {
title: text('td', { at: 0 }),
school: text('td', { at: 1 }),
year: text('td', { at: 2 }),
level: text('td', { at: 3 }),
startDate: text('td', { at: 4 }),
endDate: text('td', { at: 5 }),
status: text('td', { at: 6 }),
isLocked: hasClass('fa-lock', 'svg', {scope: 'td:eq(6)', at: 0}),
isUnlocked: hasClass('fa-unlock', 'svg', {scope: 'td:eq(6)', at: 0}),
lock: clickable('.fa-unlock', {scope: 'td:eq(6)'}),
import PageObject, {
text,
count,
collection
} from 'ember-cli-page-object';
export default PageObject.create({
title: text('.FreestyleUsage-title'),
content: text('.FreestyleUsage-rendered'),
numTitles: count('.FreestyleUsage-title'),
numFocusButtons: count('.FreestyleUsage-focusCta'),
numNotesSection: count('.FreestyleUsage-notes'),
numCodeSection: count('.FreestyleUsage-usage'),
notesSection: {
scope: '.FreestyleUsage-notes',
snippets: collection('.FreestyleUsage-snippet')
},
usageSection: {
scope: '.FreestyleUsage-usage',
snippets: collection('.FreestyleUsage-snippet', {
rawText: text('', { normalize: false })
})
}