[arvados-workbench2] updated: 2.4.0-460-g80fe3780
git repository hosting
git at public.arvados.org
Tue Dec 20 14:55:03 UTC 2022
Summary of changes:
Makefile | 3 +-
docker/Dockerfile | 3 +
.../data-explorer/renderers.test.tsx | 100 +++++++++++----------
3 files changed, 58 insertions(+), 48 deletions(-)
via 80fe37808eea2457526a9058d6b0890662c1097a (commit)
from 215d0b7a7e1f69765c5f2a1139e52d8c427066eb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 80fe37808eea2457526a9058d6b0890662c1097a
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Tue Dec 20 09:54:13 2022 -0500
Fix renders test for new run state badge style
refs #19462
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/Makefile b/Makefile
index 2236f9de..07c3b200 100644
--- a/Makefile
+++ b/Makefile
@@ -68,6 +68,7 @@ arvados-server-install:
cd cmd/arvados-server
go install
cd -
+ ls -l ~/go/bin/arvados-server
~/go/bin/arvados-server install -type test
yarn-install: arvados-server-install
@@ -81,7 +82,7 @@ integration-tests: yarn-install
$(WORKSPACE)/tools/run-integration-tests.sh -a $(ARVADOS_DIRECTORY)
integration-tests-in-docker: workbench2-build-image
- docker run -ti -v$(PWD):$(PWD) -w$(PWD) workbench2-build make integration-tests
+ docker run -ti -v$(PWD):/usr/src/workbench2 -v$(ARVADOS_DIRECTORY):/usr/src/arvados -w /usr/src/workbench2 -e ARVADOS_DIRECTORY=/usr/src/arvados workbench2-build make integration-tests
test: unit-tests integration-tests
diff --git a/docker/Dockerfile b/docker/Dockerfile
index b93ebd50..f529b796 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -32,3 +32,6 @@ RUN cd /usr/src/arvados && \
go run ./cmd/arvados-server install -type test && cd .. && \
rm -rf arvados && \
apt-get clean
+
+RUN git config --global --add safe.directory /usr/src/arvados && \
+ git config --global --add safe.directory /usr/src/workbench2
\ No newline at end of file
diff --git a/src/views-components/data-explorer/renderers.test.tsx b/src/views-components/data-explorer/renderers.test.tsx
index 5bc123df..b8cdb7c1 100644
--- a/src/views-components/data-explorer/renderers.test.tsx
+++ b/src/views-components/data-explorer/renderers.test.tsx
@@ -29,12 +29,10 @@ describe('renderers', () => {
colors: {
// Color values are arbitrary, but they should be
// representative of the colors used in the UI.
- blue500: 'rgb(0, 0, 255)',
- green700: 'rgb(0, 255, 0)',
- yellow700: 'rgb(255, 255, 0)',
+ green800: 'rgb(0, 255, 0)',
red900: 'rgb(255, 0, 0)',
orange: 'rgb(240, 173, 78)',
- grey500: 'rgb(128, 128, 128)',
+ grey600: 'rgb(128, 128, 128)',
}
},
spacing: {
@@ -49,42 +47,44 @@ describe('renderers', () => {
};
[
- // CR Status ; Priority ; C Status ; Exit Code ; C RuntimeStatus ; Expected label ; Expected Color
- [CR.COMMITTED, 1, C.RUNNING, null, {}, PS.RUNNING, props.theme.customs.colors.blue500],
- [CR.COMMITTED, 1, C.RUNNING, null, {error: 'whoops'}, PS.FAILING, props.theme.customs.colors.orange],
- [CR.COMMITTED, 1, C.RUNNING, null, {warning: 'watch out!'}, PS.WARNING, props.theme.customs.colors.yellow700],
- [CR.FINAL, 1, C.CANCELLED, null, {}, PS.CANCELLED, props.theme.customs.colors.red900],
- [CR.FINAL, 1, C.COMPLETE, 137, {}, PS.FAILED, props.theme.customs.colors.red900],
- [CR.FINAL, 1, C.COMPLETE, 0, {}, PS.COMPLETED, props.theme.customs.colors.green700],
- [CR.COMMITTED, 0, C.LOCKED, null, {}, PS.ONHOLD, props.theme.customs.colors.grey500],
- [CR.COMMITTED, 0, C.QUEUED, null, {}, PS.ONHOLD, props.theme.customs.colors.grey500],
- [CR.COMMITTED, 1, C.LOCKED, null, {}, PS.QUEUED, props.theme.customs.colors.grey500],
- [CR.COMMITTED, 1, C.QUEUED, null, {}, PS.QUEUED, props.theme.customs.colors.grey500],
- ].forEach(([crState, crPrio, cState, exitCode, rs, eLabel, eColor]) => {
+ // CR Status ; Priority ; C Status ; Exit Code ; C RuntimeStatus ; Expected label ; Expected bg color ; Expected fg color
+ [CR.COMMITTED, 1, C.RUNNING, null, {}, PS.RUNNING, props.theme.palette.common.white, props.theme.customs.colors.green800],
+ [CR.COMMITTED, 1, C.RUNNING, null, { error: 'whoops' }, PS.FAILING, props.theme.palette.common.white, props.theme.customs.colors.red900],
+ [CR.COMMITTED, 1, C.RUNNING, null, { warning: 'watch out!' }, PS.WARNING, props.theme.palette.common.white, props.theme.customs.colors.green800],
+ [CR.FINAL, 1, C.CANCELLED, null, {}, PS.CANCELLED, props.theme.customs.colors.red900, props.theme.palette.common.white],
+ [CR.FINAL, 1, C.COMPLETE, 137, {}, PS.FAILED, props.theme.customs.colors.red900, props.theme.palette.common.white],
+ [CR.FINAL, 1, C.COMPLETE, 0, {}, PS.COMPLETED, props.theme.customs.colors.green800, props.theme.palette.common.white],
+ [CR.COMMITTED, 0, C.LOCKED, null, {}, PS.ONHOLD, props.theme.customs.colors.grey600, props.theme.palette.common.white],
+ [CR.COMMITTED, 0, C.QUEUED, null, {}, PS.ONHOLD, props.theme.customs.colors.grey600, props.theme.palette.common.white],
+ [CR.COMMITTED, 1, C.LOCKED, null, {}, PS.QUEUED, props.theme.customs.colors.grey600, props.theme.palette.common.white],
+ [CR.COMMITTED, 1, C.QUEUED, null, {}, PS.QUEUED, props.theme.customs.colors.grey600, props.theme.palette.common.white],
+ ].forEach(([crState, crPrio, cState, exitCode, rs, eLabel, eColor, tColor]) => {
it(`should render the state label '${eLabel}' and color '${eColor}' for CR state=${crState}, priority=${crPrio}, C state=${cState}, exitCode=${exitCode} and RuntimeStatus=${JSON.stringify(rs)}`, () => {
const containerUuid = 'zzzzz-dz642-zzzzzzzzzzzzzzz';
- const store = mockStore({ resources: {
- [props.uuid]: {
- kind: ResourceKind.CONTAINER_REQUEST,
- state: crState,
- containerUuid: containerUuid,
- priority: crPrio,
- },
- [containerUuid]: {
- kind: ResourceKind.CONTAINER,
- state: cState,
- runtimeStatus: rs,
- exitCode: exitCode,
- },
- }});
+ const store = mockStore({
+ resources: {
+ [props.uuid]: {
+ kind: ResourceKind.CONTAINER_REQUEST,
+ state: crState,
+ containerUuid: containerUuid,
+ priority: crPrio,
+ },
+ [containerUuid]: {
+ kind: ResourceKind.CONTAINER,
+ state: cState,
+ runtimeStatus: rs,
+ exitCode: exitCode,
+ },
+ }
+ });
const wrapper = mount(<Provider store={store}>
- <ProcessStatus {...props} />
- </Provider>);
+ <ProcessStatus {...props} />
+ </Provider>);
expect(wrapper.text()).toEqual(eLabel);
expect(getComputedStyle(wrapper.getDOMNode())
- .getPropertyValue('color')).toEqual(props.theme.palette.common.white);
+ .getPropertyValue('color')).toEqual(tColor);
expect(getComputedStyle(wrapper.getDOMNode())
.getPropertyValue('background-color')).toEqual(eColor);
});
@@ -100,12 +100,14 @@ describe('renderers', () => {
it('should render collection fileSizeTotal', () => {
// given
- const store = mockStore({ resources: {
- [props.uuid]: {
- kind: ResourceKind.COLLECTION,
- fileSizeTotal: 100,
+ const store = mockStore({
+ resources: {
+ [props.uuid]: {
+ kind: ResourceKind.COLLECTION,
+ fileSizeTotal: 100,
+ }
}
- }});
+ });
// when
const wrapper = mount(<Provider store={store}>
@@ -131,16 +133,20 @@ describe('renderers', () => {
it('should render empty string for non collection resource', () => {
// given
- const store1 = mockStore({ resources: {
- [props.uuid]: {
- kind: ResourceKind.PROJECT,
+ const store1 = mockStore({
+ resources: {
+ [props.uuid]: {
+ kind: ResourceKind.PROJECT,
+ }
}
- }});
- const store2 = mockStore({ resources: {
- [props.uuid]: {
- kind: ResourceKind.PROJECT,
+ });
+ const store2 = mockStore({
+ resources: {
+ [props.uuid]: {
+ kind: ResourceKind.PROJECT,
+ }
}
- }});
+ });
// when
const wrapper1 = mount(<Provider store={store1}>
@@ -155,4 +161,4 @@ describe('renderers', () => {
expect(wrapper2.text()).toContain('');
});
});
-});
\ No newline at end of file
+});
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list