Add initial server health check and update Harbor versions
This commit is contained in:
@@ -36,8 +36,11 @@ test('server picker handles 1, 30 and 300 stable-ID servers with duplicate label
|
||||
assert.equal(SERVER_RESULT_WINDOW, 60);
|
||||
});
|
||||
|
||||
test('server picker keeps health manual and the rendered result window bounded', () => {
|
||||
test('server picker checks health once on load, keeps manual refresh and bounds the result window', () => {
|
||||
assert.doesNotMatch(overview, /pingAll|servers\.ping/);
|
||||
assert.match(picker, /const initialCheckStarted = useRef\(false\)/);
|
||||
assert.match(picker, /if \(initialCheckStarted\.current \|\| !servers\.length\) return/);
|
||||
assert.match(picker, /initialCheckStarted\.current = true;\s*checkVisible\(\)/);
|
||||
assert.match(picker, /onClick={checkVisible}/);
|
||||
assert.match(picker, /\.slice\(page \* SERVER_RESULT_WINDOW, \(page \+ 1\) \* SERVER_RESULT_WINDOW\)/);
|
||||
assert.match(picker, /\.slice\(0, 30\)/);
|
||||
@@ -50,7 +53,8 @@ test('server picker keeps health manual and the rendered result window bounded',
|
||||
|
||||
test('manual health remains visible for Auto and simple rows', () => {
|
||||
assert.match(picker, /autoActive \? serverHealthText\(pings\[selectedServerId\]\)/);
|
||||
assert.match(picker, /disabled={checking \|\| \(!selectedServerId && !visible\.length\)}/);
|
||||
assert.match(picker, /className="client-server-check"/);
|
||||
assert.match(picker, /server={servers\[0\]}[\s\S]*?ping={pings\[servers\[0\]\.id\]}/);
|
||||
assert.match(picker, /simpleServers\.map[\s\S]*?ping={pings\[server\.id\]}/);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user