Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default create({
visit: visitable('/'),
logoPresent: contains('h1.logo', { scope: '.topbar' }),
navigationLinks: collection('nav#navigation ul li', {
title: text('a'),
}),
navDropdowns: collection('nav#navigation ul li:has(span.navigation-anchor)', {
title: text('span.navigation-anchor'),
childLinks: collection('ul.navigation-nested li', {
title: text('a'),
}),
}),
loginLinkPresent: contains('.auth-button.signed-out', { scope: '.topbar nav#navigation ul li.menu.profile' }),
broadcastsPresent: contains('.topbar .broadcast span.icon-broadcast.announcement'),
profileLinkPresent: contains('.navigation-anchor.signed-in', { scope: '.topbar nav#navigation ul li.menu.profile.signed-in' }),
});
subsections: collection('.FreestyleSubsection',{
text: text('.FreestyleSubsection-name'),
collections: collection('.FreestyleCollection', {
title: text('.FreestyleCollection-title'),
activeVariantListItemLabel: contains('.FreestyleCollection-variantListItem--active'),
selectVariant: clickOnText('.FreestyleCollection-variantListItem'),
variantListItems: collection('.FreestyleCollection-variantListItem',{
text: text()
}),
variants: collection('.FreestyleVariant',{
contains: contains(),
usageTitle: text('.FreestyleUsage-title'),
annotationContains: contains('.FreestyleAnnotation'),
noteContent: text('.FreestyleNotes-content', { multiple: true })
})
})
})
})
}
});
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')
});
visit: visitable('/'),
logoPresent: contains('h1.logo', { scope: '.topbar' }),
navigationLinks: collection('nav#navigation ul li', {
title: text('a'),
}),
helpDropdownPresent: contains('nav#navigation ul li span.navigation-anchor'),
helpLinks: collection('nav#navigation ul li ul.navigation-nested li', {
title: text('a'),
}),
loginLinkPresent: contains('.auth-button.signed-out', { scope: '.topbar nav#navigation ul li.menu.profile' }),
broadcastsPresent: contains('.topbar .broadcast span.icon-broadcast.announcement'),
profileLinkPresent: contains('.navigation-anchor.signed-in', { scope: '.topbar nav#navigation ul li.menu.profile.signed-in' }),
cta: { scope: '.cta p.row' },
});
})
},
content: {
scope: '.FreestyleGuide-content',
sections: collection('.FreestyleSection',{
text: text('.FreestyleSection-name'),
subsections: collection('.FreestyleSubsection',{
text: text('.FreestyleSubsection-name'),
collections: collection('.FreestyleCollection', {
title: text('.FreestyleCollection-title'),
activeVariantListItemLabel: contains('.FreestyleCollection-variantListItem--active'),
selectVariant: clickOnText('.FreestyleCollection-variantListItem'),
variantListItems: collection('.FreestyleCollection-variantListItem',{
text: text()
}),
variants: collection('.FreestyleVariant',{
contains: contains(),
usageTitle: text('.FreestyleUsage-title'),
annotationContains: contains('.FreestyleAnnotation'),
noteContent: text('.FreestyleNotes-content', { multiple: true })
})
})
})
import {
create,
collection,
contains,
text,
visitable,
} from 'ember-cli-page-object';
export default create({
visit: visitable('/'),
logoPresent: contains('h1.logo', { scope: '.topbar' }),
navigationLinks: collection('nav#navigation ul li', {
title: text('a'),
}),
navDropdowns: collection('nav#navigation ul li:has(span.navigation-anchor)', {
title: text('span.navigation-anchor'),
childLinks: collection('ul.navigation-nested li', {
title: text('a'),
}),
}),
loginLinkPresent: contains('.auth-button.signed-out', { scope: '.topbar nav#navigation ul li.menu.profile' }),
broadcastsPresent: contains('.topbar .broadcast span.icon-broadcast.announcement'),
profileLinkPresent: contains('.navigation-anchor.signed-in', { scope: '.topbar nav#navigation ul li.menu.profile.signed-in' }),
});
create,
contains,
collection,
text,
visitable,
} from 'ember-cli-page-object';
export default create({
visit: visitable('/'),
logoPresent: contains('h1.logo', { scope: '.topbar' }),
navigationLinks: collection('nav#navigation ul li', {
title: text('a'),
}),
helpDropdownPresent: contains('nav#navigation ul li span.navigation-anchor'),
helpLinks: collection('nav#navigation ul li ul.navigation-nested li', {
title: text('a'),
}),
loginLinkPresent: contains('.auth-button.signed-out', { scope: '.topbar nav#navigation ul li.menu.profile' }),
broadcastsPresent: contains('.topbar .broadcast span.icon-broadcast.announcement'),
profileLinkPresent: contains('.navigation-anchor.signed-in', { scope: '.topbar nav#navigation ul li.menu.profile.signed-in' }),
cta: { scope: '.cta p.row' },
});
logoPresent: contains('h1.logo', { scope: '.topbar' }),
navigationLinks: collection('nav#navigation ul li', {
title: text('a'),
}),
navDropdowns: collection('nav#navigation ul li:has(span.navigation-anchor)', {
title: text('span.navigation-anchor'),
childLinks: collection('ul.navigation-nested li', {
title: text('a'),
}),
}),
loginLinkPresent: contains('.auth-button.signed-out', { scope: '.topbar nav#navigation ul li.menu.profile' }),
broadcastsPresent: contains('.topbar .broadcast span.icon-broadcast.announcement'),
profileLinkPresent: contains('.navigation-anchor.signed-in', { scope: '.topbar nav#navigation ul li.menu.profile.signed-in' }),
});
visit: visitable('/'),
logoPresent: contains('h1.logo', { scope: '.topbar' }),
navigationLinks: collection('nav#navigation ul li', {
title: text('a'),
}),
navDropdowns: collection('nav#navigation ul li:has(span.navigation-anchor)', {
title: text('span.navigation-anchor'),
childLinks: collection('ul.navigation-nested li', {
title: text('a'),
}),
}),
loginLinkPresent: contains('.auth-button.signed-out', { scope: '.topbar nav#navigation ul li.menu.profile' }),
broadcastsPresent: contains('.topbar .broadcast span.icon-broadcast.announcement'),
profileLinkPresent: contains('.navigation-anchor.signed-in', { scope: '.topbar nav#navigation ul li.menu.profile.signed-in' }),
});
export default create({
visit: visitable('/'),
logoPresent: contains('h1.logo', { scope: '.topbar' }),
navigationLinks: collection('nav#navigation ul li', {
title: text('a'),
}),
helpDropdownPresent: contains('nav#navigation ul li span.navigation-anchor'),
helpLinks: collection('nav#navigation ul li ul.navigation-nested li', {
title: text('a'),
}),
loginLinkPresent: contains('.auth-button.signed-out', { scope: '.topbar nav#navigation ul li.menu.profile' }),
broadcastsPresent: contains('.topbar .broadcast span.icon-broadcast.announcement'),
profileLinkPresent: contains('.navigation-anchor.signed-in', { scope: '.topbar nav#navigation ul li.menu.profile.signed-in' }),
cta: { scope: '.cta p.row' },
});