Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
hasClass,
isVisible
} from 'ember-cli-page-object';
const blockContentInput = '.FreestyleDynamic-input:contains(blockContent) textarea';
const tastefulInput = '.FreestyleDynamic-input:contains(isTasteful:) input';
const selectInput = '.FreestyleDynamic-input:contains(size:) select';
const numberInput = '.FreestyleDynamic-input:contains(rank:) input';
const checkboxInput = '.FreestyleDynamic-input:contains(isVisible:) input';
export default PageObject.create({
visit: visitable('/acceptance?s=Dynamic%20Properties'),
snippet: text('.FreestyleUsage-snippet', { at: 3 }),
blockContentInputValue: value(blockContentInput),
blockContentRendered: text('.x-Bar-description'),
fillInBlockContentInput: fillable(blockContentInput),
keyUpBlockContentInput: triggerable('keyup', blockContentInput),
async changeBlockContentInput(newValue) {
await this.fillInBlockContentInput(newValue),
await this.keyUpBlockContentInput()
},
toggleTastefulInput: clickable(tastefulInput),
selectInputValue: value(selectInput),
isSmall: hasClass('x-Bar--small', '.x-Bar'),
isMedium: hasClass('x-Bar--medium', '.x-Bar'),
changeSelectInput: fillable(selectInput),
numberInputValue: value(numberInput),
numberRendered: text('.x-Bar-rank'),
callout: {
scope: '[data-test-callout]',
copyButton: {
scope: '[data-test-copy]'
}
},
categoryCheckboxes,
clickSubmit: clickable('[data-test-submit]'),
errors: collection('.input-group.has-error'),
descriptionValue: value('[name=description]'),
imageDrop,
inputDescription: fillable('[name=description]'),
inputTitle: fillable('[name=title]'),
skillsList: collection('.project-skills-list button', {
text: text(),
click: clickable()
}),
skillsTypeahead,
slugValue: value('[name=slug]'),
titleValue: value('[name=title]')
}
blockContentInputValue: value(blockContentInput),
blockContentRendered: text('.x-Bar-description'),
fillInBlockContentInput: fillable(blockContentInput),
keyUpBlockContentInput: triggerable('keyup', blockContentInput),
async changeBlockContentInput(newValue) {
await this.fillInBlockContentInput(newValue),
await this.keyUpBlockContentInput()
},
toggleTastefulInput: clickable(tastefulInput),
selectInputValue: value(selectInput),
isSmall: hasClass('x-Bar--small', '.x-Bar'),
isMedium: hasClass('x-Bar--medium', '.x-Bar'),
changeSelectInput: fillable(selectInput),
numberInputValue: value(numberInput),
numberRendered: text('.x-Bar-rank'),
changeNumberInput: fillable(numberInput),
checkboxInputValue: value(checkboxInput),
isVisible: isVisible('.x-Bar'),
toggleCheckbox: clickable(checkboxInput),
});
import imageDrop from 'code-corps-ember/tests/pages/components/image-drop';
export default {
scope: '.user-settings-form',
biography: fillable('input[name=biography]'),
firstName: fillable('input[name=firstName]'),
lastName: fillable('input[name=lastName]'),
twitter: fillable('input[name=twitter]'),
website: fillable('input[name=website]'),
biographyValue: value('input[name=biography]'),
firstNameValue: value('input[name=firstName]'),
lastNameValue: value('input[name=lastName]'),
twitterValue: value('input[name=twitter]'),
websiteValue: value('input[name=website]'),
saveVisible: isVisible('.save'),
clickSave: clickable('.save'),
imageDrop
};
descriptionValue: value('[name=description]'),
imageDrop,
inputDescription: fillable('[name=description]'),
inputTitle: fillable('[name=title]'),
skillsList: collection('.project-skills-list button', {
text: text(),
click: clickable()
}),
skillsTypeahead,
slugValue: value('[name=slug]'),
titleValue: value('[name=title]')
}
});
export default PageObject.create({
visit: visitable('/acceptance?s=Dynamic%20Properties'),
snippet: text('.FreestyleUsage-snippet', { at: 3 }),
blockContentInputValue: value(blockContentInput),
blockContentRendered: text('.x-Bar-description'),
fillInBlockContentInput: fillable(blockContentInput),
keyUpBlockContentInput: triggerable('keyup', blockContentInput),
async changeBlockContentInput(newValue) {
await this.fillInBlockContentInput(newValue),
await this.keyUpBlockContentInput()
},
toggleTastefulInput: clickable(tastefulInput),
selectInputValue: value(selectInput),
isSmall: hasClass('x-Bar--small', '.x-Bar'),
isMedium: hasClass('x-Bar--medium', '.x-Bar'),
changeSelectInput: fillable(selectInput),
numberInputValue: value(numberInput),
numberRendered: text('.x-Bar-rank'),
changeNumberInput: fillable(numberInput),
checkboxInputValue: value(checkboxInput),
isVisible: isVisible('.x-Bar'),
toggleCheckbox: clickable(checkboxInput),
});
create,
fillable,
isVisible,
property,
text,
value
} from 'ember-cli-page-object';
import courseSearchResult from './course-search-result';
const definition = {
scope: '[data-test-global-search]',
noResultsIsVisible: isVisible('.no-results'),
input: fillable('input.global-search-input'),
clickIcon: clickable('[data-test-search-icon]'),
academicYear: value('[data-test-academic-year-filter]'),
academicYearOptions: text('[data-test-academic-year-filter]'),
courseTitleLinks: collection('.course-title-link'),
selectAcademicYear: fillable('[data-test-academic-year-filter]'),
schoolFilters: collection('[data-test-school-filters] [data-test-school-filter]', {
isSelected: property('checked', 'input'),
isDisabled: property('disabled', 'input'),
school: text('label'),
toggle: clickable('label'),
}),
searchResults: collection('[data-test-course-search-result]', courseSearchResult),
};
export default definition;
export const component = create(definition);
learningMaterials,
meshTerms,
taxonomies,
collapsedTaxonomies,
objectiveParentManager: {
scope: '[data-test-course-objective-manager]',
title: text('.objectivetitle'),
groupTitle: text('.group-picker'),
selectGroup: fillable('.group-picker select'),
groups: collection({
scope: '.group-picker select',
itemScope: 'option',
item: {
title: text(),
value: value(),
},
}),
competencies: collection({
scope: '.parent-picker',
itemScope: '[data-test-competency]',
item: {
title: text('.competency-title'),
selected: hasClass('selected', '.competency-title'),
notSelected: notHasClass('selected', '.competency-title'),
objectives: collection({
scope: 'ul',
itemScope: 'li',
item: {
title: text(),
selected: hasClass('selected'),
notSelected: notHasClass('selected'),
export default {
scope: '.organization-settings-form',
description: {
scope: 'input[name=description]',
fillIn: fillable(),
value: value()
},
imageDrop,
name: {
scope: 'input[name=name]',
fillIn: fillable(),
value: value()
},
save: {
scope: '.save',
click: clickable(),
isVisible: isVisible()
}
};
} from 'ember-cli-page-object';
const definition = {
scope: '[data-test-dashboard-myreports]',
title: text('[data-test-title]'),
addNewReport: clickable('[data-test-add-new-report] button'),
reports: collection('[data-test-saved-reports] li', {
title: text(),
select: clickable('.clickable')
}),
selectedReport: {
scope: '[data-test-selected-report]',
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', {