Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {
clickable,
collection,
create,
hasClass,
isHidden
} from 'ember-cli-page-object';
const definition = {
prevIsHidden: isHidden('.prev-link'),
nextIsHidden: isHidden('.next-link'),
prevDisabled: hasClass('inactive', '.prev-link'),
nextDisabled: hasClass('inactive', '.next-link'),
clickPrev: clickable('.prev-link'),
clickNext: clickable('.next-link'),
clickLastPage: clickable('.page-button:last'),
pageLinks: collection('.page-button')
};
export default definition;
export const component = create(definition);
create,
attribute,
visitable,
clickable,
collection,
isHidden,
isVisible,
fillable,
isPresent
} from 'ember-cli-page-object';
import { selectChoose } from 'ember-power-select/test-support';
export default create({
visit: visitable(':owner/:repo'),
popupIsHidden: isHidden('.trigger-build-modal'),
popupTriggerLinkIsHidden: isHidden('.option-dropdown .trigger-build-anchor'),
popupTriggerLinkIsPresent: isPresent('.option-dropdown .trigger-build-anchor'),
openPopup: clickable('.option-dropdown .trigger-build-anchor'),
popupIsVisible: isVisible('.trigger-build-modal'),
selectBranch(branch) {
selectChoose('[data-test-trigger-build-branch]', branch);
},
branches: collection('#trigger-build-branches option', {
value: attribute('value')
}),
writeMessage: fillable('[data-test-trigger-build-message] input'),
writeConfig: fillable('[data-test-trigger-build-config] textarea'),
clickSubmit: clickable('[data-test-trigger-build-submit]')
});
import {
clickable,
collection,
create,
isHidden,
isVisible,
text
} from 'ember-cli-page-object';
const definition = {
courseTitle: text('.course-title-link'),
sessions: collection('.session-title-link'),
showMoreIsVisible: isVisible('.show-more'),
showMoreIsHidden: isHidden('.show-more'),
showMore: clickable('.show-more')
};
export default definition;
export const component = create(definition);
import { text, isHidden, property } from 'ember-cli-page-object';
export default {
scope: '.user-sidebar',
name: text('.name'),
biography: text('p.biography'),
biographyIsHidden: isHidden('li.twitter'),
twitterHandle: text('li.twitter'),
twitterHandleHidden: isHidden('li.twitter'),
twitterLink: property('href', 'li.twitter a'),
website: text('li.website'),
websiteHidden: isHidden('li.website'),
websiteLink: property('href', 'li.website a'),
username: text('.username')
};
import {
create,
contains,
visitable,
text,
isHidden
} from 'ember-cli-page-object';
export default create({
visit: visitable('/non-existent/repository'),
showsBarricadeIllustration: contains('svg', { scope: '.page-graphic' }),
errorMessage: text('.missing-notice .page-title'),
errorMessageProisHidden: isHidden('.missing-notice p'),
errorMessageProUnauthenticated: contains('.missing-notice p')
});
import { text, isHidden, property } from 'ember-cli-page-object';
export default {
scope: '.user-sidebar',
name: text('.name'),
biography: text('p.biography'),
biographyIsHidden: isHidden('li.twitter'),
twitterHandle: text('li.twitter'),
twitterHandleHidden: isHidden('li.twitter'),
twitterLink: property('href', 'li.twitter a'),
website: text('li.website'),
websiteHidden: isHidden('li.website'),
websiteLink: property('href', 'li.website a'),
username: text('.username')
};
import {
create,
hasClass,
text,
clickable,
isVisible,
isHidden
} from 'ember-cli-page-object';
export default create({
configTab: {
click: clickable('#tab_config'),
contents: text('#config_pre'),
active: hasClass('active', '#tab_config'),
isHidden: isHidden('#config_pre'),
isShowing: isVisible('#config_pre')
},
logTab: {
isShowing: isVisible('.job-log'),
isHidden: isHidden('.job-log'),
active: hasClass('active', '#tab_log')
}
});
},
commonIntro: {
scope: '[data-test-common-intro]',
isPresent: isPresent()
},
step1Intro: {
scope: '[data-test-step1-intro]',
isPresent: isPresent()
},
activateButton: {
scope: '[data-test-activate-button]',
isPresent: isPresent(),
isHidden: isHidden(),
click: clickable()
},
manualNote: {
scope: '[data-test-manual-note]',
isPresent: isPresent()
},
step2Intro: {
scope: '[data-test-step2-intro]',
isPresent: isPresent()
},
activateLink: {
scope: '[data-test-activate-link]',
isPresent: isPresent(),
href: attribute('href')
}
}),
invoiceTableHeaders: collection('[data-test-table-header-row] th'),
invoiceSelectYear: {
scope: '[data-test-invoice-select-year]'
}
},
},
migrate: {
visit: clickable('li[data-test-migrate-tab] a'),
isPresent: isPresent('li[data-test-migrate-tab]'),
isHidden: isHidden('li[data-test-migrate-tab]'),
page: {
scope: '[data-test-migrate-page]',
title: {
scope: '[data-test-title]',
isPresent: isPresent()
},
commonIntro: {
scope: '[data-test-common-intro]',
isPresent: isPresent()
},
step1Intro: {
scope: '[data-test-step1-intro]',