Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ambiguity from 'View logs' messages #3181

Merged
merged 2 commits into from
Jan 3, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class OutputChannelLogger
message: string,
show: (message: string, ...items: string[]) => Thenable<string | undefined>,
): Promise<void> {
const label = "Show Log";
const label = "View extension logs";
const result = await show(message, label);

if (result === label) {
Expand Down
6 changes: 3 additions & 3 deletions extensions/ql-vscode/src/stories/common/Alert.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ ErrorExample.args = {
<>
Request to
https://api.github.com/repos/octodemo/Hello-World/code-scanning/codeql/queries
failed. <VSCodeLink>Check logs</VSCodeLink> and try running this query
again.
failed. <VSCodeLink>View actions logs</VSCodeLink> and try running this
query again.
</>
),
};
Expand All @@ -86,7 +86,7 @@ ErrorWithButtons.args = {
"Request to https://api.github.com/repos/octodemo/Hello-World/code-scanning/codeql/queries failed. Try running this query again.",
actions: (
<>
<VSCodeButton appearance="secondary">View logs</VSCodeButton>
<VSCodeButton appearance="secondary">View actions logs</VSCodeButton>
<VSCodeButton>Retry</VSCodeButton>
</>
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ const getMessage = (failureReason: VariantAnalysisFailureReason): ReactNode => {
return (
<>
The GitHub Actions workflow run has failed.{" "}
<VSCodeLink onClick={openLogs}>Check logs</VSCodeLink> and try running
this query again.
<VSCodeLink onClick={openLogs}>View actions logs</VSCodeLink> and try
running this query again.
</>
);
case VariantAnalysisFailureReason.InternalError:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const VariantAnalysisStatusStats = ({
<span>{completedAt !== undefined ? formatDate(completedAt) : "-"}</span>
)}
{onViewLogsClick && (
<VSCodeLink onClick={onViewLogsClick}>View logs</VSCodeLink>
<VSCodeLink onClick={onViewLogsClick}>View actions logs</VSCodeLink>
)}
</Container>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ describe(VariantAnalysisStats.name, () => {
completedAt: new Date(),
});

await userEvent.click(screen.getByText("View logs"));
await userEvent.click(screen.getByText("View actions logs"));
expect(onViewLogsClick).toHaveBeenCalledTimes(1);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe(VariantAnalysisStatusStats.name, () => {
onViewLogsClick: () => undefined,
});

expect(screen.getByText("View logs")).toBeInTheDocument();
expect(screen.getByText("View actions logs")).toBeInTheDocument();
});

it("renders when there isn't a viewLogs links", () => {
Expand All @@ -63,6 +63,6 @@ describe(VariantAnalysisStatusStats.name, () => {
onViewLogsClick: undefined,
});

expect(screen.queryByText("View logs")).not.toBeInTheDocument();
expect(screen.queryByText("View actions logs")).not.toBeInTheDocument();
});
});
Loading