2018-07-10 08:11:27 +00:00
|
|
|
import {
|
|
|
|
create,
|
|
|
|
collection,
|
|
|
|
clickable,
|
|
|
|
fillable,
|
2018-07-11 18:41:34 +00:00
|
|
|
isPresent,
|
2018-07-10 08:11:27 +00:00
|
|
|
text,
|
|
|
|
visitable,
|
|
|
|
} from 'ember-cli-page-object';
|
|
|
|
|
2019-02-12 19:26:36 +00:00
|
|
|
import facet from 'nomad-ui/tests/pages/components/facet';
|
|
|
|
|
2018-07-10 08:11:27 +00:00
|
|
|
export default create({
|
|
|
|
visit: visitable('/clients'),
|
|
|
|
|
|
|
|
search: fillable('.search-box input'),
|
|
|
|
|
|
|
|
nodes: collection('[data-test-client-node-row]', {
|
|
|
|
id: text('[data-test-client-id]'),
|
|
|
|
name: text('[data-test-client-name]'),
|
|
|
|
status: text('[data-test-client-status]'),
|
|
|
|
drain: text('[data-test-client-drain]'),
|
|
|
|
eligibility: text('[data-test-client-eligibility]'),
|
|
|
|
address: text('[data-test-client-address]'),
|
|
|
|
datacenter: text('[data-test-client-datacenter]'),
|
|
|
|
allocations: text('[data-test-client-allocations]'),
|
|
|
|
|
|
|
|
clickRow: clickable(),
|
|
|
|
clickName: clickable('[data-test-client-name] a'),
|
|
|
|
}),
|
|
|
|
|
2018-07-11 18:41:34 +00:00
|
|
|
hasPagination: isPresent('[data-test-pagination]'),
|
2018-07-10 08:11:27 +00:00
|
|
|
|
2018-07-11 18:41:34 +00:00
|
|
|
isEmpty: isPresent('[data-test-empty-clients-list]'),
|
2018-07-10 08:11:27 +00:00
|
|
|
empty: {
|
|
|
|
headline: text('[data-test-empty-clients-list-headline]'),
|
|
|
|
},
|
|
|
|
|
|
|
|
error: {
|
2018-07-11 18:41:34 +00:00
|
|
|
isPresent: isPresent('[data-test-error]'),
|
2018-07-10 08:11:27 +00:00
|
|
|
title: text('[data-test-error-title]'),
|
|
|
|
message: text('[data-test-error-message]'),
|
|
|
|
seekHelp: clickable('[data-test-error-message] a'),
|
|
|
|
},
|
2019-02-12 19:26:36 +00:00
|
|
|
|
|
|
|
facets: {
|
|
|
|
class: facet('[data-test-class-facet]'),
|
|
|
|
status: facet('[data-test-status-facet]'),
|
|
|
|
datacenter: facet('[data-test-datacenter-facet]'),
|
|
|
|
flags: facet('[data-test-flags-facet]'),
|
|
|
|
},
|
2018-07-10 08:11:27 +00:00
|
|
|
});
|