2019-07-02 21:42:38 +00:00
|
|
|
import {
|
|
|
|
attribute,
|
|
|
|
collection,
|
|
|
|
clickable,
|
|
|
|
create,
|
|
|
|
hasClass,
|
|
|
|
isPresent,
|
|
|
|
text,
|
|
|
|
visitable,
|
|
|
|
} from 'ember-cli-page-object';
|
2019-06-20 22:20:15 +00:00
|
|
|
|
|
|
|
export default create({
|
|
|
|
visit: visitable('/allocations/:id/:name/fs'),
|
2019-07-02 21:42:38 +00:00
|
|
|
visitPath: visitable('/allocations/:id/:name/fs/:path'),
|
2019-06-20 22:20:15 +00:00
|
|
|
|
2019-07-02 21:42:38 +00:00
|
|
|
fileViewer: {
|
|
|
|
scope: '[data-test-file-viewer]',
|
|
|
|
},
|
|
|
|
|
|
|
|
breadcrumbsText: text('[data-test-fs-breadcrumbs]'),
|
|
|
|
|
|
|
|
breadcrumbs: collection('[data-test-fs-breadcrumbs] li', {
|
|
|
|
visit: clickable('a'),
|
|
|
|
path: attribute('href', 'a'),
|
|
|
|
isActive: hasClass('is-active'),
|
|
|
|
}),
|
|
|
|
|
|
|
|
directoryEntries: collection('[data-test-entry]', {
|
|
|
|
name: text('[data-test-name]'),
|
|
|
|
|
|
|
|
isFile: isPresent('[data-test-file-icon]'),
|
|
|
|
isDirectory: isPresent('[data-test-directory-icon]'),
|
|
|
|
isEmpty: isPresent('[data-test-empty-icon]'),
|
|
|
|
|
|
|
|
size: text('[data-test-size]'),
|
|
|
|
lastModified: text('[data-test-last-modified]'),
|
|
|
|
|
|
|
|
visit: clickable('a'),
|
|
|
|
path: attribute('href', 'a'),
|
|
|
|
}),
|
2019-06-20 22:20:15 +00:00
|
|
|
|
|
|
|
hasEmptyState: isPresent('[data-test-not-running]'),
|
|
|
|
emptyState: {
|
|
|
|
headline: text('[data-test-not-running-headline]'),
|
|
|
|
},
|
2019-07-02 21:42:38 +00:00
|
|
|
|
|
|
|
error: {
|
|
|
|
title: text('[data-test-error-title]'),
|
|
|
|
},
|
2019-06-20 22:20:15 +00:00
|
|
|
});
|