mirror of
https://github.com/status-im/consul.git
synced 2025-01-12 23:05:28 +00:00
5dd9cd2d2e
* ui: Add forking based on service instance id existence Proxies come in 2 flavours, 'normal' and sidecar. We know when a proxy is a sidecar proxy based on whether a DestinationServiceID is set. LocalServiceAddress and LocalServicePort are only relevant for sidecar proxies. This adds template logic to show different text depending on this information. Additionally adds test around connect proxies (#5418) 1. Adds page object for the instance detail page 2. Adds further scenario steps used in the tests 3. Adds acceptance testing around the instance detail page. Services with proxies and the sidecar proxies and proxies themselves 4. Adds datacenter column for upstreams 5. Fixes bug routing bug for decision as to whether to request proxy information or not
48 lines
1.5 KiB
JavaScript
48 lines
1.5 KiB
JavaScript
export default function(scenario, assert, currentPage, pluralize) {
|
|
scenario
|
|
.then('pause until I see $number $model model[s]?', function(num, model) {
|
|
return new Promise(function(resolve) {
|
|
let count = 0;
|
|
const interval = setInterval(function() {
|
|
if (++count >= 50) {
|
|
clearInterval(interval);
|
|
assert.ok(false);
|
|
resolve();
|
|
}
|
|
const len = currentPage()[pluralize(model)].filter(function(item) {
|
|
return item.isVisible;
|
|
}).length;
|
|
if (len === num) {
|
|
clearInterval(interval);
|
|
assert.equal(len, num, `Expected ${num} ${model}s, saw ${len}`);
|
|
resolve();
|
|
}
|
|
}, 100);
|
|
});
|
|
})
|
|
.then(['I see $num $model model[s]?'], function(num, model) {
|
|
const len = currentPage()[pluralize(model)].filter(function(item) {
|
|
return item.isVisible;
|
|
}).length;
|
|
|
|
assert.equal(len, num, `Expected ${num} ${pluralize(model)}, saw ${len}`);
|
|
})
|
|
// TODO: I${ dont } see
|
|
.then([`I see $num $model model[s]? with the $property "$value"`], function(
|
|
// negate,
|
|
num,
|
|
model,
|
|
property,
|
|
value
|
|
) {
|
|
const len = currentPage()[pluralize(model)].filter(function(item) {
|
|
return item.isVisible && item[property] == value;
|
|
}).length;
|
|
assert.equal(
|
|
len,
|
|
num,
|
|
`Expected ${num} ${pluralize(model)} with ${property} set to "${value}", saw ${len}`
|
|
);
|
|
});
|
|
}
|