diff --git a/frontend/src/lib/Buttons.ts b/frontend/src/lib/Buttons.ts
new file mode 100644
index 00000000000..90e2cd498ee
--- /dev/null
+++ b/frontend/src/lib/Buttons.ts
@@ -0,0 +1,129 @@
+/*
+ * Copyright 2018 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import AddIcon from '@material-ui/icons/Add';
+import CollapseIcon from '@material-ui/icons/UnfoldLess';
+import ExpandIcon from '@material-ui/icons/UnfoldMore';
+import { ToolbarActionConfig } from '../components/Toolbar';
+
+interface ButtonsMap { [key: string]: (action: () => void) => ToolbarActionConfig; }
+
+// tslint:disable-next-line:variable-name
+const Buttons: ButtonsMap = {
+ archive: action => ({
+ action,
+ disabled: true,
+ disabledTitle: 'Select at least one resource to archive',
+ id: 'archiveBtn',
+ title: 'Archive',
+ tooltip: 'Archive',
+ }),
+ cloneRun: action => ({
+ action,
+ disabled: true,
+ disabledTitle: 'Select a run to clone',
+ id: 'cloneBtn',
+ title: 'Clone run',
+ tooltip: 'Create a copy from this run\s initial state',
+ }),
+ collapseSections: action => ({
+ action,
+ icon: CollapseIcon,
+ id: 'collapseBtn',
+ title: 'Collapse all',
+ tooltip: 'Collapse all sections',
+ }),
+ compareRuns: action => ({
+ action,
+ disabled: true,
+ disabledTitle: 'Select multiple runs to compare',
+ id: 'compareBtn',
+ title: 'Compare runs',
+ tooltip: 'Compare up to 10 selected runs',
+ }),
+ delete: action => ({
+ action,
+ disabled: true,
+ disabledTitle: 'Select at least one resource to delete',
+ id: 'deleteBtn',
+ title: 'Delete',
+ tooltip: 'Delete',
+ }),
+ disableRun: action => ({
+ action,
+ disabled: true,
+ disabledTitle: 'Run schedule already disabled',
+ id: 'disableBtn',
+ title: 'Disable',
+ tooltip: 'Disable the run\'s trigger',
+ }),
+ enableRun: action => ({
+ action,
+ disabled: true,
+ disabledTitle: 'Run schedule already enabled',
+ id: 'enableBtn',
+ title: 'Enable',
+ tooltip: 'Enable the run\'s trigger',
+ }),
+ expandSections: action => ({
+ action,
+ icon: ExpandIcon,
+ id: 'expandBtn',
+ title: 'Expand all',
+ tooltip: 'Expand all sections',
+ }),
+ newExperiment: action => ({
+ action,
+ icon: AddIcon,
+ id: 'newExperimentBtn',
+ outlined: true,
+ title: 'Create an experiment',
+ tooltip: 'Create a new experiment',
+ }),
+ newRun: action => ({
+ action,
+ icon: AddIcon,
+ id: 'createNewRunBtn',
+ outlined: true,
+ primary: true,
+ title: 'Create run',
+ tooltip: 'Create a new run within this pipeline',
+ }),
+ refresh: action => ({
+ action,
+ id: 'refreshBtn',
+ title: 'Refresh',
+ tooltip: 'Refresh the list',
+ }),
+ restore: action => ({
+ action,
+ disabled: true,
+ disabledTitle: 'Select at least one resource to restore',
+ id: 'archiveBtn',
+ title: 'Archive',
+ tooltip: 'Archive',
+ }),
+ upload: action => ({
+ action,
+ icon: AddIcon,
+ id: 'uploadBtn',
+ outlined: true,
+ title: 'Upload pipeline',
+ tooltip: 'Upload pipeline',
+ }),
+};
+
+export default Buttons;
diff --git a/frontend/src/pages/AllRunsList.tsx b/frontend/src/pages/AllRunsList.tsx
index a8021101b4f..f42fa6e74e0 100644
--- a/frontend/src/pages/AllRunsList.tsx
+++ b/frontend/src/pages/AllRunsList.tsx
@@ -15,7 +15,7 @@
*/
import * as React from 'react';
-import AddIcon from '@material-ui/icons/Add';
+import Buttons from '../lib/Buttons';
import RunList from './RunList';
import { Page } from './Page';
import { RoutePage, QUERY_PARAMS } from '../components/Router';
@@ -42,33 +42,12 @@ class AllRunsList extends Page<{}, AllRunsListState> {
public getInitialToolbarState(): ToolbarProps {
return {
- actions: [{
- action: this._newExperimentClicked.bind(this),
- icon: AddIcon,
- id: 'newExperimentBtn',
- outlined: true,
- title: 'Create experiment',
- tooltip: 'Create a new experiment',
- }, {
- action: this._compareRuns.bind(this),
- disabled: true,
- disabledTitle: 'Select multiple runs to compare',
- id: 'compareBtn',
- title: 'Compare runs',
- tooltip: 'Compare up to 10 selected runs',
- }, {
- action: this._cloneRun.bind(this),
- disabled: true,
- disabledTitle: 'Select a run to clone',
- id: 'cloneBtn',
- title: 'Clone run',
- tooltip: 'Create a copy from this run\s initial state',
- }, {
- action: this.refresh.bind(this),
- id: 'refreshBtn',
- title: 'Refresh',
- tooltip: 'Refresh the list of runs',
- }],
+ actions: [
+ Buttons.newExperiment(this._newExperimentClicked.bind(this)),
+ Buttons.compareRuns(this._compareRuns.bind(this)),
+ Buttons.cloneRun(this._cloneRun.bind(this)),
+ Buttons.refresh(this.refresh.bind(this)),
+ ],
breadcrumbs: [],
pageTitle: 'Experiments',
};
diff --git a/frontend/src/pages/Compare.tsx b/frontend/src/pages/Compare.tsx
index 525d799ddbe..0e0386d4310 100644
--- a/frontend/src/pages/Compare.tsx
+++ b/frontend/src/pages/Compare.tsx
@@ -15,11 +15,10 @@
*/
import * as React from 'react';
+import Buttons from '../lib/Buttons';
import CollapseButton from '../components/CollapseButton';
-import CollapseIcon from '@material-ui/icons/UnfoldLess';
import CompareTable, { CompareTableProps } from '../components/CompareTable';
import CompareUtils from '../lib/CompareUtils';
-import ExpandIcon from '@material-ui/icons/UnfoldMore';
import Hr from '../atoms/Hr';
import PlotCard, { PlotCardProps } from '../components/PlotCard';
import RunList from './RunList';
@@ -27,6 +26,7 @@ import Separator from '../atoms/Separator';
import WorkflowParser from '../lib/WorkflowParser';
import { ApiRunDetail } from '../apis/run';
import { Apis } from '../lib/Apis';
+import { OutputArtifactLoader } from '../lib/OutputArtifactLoader';
import { Page } from './Page';
import { RoutePage, QUERY_PARAMS } from '../components/Router';
import { ToolbarProps } from '../components/Toolbar';
@@ -36,7 +36,6 @@ import { Workflow } from '../../third_party/argo-ui/argo_template';
import { classes, stylesheet } from 'typestyle';
import { commonCss, padding } from '../Css';
import { componentMap } from '../components/viewers/ViewerContainer';
-import { OutputArtifactLoader } from '../lib/OutputArtifactLoader';
import { logger } from '../lib/Utils';
const css = stylesheet({
@@ -83,19 +82,10 @@ class Compare extends Page<{}, CompareState> {
public getInitialToolbarState(): ToolbarProps {
return {
- actions: [{
- action: () => this.setState({ collapseSections: {} }),
- icon: ExpandIcon,
- id: 'expandBtn',
- title: 'Expand all',
- tooltip: 'Expand all sections',
- }, {
- action: this._collapseAllSections.bind(this),
- icon: CollapseIcon,
- id: 'collapseBtn',
- title: 'Collapse all',
- tooltip: 'Collapse all sections',
- }],
+ actions: [
+ Buttons.expandSections(() => this.setState({ collapseSections: {} })),
+ Buttons.collapseSections(this._collapseAllSections.bind(this)),
+ ],
breadcrumbs: [{ displayName: 'Experiments', href: RoutePage.EXPERIMENTS }],
pageTitle: 'Compare runs',
};
diff --git a/frontend/src/pages/ExperimentDetails.tsx b/frontend/src/pages/ExperimentDetails.tsx
index 6141fbc435c..be3e4c5894d 100644
--- a/frontend/src/pages/ExperimentDetails.tsx
+++ b/frontend/src/pages/ExperimentDetails.tsx
@@ -17,6 +17,7 @@
import * as React from 'react';
import AddIcon from '@material-ui/icons/Add';
import Button from '@material-ui/core/Button';
+import Buttons from '../lib/Buttons';
import Dialog from '@material-ui/core/Dialog';
import DialogActions from '@material-ui/core/DialogActions';
import DialogContent from '@material-ui/core/DialogContent';
@@ -163,12 +164,7 @@ class ExperimentDetails extends Page<{}, ExperimentDetailsState> {
public getInitialToolbarState(): ToolbarProps {
return {
- actions: [{
- action: this.refresh.bind(this),
- id: 'refreshBtn',
- title: 'Refresh',
- tooltip: 'Refresh',
- }],
+ actions: [Buttons.refresh(this.refresh.bind(this))],
breadcrumbs: [{ displayName: 'Experiments', href: RoutePage.EXPERIMENTS }],
// TODO: determine what to show if no props.
pageTitle: this.props ? this.props.match.params[RouteParams.experimentId] : '',
diff --git a/frontend/src/pages/ExperimentList.test.tsx b/frontend/src/pages/ExperimentList.test.tsx
index 98627f9d76f..06c553f8fb9 100644
--- a/frontend/src/pages/ExperimentList.test.tsx
+++ b/frontend/src/pages/ExperimentList.test.tsx
@@ -247,7 +247,7 @@ describe('ExperimentList', () => {
it('navigates to new experiment page when Create experiment button is clicked', async () => {
const tree = TestUtils.mountWithRouter();
const createBtn = (tree.instance() as ExperimentList)
- .getInitialToolbarState().actions.find(b => b.title === 'Create experiment');
+ .getInitialToolbarState().actions.find(b => b.title === 'Create an experiment');
await createBtn!.action();
expect(historyPushSpy).toHaveBeenLastCalledWith(RoutePage.NEW_EXPERIMENT);
});
@@ -255,7 +255,7 @@ describe('ExperimentList', () => {
it('always has new experiment button enabled', async () => {
const tree = await mountWithNExperiments(1, 1);
const calls = updateToolbarSpy.mock.calls[0];
- expect(calls[0].actions.find((b: any) => b.title === 'Create experiment')).not.toHaveProperty('disabled');
+ expect(calls[0].actions.find((b: any) => b.title === 'Create an experiment')).not.toHaveProperty('disabled');
tree.unmount();
});
diff --git a/frontend/src/pages/ExperimentList.tsx b/frontend/src/pages/ExperimentList.tsx
index 2e587a28f56..ee7c74736c8 100644
--- a/frontend/src/pages/ExperimentList.tsx
+++ b/frontend/src/pages/ExperimentList.tsx
@@ -15,7 +15,7 @@
*/
import * as React from 'react';
-import AddIcon from '@material-ui/icons/Add';
+import Buttons from '../lib/Buttons';
import CustomTable, { Column, Row, ExpandState } from '../components/CustomTable';
import RunList from './RunList';
import produce from 'immer';
@@ -59,33 +59,12 @@ class ExperimentList extends Page<{}, ExperimentListState> {
public getInitialToolbarState(): ToolbarProps {
return {
- actions: [{
- action: this._newExperimentClicked.bind(this),
- icon: AddIcon,
- id: 'newExperimentBtn',
- outlined: true,
- title: 'Create experiment',
- tooltip: 'Create a new experiment',
- }, {
- action: this._compareRuns.bind(this),
- disabled: true,
- disabledTitle: 'Select multiple runs to compare',
- id: 'compareBtn',
- title: 'Compare runs',
- tooltip: 'Compare up to 10 selected runs',
- }, {
- action: this._cloneRun.bind(this),
- disabled: true,
- disabledTitle: 'Select a run to clone',
- id: 'cloneBtn',
- title: 'Clone run',
- tooltip: 'Create a copy from this run\s initial state',
- }, {
- action: this.refresh.bind(this),
- id: 'refreshBtn',
- title: 'Refresh',
- tooltip: 'Refresh the list of experiments',
- }],
+ actions: [
+ Buttons.newExperiment(this._newExperimentClicked.bind(this)),
+ Buttons.compareRuns(this._compareRuns.bind(this)),
+ Buttons.cloneRun(this._cloneRun.bind(this)),
+ Buttons.refresh(this.refresh.bind(this)),
+ ],
breadcrumbs: [],
pageTitle: 'Experiments',
};
diff --git a/frontend/src/pages/PipelineDetails.tsx b/frontend/src/pages/PipelineDetails.tsx
index 3be2e9be343..aef3c934156 100644
--- a/frontend/src/pages/PipelineDetails.tsx
+++ b/frontend/src/pages/PipelineDetails.tsx
@@ -19,8 +19,8 @@ import 'codemirror/mode/yaml/yaml.js';
import * as JsYaml from 'js-yaml';
import * as React from 'react';
import * as StaticGraphParser from '../lib/StaticGraphParser';
-import AddIcon from '@material-ui/icons/Add';
import Button from '@material-ui/core/Button';
+import Buttons from '../lib/Buttons';
import Graph from '../components/Graph';
import InfoIcon from '@material-ui/icons/InfoOutlined';
import MD2Tabs from '../atoms/MD2Tabs';
@@ -114,15 +114,7 @@ class PipelineDetails extends Page<{}, PipelineDetailsState> {
public getInitialToolbarState(): ToolbarProps {
const fromRunId = new URLParser(this.props).get(QUERY_PARAMS.fromRunId);
- const actions: ToolbarActionConfig[] = [{
- action: () => this._createNewRun(),
- icon: AddIcon,
- id: 'createNewRunBtn',
- outlined: true,
- primary: true,
- title: 'Create run',
- tooltip: 'Create a new run within this pipeline',
- }];
+ let actions: ToolbarActionConfig[] = [Buttons.newRun(this._createNewRun.bind(this))];
if (fromRunId) {
return {
@@ -134,26 +126,17 @@ class PipelineDetails extends Page<{}, PipelineDetailsState> {
};
} else {
// Add buttons for creating experiment and deleting pipeline
- actions.push({
- action: this._createNewExperiment.bind(this),
- icon: AddIcon,
- id: 'createNewExperimentBtn',
- outlined: true,
- title: 'Create an experiment',
- tooltip: 'Create a new experiment beginning with this pipeline',
- }, {
- action: () => this.props.updateDialog({
+ actions = actions.concat([
+ Buttons.newExperiment(this._createNewExperiment.bind(this)),
+ Buttons.delete(() => this.props.updateDialog({
buttons: [
{ onClick: () => this._deleteDialogClosed(true), text: 'Delete' },
{ onClick: () => this._deleteDialogClosed(false), text: 'Cancel' },
],
onClose: () => this._deleteDialogClosed(false),
title: 'Delete this pipeline?',
- }),
- id: 'deleteBtn',
- title: 'Delete',
- tooltip: 'Delete this pipeline',
- });
+ }))
+ ]);
return {
actions,
breadcrumbs: [{ displayName: 'Pipelines', href: RoutePage.PIPELINES }],
diff --git a/frontend/src/pages/PipelineList.tsx b/frontend/src/pages/PipelineList.tsx
index 811fdb52701..2f7bf17bff6 100644
--- a/frontend/src/pages/PipelineList.tsx
+++ b/frontend/src/pages/PipelineList.tsx
@@ -15,7 +15,7 @@
*/
import * as React from 'react';
-import AddIcon from '@material-ui/icons/Add';
+import Buttons from '../lib/Buttons';
import CustomTable, { Column, Row } from '../components/CustomTable';
import UploadPipelineDialog, { ImportMethod } from '../components/UploadPipelineDialog';
import produce from 'immer';
@@ -27,7 +27,7 @@ import { RoutePage, RouteParams } from '../components/Router';
import { ToolbarProps } from '../components/Toolbar';
import { classes } from 'typestyle';
import { commonCss, padding } from '../Css';
-import { formatDateString, errorToMessage } from '../lib/Utils';
+import { formatDateString, errorToMessage, s } from '../lib/Utils';
interface PipelineListState {
pipelines: ApiPipeline[];
@@ -50,33 +50,18 @@ class PipelineList extends Page<{}, PipelineListState> {
public getInitialToolbarState(): ToolbarProps {
return {
- actions: [{
- action: () => this.setStateSafe({ uploadDialogOpen: true }),
- icon: AddIcon,
- id: 'uploadBtn',
- outlined: true,
- title: 'Upload pipeline',
- tooltip: 'Upload pipeline',
- }, {
- action: () => this.refresh(),
- id: 'refreshBtn',
- title: 'Refresh',
- tooltip: 'Refresh',
- }, {
- action: () => this.props.updateDialog({
+ actions: [
+ Buttons.upload(() => this.setStateSafe({ uploadDialogOpen: true })),
+ Buttons.refresh(this.refresh.bind(this)),
+ Buttons.delete(() => this.props.updateDialog({
buttons: [
{ onClick: async () => await this._deleteDialogClosed(true), text: 'Delete' },
{ onClick: async () => await this._deleteDialogClosed(false), text: 'Cancel' },
],
onClose: async () => await this._deleteDialogClosed(false),
- title: `Delete ${this.state.selectedIds.length} pipeline${this.state.selectedIds.length === 1 ? '' : 's'}?`,
- }),
- disabled: true,
- disabledTitle: 'Select at least one pipeline to delete',
- id: 'deleteBtn',
- title: 'Delete',
- tooltip: 'Delete',
- }],
+ title: `Delete ${this.state.selectedIds.length} pipeline${s(this.state.selectedIds)}?`,
+ })),
+ ],
breadcrumbs: [],
pageTitle: 'Pipelines',
};
@@ -190,7 +175,7 @@ class PipelineList extends Page<{}, PipelineListState> {
}
private async _uploadDialogClosed(confirmed: boolean, name: string, file: File | null, url: string,
- method: ImportMethod, description?: string): Promise {
+ method: ImportMethod, description?: string): Promise {
if (!confirmed
|| (method === ImportMethod.LOCAL && !file)
diff --git a/frontend/src/pages/RecurringRunDetails.tsx b/frontend/src/pages/RecurringRunDetails.tsx
index a35b6645d6e..bc2f50d68c4 100644
--- a/frontend/src/pages/RecurringRunDetails.tsx
+++ b/frontend/src/pages/RecurringRunDetails.tsx
@@ -15,6 +15,7 @@
*/
import * as React from 'react';
+import Buttons from '../lib/Buttons';
import DetailsTable from '../components/DetailsTable';
import RunUtils from '../lib/RunUtils';
import { ApiExperiment } from '../apis/experiment';
@@ -44,38 +45,19 @@ class RecurringRunDetails extends Page<{}, RecurringRunConfigState> {
public getInitialToolbarState(): ToolbarProps {
return {
- actions: [{
- action: this.refresh.bind(this),
- id: 'refreshBtn',
- title: 'Refresh',
- tooltip: 'Refresh',
- }, {
- action: () => this._setEnabledState(true),
- disabled: true,
- disabledTitle: 'Run schedule already enabled',
- id: 'enableBtn',
- title: 'Enable',
- tooltip: 'Enable the run\'s trigger',
- }, {
- action: () => this._setEnabledState(false),
- disabled: true,
- disabledTitle: 'Run schedule already disabled',
- id: 'disableBtn',
- title: 'Disable',
- tooltip: 'Disable the run\'s trigger',
- }, {
- action: () => this.props.updateDialog({
+ actions: [
+ Buttons.refresh(this.refresh.bind(this)),
+ Buttons.enableRun(() => this._setEnabledState(true)),
+ Buttons.disableRun(() => this._setEnabledState(false)),
+ Buttons.delete(() => this.props.updateDialog({
buttons: [
{ onClick: () => this._deleteDialogClosed(true), text: 'Delete' },
{ onClick: () => this._deleteDialogClosed(false), text: 'Cancel' },
],
onClose: () => this._deleteDialogClosed(false),
title: 'Delete this recurring run?',
- }),
- id: 'deleteBtn',
- title: 'Delete',
- tooltip: 'Delete this recurring run',
- }],
+ })),
+ ],
breadcrumbs: [],
pageTitle: '',
};
diff --git a/frontend/src/pages/RunDetails.test.tsx b/frontend/src/pages/RunDetails.test.tsx
index 5c4d264a6e1..2cefd52d814 100644
--- a/frontend/src/pages/RunDetails.test.tsx
+++ b/frontend/src/pages/RunDetails.test.tsx
@@ -139,7 +139,7 @@ describe('RunDetails', () => {
await TestUtils.flushPromises();
const instance = tree.instance() as RunDetails;
const cloneBtn = instance.getInitialToolbarState().actions.find(
- b => b.title === 'Clone');
+ b => b.title === 'Clone run');
expect(cloneBtn).toBeDefined();
await cloneBtn!.action();
expect(historyPushSpy).toHaveBeenCalledTimes(1);
diff --git a/frontend/src/pages/RunDetails.tsx b/frontend/src/pages/RunDetails.tsx
index bfd987ef24b..5a95d3d50a8 100644
--- a/frontend/src/pages/RunDetails.tsx
+++ b/frontend/src/pages/RunDetails.tsx
@@ -16,6 +16,7 @@
import * as React from 'react';
import Banner, { Mode } from '../components/Banner';
+import Buttons from '../lib/Buttons';
import CircularProgress from '@material-ui/core/CircularProgress';
import DetailsTable from '../components/DetailsTable';
import Graph from '../components/Graph';
@@ -110,17 +111,10 @@ class RunDetails extends Page {
public getInitialToolbarState(): ToolbarProps {
return {
- actions: [{
- action: this._cloneRun.bind(this),
- id: 'cloneBtn',
- title: 'Clone',
- tooltip: 'Clone',
- }, {
- action: this.refresh.bind(this),
- id: 'refreshBtn',
- title: 'Refresh',
- tooltip: 'Refresh',
- }],
+ actions: [
+ Buttons.cloneRun(this._cloneRun.bind(this)),
+ Buttons.refresh(this.refresh.bind(this)),
+ ],
breadcrumbs: [{ displayName: 'Experiments', href: RoutePage.EXPERIMENTS }],
pageTitle: this.props.runId!,
};
diff --git a/frontend/src/pages/__snapshots__/AllRunsList.test.tsx.snap b/frontend/src/pages/__snapshots__/AllRunsList.test.tsx.snap
index 6d8103e2fe2..a0b661bbc65 100644
--- a/frontend/src/pages/__snapshots__/AllRunsList.test.tsx.snap
+++ b/frontend/src/pages/__snapshots__/AllRunsList.test.tsx.snap
@@ -30,7 +30,7 @@ exports[`AllRunsList disables clone button and enables compare button when multi
"icon": [Function],
"id": "newExperimentBtn",
"outlined": true,
- "title": "Create experiment",
+ "title": "Create an experiment",
"tooltip": "Create a new experiment",
},
Object {
@@ -53,7 +53,7 @@ exports[`AllRunsList disables clone button and enables compare button when multi
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh the list of runs",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [],
@@ -67,7 +67,7 @@ exports[`AllRunsList disables clone button and enables compare button when multi
"icon": [Function],
"id": "newExperimentBtn",
"outlined": true,
- "title": "Create experiment",
+ "title": "Create an experiment",
"tooltip": "Create a new experiment",
},
Object {
@@ -90,7 +90,7 @@ exports[`AllRunsList disables clone button and enables compare button when multi
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh the list of runs",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [],
@@ -134,7 +134,7 @@ exports[`AllRunsList enables clone button when one run is selected 1`] = `
"icon": [Function],
"id": "newExperimentBtn",
"outlined": true,
- "title": "Create experiment",
+ "title": "Create an experiment",
"tooltip": "Create a new experiment",
},
Object {
@@ -157,7 +157,7 @@ exports[`AllRunsList enables clone button when one run is selected 1`] = `
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh the list of runs",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [],
@@ -171,7 +171,7 @@ exports[`AllRunsList enables clone button when one run is selected 1`] = `
"icon": [Function],
"id": "newExperimentBtn",
"outlined": true,
- "title": "Create experiment",
+ "title": "Create an experiment",
"tooltip": "Create a new experiment",
},
Object {
@@ -194,7 +194,7 @@ exports[`AllRunsList enables clone button when one run is selected 1`] = `
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh the list of runs",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [],
@@ -231,7 +231,7 @@ exports[`AllRunsList renders all runs 1`] = `
"icon": [Function],
"id": "newExperimentBtn",
"outlined": true,
- "title": "Create experiment",
+ "title": "Create an experiment",
"tooltip": "Create a new experiment",
},
Object {
@@ -254,7 +254,7 @@ exports[`AllRunsList renders all runs 1`] = `
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh the list of runs",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [],
diff --git a/frontend/src/pages/__snapshots__/ExperimentDetails.test.tsx.snap b/frontend/src/pages/__snapshots__/ExperimentDetails.test.tsx.snap
index 5ea5eda6a77..54e48c81993 100644
--- a/frontend/src/pages/__snapshots__/ExperimentDetails.test.tsx.snap
+++ b/frontend/src/pages/__snapshots__/ExperimentDetails.test.tsx.snap
@@ -146,7 +146,7 @@ exports[`ExperimentDetails fetches this experiment's recurring runs 1`] = `
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -179,7 +179,7 @@ exports[`ExperimentDetails fetches this experiment's recurring runs 1`] = `
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -198,7 +198,7 @@ exports[`ExperimentDetails fetches this experiment's recurring runs 1`] = `
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -247,7 +247,7 @@ exports[`ExperimentDetails fetches this experiment's recurring runs 1`] = `
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -280,7 +280,7 @@ exports[`ExperimentDetails fetches this experiment's recurring runs 1`] = `
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -299,7 +299,7 @@ exports[`ExperimentDetails fetches this experiment's recurring runs 1`] = `
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -490,7 +490,7 @@ exports[`ExperimentDetails removes all description text after second newline and
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -523,7 +523,7 @@ exports[`ExperimentDetails removes all description text after second newline and
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -542,7 +542,7 @@ exports[`ExperimentDetails removes all description text after second newline and
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -591,7 +591,7 @@ exports[`ExperimentDetails removes all description text after second newline and
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -624,7 +624,7 @@ exports[`ExperimentDetails removes all description text after second newline and
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -643,7 +643,7 @@ exports[`ExperimentDetails removes all description text after second newline and
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -821,7 +821,7 @@ exports[`ExperimentDetails renders a page with no runs or recurring runs 1`] = `
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -854,7 +854,7 @@ exports[`ExperimentDetails renders a page with no runs or recurring runs 1`] = `
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -873,7 +873,7 @@ exports[`ExperimentDetails renders a page with no runs or recurring runs 1`] = `
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -922,7 +922,7 @@ exports[`ExperimentDetails renders a page with no runs or recurring runs 1`] = `
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -955,7 +955,7 @@ exports[`ExperimentDetails renders a page with no runs or recurring runs 1`] = `
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -974,7 +974,7 @@ exports[`ExperimentDetails renders a page with no runs or recurring runs 1`] = `
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -1150,7 +1150,7 @@ exports[`ExperimentDetails uses an empty string if the experiment has no descrip
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -1183,7 +1183,7 @@ exports[`ExperimentDetails uses an empty string if the experiment has no descrip
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -1202,7 +1202,7 @@ exports[`ExperimentDetails uses an empty string if the experiment has no descrip
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -1251,7 +1251,7 @@ exports[`ExperimentDetails uses an empty string if the experiment has no descrip
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -1284,7 +1284,7 @@ exports[`ExperimentDetails uses an empty string if the experiment has no descrip
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
@@ -1303,7 +1303,7 @@ exports[`ExperimentDetails uses an empty string if the experiment has no descrip
"action": [Function],
"id": "refreshBtn",
"title": "Refresh",
- "tooltip": "Refresh",
+ "tooltip": "Refresh the list",
},
],
"breadcrumbs": Array [
diff --git a/test/frontend-integration-test/helloworld.spec.js b/test/frontend-integration-test/helloworld.spec.js
index f55f29a05f1..ac2a78a0001 100644
--- a/test/frontend-integration-test/helloworld.spec.js
+++ b/test/frontend-integration-test/helloworld.spec.js
@@ -63,7 +63,7 @@ describe('deploy helloworld sample run', () => {
});
it('creates a new experiment out of this pipeline', () => {
- $('#createNewExperimentBtn').click();
+ $('#newExperimentBtn').click();
browser.waitUntil(() => {
return new URL(browser.getUrl()).hash.startsWith('#/experiments/new');
}, waitTimeout);