2020-05-07 23:57:51 +00:00
|
|
|
import {
|
|
|
|
clickable,
|
|
|
|
collection,
|
|
|
|
create,
|
|
|
|
fillable,
|
|
|
|
isPresent,
|
|
|
|
text,
|
|
|
|
visitable,
|
|
|
|
} from 'ember-cli-page-object';
|
2020-04-04 02:25:18 +00:00
|
|
|
|
|
|
|
import error from 'nomad-ui/tests/pages/components/error';
|
2020-04-04 16:58:34 +00:00
|
|
|
import pageSizeSelect from 'nomad-ui/tests/pages/components/page-size-select';
|
2020-04-04 02:25:18 +00:00
|
|
|
|
|
|
|
export default create({
|
2020-04-04 16:58:34 +00:00
|
|
|
pageSize: 25,
|
2020-04-04 02:25:18 +00:00
|
|
|
|
|
|
|
visit: visitable('/csi/volumes'),
|
|
|
|
|
2020-05-07 23:57:51 +00:00
|
|
|
search: fillable('[data-test-volumes-search] input'),
|
|
|
|
|
2020-04-04 02:25:18 +00:00
|
|
|
volumes: collection('[data-test-volume-row]', {
|
|
|
|
name: text('[data-test-volume-name]'),
|
|
|
|
schedulable: text('[data-test-volume-schedulable]'),
|
|
|
|
controllerHealth: text('[data-test-volume-controller-health]'),
|
|
|
|
nodeHealth: text('[data-test-volume-node-health]'),
|
|
|
|
provider: text('[data-test-volume-provider]'),
|
|
|
|
allocations: text('[data-test-volume-allocations]'),
|
|
|
|
|
|
|
|
clickRow: clickable(),
|
|
|
|
clickName: clickable('[data-test-volume-name] a'),
|
|
|
|
}),
|
|
|
|
|
|
|
|
nextPage: clickable('[data-test-pager="next"]'),
|
|
|
|
prevPage: clickable('[data-test-pager="prev"]'),
|
|
|
|
|
|
|
|
isEmpty: isPresent('[data-test-empty-volumes-list]'),
|
|
|
|
emptyState: {
|
|
|
|
headline: text('[data-test-empty-volumes-list-headline]'),
|
|
|
|
},
|
|
|
|
|
|
|
|
error: error(),
|
2020-04-04 16:58:34 +00:00
|
|
|
pageSizeSelect: pageSizeSelect(),
|
2020-04-04 02:25:18 +00:00
|
|
|
|
|
|
|
namespaceSwitcher: {
|
2021-03-26 13:55:12 +00:00
|
|
|
isPresent: isPresent('[data-test-namespace-switcher-parent]'),
|
|
|
|
open: clickable('[data-test-namespace-switcher-parent] .ember-power-select-trigger'),
|
2020-04-04 02:25:18 +00:00
|
|
|
options: collection('.ember-power-select-option', {
|
|
|
|
testContainer: '#ember-testing',
|
|
|
|
resetScope: true,
|
|
|
|
label: text(),
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
});
|