Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions src/App.firstWorkflowNavigation.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ vi.mock("./screens/Welcome", () => ({
Welcome: ({ onShow, onSample }: { onShow: () => void; onSample: () => void }) => (
<div>
<button type="button" onClick={onShow}>
Show OpenAdapt your task
Show OpenAdapt your workflow
</button>
<button type="button" onClick={onSample}>
See it work on a sample app
Expand Down Expand Up @@ -121,18 +121,18 @@ it("stays on the welcome screen when its durable stage cannot be saved", async (

render(<App />);
const start = await screen.findByRole("button", {
name: "Show OpenAdapt your task",
name: "Show OpenAdapt your workflow",
});
fireEvent.click(start);

const alert = await screen.findByRole("alert");
expect(alert.textContent).toContain(
"Desktop couldn't save your place in setup. Check the local engine, then try again.",
);
expect(screen.getByRole("button", { name: "Show OpenAdapt your task" })).toBeTruthy();
expect(screen.getByRole("button", { name: "Show OpenAdapt your workflow" })).toBeTruthy();
expect(screen.queryByText("First workflow recording")).toBeNull();

fireEvent.click(screen.getByRole("button", { name: "Show OpenAdapt your task" }));
fireEvent.click(screen.getByRole("button", { name: "Show OpenAdapt your workflow" }));
await waitFor(() =>
expect(screen.getByText("First workflow recording")).toBeTruthy(),
);
Expand Down Expand Up @@ -259,7 +259,7 @@ it("keeps navigation locked while the supervised run is running", async () => {

await waitFor(() =>
expect(
(screen.getByRole("button", { name: "Tasks" }) as HTMLButtonElement)
(screen.getByRole("button", { name: "Workflows" }) as HTMLButtonElement)
.disabled,
).toBe(true),
);
Expand Down Expand Up @@ -303,7 +303,7 @@ it("keeps navigation locked from recording stop until Check it opens", async ()
capture_id: "capture-1",
});
});
const tasks = screen.getByRole("button", { name: "Tasks" });
const tasks = screen.getByRole("button", { name: "Workflows" });
expect((tasks as HTMLButtonElement).disabled).toBe(true);

firstState = { ...firstState, stage: "review", workflow_id: "workflow-1" };
Expand Down Expand Up @@ -333,9 +333,9 @@ it("puts Settings and every expert tool behind the gear", async () => {
});

render(<App />);
expect(await screen.findByRole("heading", { name: "Tasks" })).toBeTruthy();
expect(await screen.findByRole("heading", { name: "Workflows" })).toBeTruthy();
const nav = screen.getByRole("navigation", { name: "Desktop navigation" });
expect(nav.textContent).toBe("TasksNeeds youResults");
expect(nav.textContent).toBe("WorkflowsNeeds youResults");

fireEvent.click(screen.getByRole("button", { name: "Settings and advanced tools" }));
expect(screen.getByRole("menuitem", { name: /^Settings/ })).toBeTruthy();
Expand Down Expand Up @@ -371,12 +371,12 @@ it("leaves loading when authoring status is missing", async () => {

render(<App />);
expect(
await screen.findByRole("button", { name: "Show OpenAdapt your task" }),
await screen.findByRole("button", { name: "Show OpenAdapt your workflow" }),
).toBeTruthy();
expect(screen.queryByText("Loading…")).toBeNull();
});

it("won't start another task while an uncertain first run is unchecked", async () => {
it("won't start another workflow while an uncertain first run is unchecked", async () => {
vi.mocked(engineTry).mockImplementation(async (command, _params, fallback) => {
const boot = bootDefaults(command);
if (boot !== undefined) return boot;
Expand All @@ -394,13 +394,13 @@ it("won't start another task while an uncertain first run is unchecked", async (

render(<App />);
expect(await screen.findByText("First supervised replay")).toBeTruthy();
fireEvent.click(screen.getByRole("button", { name: "Tasks" }));
fireEvent.click(screen.getByRole("button", { name: "Workflows" }));
fireEvent.click(
await screen.findByRole("button", { name: "Show OpenAdapt a new task" }),
await screen.findByRole("button", { name: "Record a workflow" }),
);

expect((await screen.findByRole("alert")).textContent).toContain(
"Check the target of your last run before you record another task.",
"Check the target of your last run before you record another workflow.",
);
expect(await screen.findByText("First supervised replay")).toBeTruthy();
expect(screen.queryByText("First workflow recording")).toBeNull();
Expand All @@ -427,7 +427,7 @@ it("says Local only, not synced, when nothing is backed up to Cloud", async () =
bootTasks({ authenticated: true }, () => ({ state: "local", queued: 0 }));

render(<App />);
expect(await screen.findByRole("heading", { name: "Tasks" })).toBeTruthy();
expect(await screen.findByRole("heading", { name: "Workflows" })).toBeTruthy();
const status = screen.getByLabelText("Desktop status");
await waitFor(() => expect(status.textContent).toContain("Local only"));
expect(status.textContent).not.toMatch(/synced/i);
Expand All @@ -439,7 +439,7 @@ it("never shows a sync state the engine didn't report", async () => {
bootTasks({ authenticated: true }, (fallback) => fallback);

render(<App />);
expect(await screen.findByRole("heading", { name: "Tasks" })).toBeTruthy();
expect(await screen.findByRole("heading", { name: "Workflows" })).toBeTruthy();
const status = screen.getByLabelText("Desktop status");
expect(status.textContent).not.toMatch(/synced|local/i);
});
12 changes: 6 additions & 6 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ type PairingState = {
};

const NAV: { route: "tasks" | "needs" | "results"; label: string }[] = [
{ route: "tasks", label: "Tasks" },
{ route: "tasks", label: "Workflows" },
{ route: "needs", label: "Needs you" },
{ route: "results", label: "Results" },
];
Expand Down Expand Up @@ -175,7 +175,7 @@ function DesktopBrand({ onOpen }: { onOpen?: () => void }) {
}
return (
<button
aria-label="Open OpenAdapt Desktop tasks"
aria-label="Open OpenAdapt Desktop workflows"
className="product-brand"
onClick={onOpen}
type="button"
Expand All @@ -193,7 +193,7 @@ function EngineOffline({ onRetry, busy }: { onRetry: () => void; busy: boolean }
<div className="content simple">
<PageHead
title="Waiting for the local engine"
sub="Desktop can't reach the OpenAdapt engine on this computer, so it can't show your tasks yet. It tries again when the engine starts. If this doesn't clear, quit and reopen OpenAdapt."
sub="Desktop can't reach the OpenAdapt engine on this computer, so it can't show your workflows yet. It tries again when the engine starts. If this doesn't clear, quit and reopen OpenAdapt."
/>
<div className="row">
<Button variant="primary" disabled={busy} onClick={onRetry}>
Expand Down Expand Up @@ -695,7 +695,7 @@ export default function App() {
const resumed = routeForFirstWorkflow(current);
if (resumed) setRoute(resumed);
setFirstWorkflowStageError(
"Check the target of your last run before you record another task.",
"Check the target of your last run before you record another workflow.",
);
return;
}
Expand Down Expand Up @@ -797,7 +797,7 @@ export default function App() {
const navigationLockTitle = recording
? "Stop and save this recording before you leave."
: workflowCompiling
? "Keep this screen open while OpenAdapt builds the task from your recording."
? "Keep this screen open while OpenAdapt builds the workflow from your recording."
: firstWorkflowRunning
? "Keep the run open until it stops."
: firstRunPersistencePending
Expand Down Expand Up @@ -863,7 +863,7 @@ export default function App() {
</span>
)}
{recording ? (
<span className="recording" title="OpenAdapt is recording your task">
<span className="recording" title="OpenAdapt is recording your workflow">
<StatusDot tone="warn" />
<strong>Recording</strong>
</span>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/attention.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export function attentionCopy(item: AttentionItem): AttentionCopy {
? `OpenAdapt couldn't find “${targetName(item)}” on the screen`
: "OpenAdapt couldn't find the next thing to click",
sentence:
"The app may look different from when you showed the task. It stopped instead of guessing where to click.",
"The app may look different from when you showed the workflow. It stopped instead of guessing where to click.",
prevented: "It stopped before saving. Nothing was written.",
preventedTone: "ok",
choices: [...choices].sort((left, right) =>
Expand Down
6 changes: 3 additions & 3 deletions src/lib/checkPlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const CASE_COPY: Record<string, { label: string; explanation: string }> = {
"A second copy of the save button appears on the page. OpenAdapt must stop instead of guessing.",
},
stale_identity: {
label: "Record changed mid-task",
label: "Record changed during the run",
explanation:
"The record on screen changes after OpenAdapt checked it. OpenAdapt must stop before saving.",
},
Expand Down Expand Up @@ -189,7 +189,7 @@ function caseView(
* program, a kind this version doesn't know) may run steps Check it can't see.
*/
const SHOWN_NODE_KINDS = new Set(["action", "terminal", "branch", "loop", "business_decision"]);
const HIDDEN_STEPS_CAPTION = "Runs a part of the task that isn't shown step by step here";
const HIDDEN_STEPS_CAPTION = "Runs a part of the workflow that isn't shown step by step here";

/** The control a step clicks, by its structure, before the OCR-based title. */
function stepCaption(
Expand Down Expand Up @@ -255,7 +255,7 @@ export function checkPlan(response: QualificationProject): CheckPlan {
canArm: Boolean(control?.identity.can_arm),
identityText: params.length
? `Before saving, it checks that the record on screen matches the ${params.join(" and ")} you give it. If they differ, it stops and asks you.`
: "Before saving, it checks the record on screen against the details it saw when you showed the task. If they differ, it stops and asks you.",
: "Before saving, it checks the record on screen against the details it saw when you showed the workflow. If they differ, it stops and asks you.",
checked: effects.length > 0 && tiers.length === effects.length,
hasRecordChecks: effects.length > 0 || node.effects.length > 0,
checkText: effects.length
Expand Down
2 changes: 1 addition & 1 deletion src/lib/outcomes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export function resultCopy(plain: Pick<PlainResult, "key" | "nothingWritten">):
: {
label: "Didn't finish",
sentence:
"It couldn't complete the task, and it can't tell whether anything was saved.",
"It couldn't complete the workflow, and it can't tell whether anything was saved.",
next: "Check the record before you try again.",
tone: "crit",
};
Expand Down
2 changes: 1 addition & 1 deletion src/lib/parseItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export function parseItems(
if (inputs.length === 0) {
return {
...empty,
error: "This task doesn't take any values, so there's nothing to paste.",
error: "This workflow doesn't take any values, so there's nothing to paste.",
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export function taskStatus(
icon: "half",
next: "check",
nextLabel: "Continue checking",
detail: "Finish checking this task before it runs on real items.",
detail: "Finish checking this workflow before it runs on real items.",
};
}
return {
Expand Down
12 changes: 6 additions & 6 deletions src/screens/Advanced.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export function Advanced({

const tools = [
{
title: "All task versions",
body: "Every version of every task with replay, governed run, run detail, and teach controls.",
title: "All workflow versions",
body: "Every version of every workflow with replay, governed run, run detail, and teach controls.",
action: onLibrary,
label: "Open all versions",
},
Expand Down Expand Up @@ -70,20 +70,20 @@ export function Advanced({
<div className="content simple">
<PageHead
title="Advanced"
sub="For automation engineers and IT. These tools work on the same tasks as the main screens."
sub="For automation engineers and IT. These tools work on the same workflows as the main screens."
/>
<section className="advanced-tool">
<div>
<h2>Exact checks</h2>
<p>
The full readiness test for one task: the program map, each step's
The full readiness test for one workflow: the program map, each step's
risk, right-record and record-check settings, test cases, approval,
locking, export, and deploy.
</p>
</div>
{tasks.length > 0 ? (
<div className="advanced-picker">
<Field label="Task" htmlFor={`${id}-task`}>
<Field label="Workflow" htmlFor={`${id}-task`}>
<select
id={`${id}-task`}
className="input"
Expand All @@ -102,7 +102,7 @@ export function Advanced({
</Button>
</div>
) : (
<p className="simple-sub">Show OpenAdapt a task first.</p>
<p className="simple-sub">Record a workflow first.</p>
)}
</section>
{tools.map((tool) => (
Expand Down
18 changes: 9 additions & 9 deletions src/screens/CheckIt.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function engine(initial: ReturnType<typeof project>) {
});
}

it("says what the task changes and how it checks, in plain words", async () => {
it("says what the workflow changes and how it checks, in plain words", async () => {
engine(project());
render(<CheckIt workflowId="wf-1" onExactChecks={() => {}} onRun={() => {}} />);

Expand Down Expand Up @@ -180,12 +180,12 @@ function unprovenProgram() {
return base;
}

it("never calls a task read-only while a step's effect is unknown", async () => {
it("never calls a workflow read-only while a step's effect is unknown", async () => {
engine(unprovenProgram());
render(<CheckIt workflowId="wf-1" onExactChecks={() => {}} onRun={() => {}} />);

expect(await screen.findByText(/can't tell yet whether this task saves anything/)).toBeTruthy();
expect(screen.queryByText(/This task only reads/)).toBeNull();
expect(await screen.findByText(/can't tell yet whether this workflow saves anything/)).toBeTruthy();
expect(screen.queryByText(/This workflow only reads/)).toBeNull();
expect(screen.getByText(/2 steps might change something/)).toBeTruthy();
expect(screen.getByText("Type the insurance no")).toBeTruthy();
expect(screen.getByText("Click “日”")).toBeTruthy();
Expand All @@ -198,13 +198,13 @@ it("never calls a task read-only while a step's effect is unknown", async () =>
expect((run as HTMLButtonElement).disabled).toBe(true);
});

it("says a task only reads when every step is proven read-only", async () => {
it("says a workflow only reads when every step is proven read-only", async () => {
const readOnly = unprovenProgram();
readOnly.graph.nodes = [readOnly.graph.nodes[1]];
engine(readOnly);
render(<CheckIt workflowId="wf-1" onExactChecks={() => {}} onRun={() => {}} />);

expect(await screen.findByText(/This task only reads/)).toBeTruthy();
expect(await screen.findByText(/This workflow only reads/)).toBeTruthy();
});

it("lists a save the program declares without an effect and asks how to check it", async () => {
Expand All @@ -226,7 +226,7 @@ it("lists a save the program declares without an effect and asks how to check it
expect(await screen.findByText("Click the spot you clicked when you showed it")).toBeTruthy();
expect(screen.getByText("OpenAdapt doesn't know yet what this step saves.")).toBeTruthy();
expect(screen.getByText("OpenAdapt doesn't know yet how to confirm this save.")).toBeTruthy();
expect(screen.queryByText(/This task only reads/)).toBeNull();
expect(screen.queryByText(/This workflow only reads/)).toBeNull();
expect(screen.getByText(/can't tell yet whether 1 other step changes anything/)).toBeTruthy();
fireEvent.click(screen.getByRole("button", { name: "These look right" }));
await waitFor(() =>
Expand Down Expand Up @@ -400,7 +400,7 @@ it("runs one drill at a time in the signed-in browser", async () => {
render(<CheckIt workflowId="wf-1" onExactChecks={() => {}} onRun={() => {}} />);

expect(await screen.findByText(/in your signed-in browser/)).toBeTruthy();
expect(screen.getByText(/Open the screen where the task starts before you run it/)).toBeTruthy();
expect(screen.getByText(/Open the screen where the workflow starts before you run it/)).toBeTruthy();
fireEvent.click(screen.getByRole("button", { name: "Run the next drill" }));

expect(await screen.findByText(/then run the next drill/)).toBeTruthy();
Expand Down Expand Up @@ -466,7 +466,7 @@ it("describes each drill as the change Flow makes before the save", async () =>
for (const label of [
"Wrong record",
"Two possible matches",
"Record changed mid-task",
"Record changed during the run",
"No record check",
"Weak record check",
]) {
Expand Down
Loading
Loading