54 lines
1.8 KiB
JavaScript
54 lines
1.8 KiB
JavaScript
import {
|
|
attribute,
|
|
clickable,
|
|
create,
|
|
collection,
|
|
isPresent,
|
|
text,
|
|
visitable,
|
|
} from 'ember-cli-page-object';
|
|
|
|
export default create({
|
|
visit: visitable('/jobs/:id/deployments'),
|
|
|
|
deployments: collection('[data-test-deployment]', {
|
|
text: text(),
|
|
status: text('[data-test-deployment-status]'),
|
|
statusClass: attribute('class', '[data-test-deployment-status]'),
|
|
version: text('[data-test-deployment-version]'),
|
|
submitTime: text('[data-test-deployment-submit-time]'),
|
|
promotionIsRequired: isPresent('[data-test-promotion-required]'),
|
|
|
|
toggle: clickable('[data-test-deployment-toggle-details]'),
|
|
|
|
hasDetails: isPresent('[data-test-deployment-details]'),
|
|
|
|
metrics: collection('[data-test-deployment-metric]', {
|
|
id: attribute('data-test-deployment-metric'),
|
|
text: text(),
|
|
}),
|
|
|
|
metricFor(id) {
|
|
return this.metrics.toArray().findBy('id', id);
|
|
},
|
|
|
|
notification: text('[data-test-deployment-notification]'),
|
|
|
|
hasTaskGroups: isPresent('[data-test-deployment-task-groups]'),
|
|
taskGroups: collection('[data-test-deployment-task-group]', {
|
|
name: text('[data-test-deployment-task-group-name]'),
|
|
promotion: text('[data-test-deployment-task-group-promotion]'),
|
|
autoRevert: text('[data-test-deployment-task-group-auto-revert]'),
|
|
canaries: text('[data-test-deployment-task-group-canaries]'),
|
|
allocs: text('[data-test-deployment-task-group-allocs]'),
|
|
healthy: text('[data-test-deployment-task-group-healthy]'),
|
|
unhealthy: text('[data-test-deployment-task-group-unhealthy]'),
|
|
}),
|
|
|
|
hasAllocations: isPresent('[data-test-deployment-allocations]'),
|
|
allocations: collection('[data-test-deployment-allocation]', {
|
|
id: text('[data-test-short-id]'),
|
|
}),
|
|
}),
|
|
});
|