Skip to content
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
2 changes: 1 addition & 1 deletion src/components/RouterScreen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe("menu rendering", () => {
const frame = r.lastFrame()!;
const entries = menuEntries(frame);
expect(entries.screens).toContain("create");
expect(entries.screens).not.toContain("eval");
expect(entries.screens).toContain("eval");
const visible = [...entries.screens, ...entries.cliOnly];
const projectCommands = createProjectHandlers(r.core, testIO().io)
.slice(1)
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const PROJECT_REQUIRED_OPTIONS = [
"traces",
"export",
];
const NO_PROJECT_HIDDEN_OPTIONS = [...PROJECT_REQUIRED_OPTIONS, "eval"];
const NO_PROJECT_HIDDEN_OPTIONS = [...PROJECT_REQUIRED_OPTIONS];

export interface RootScreenProps extends ScreenProps {
inProject: boolean;
Expand Down
9 changes: 3 additions & 6 deletions src/tui/tui.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,17 +249,14 @@ describe("TUI launch", () => {
return streams.stdout();
}

test("outside a project the first frame shows create under the banner and hides project commands and eval", async () => {
test("outside a project the first frame shows create under the banner and hides project commands but shows eval", async () => {
const out = await launchRootMenu(undefined);
expect(out.indexOf(BANNER)).toBeGreaterThan(-1);
expect(out.indexOf(BANNER)).toBeLessThan(out.indexOf(CREATE_ROW));
for (const hidden of [
"add project resources",
"deploy the project to AWS",
"evaluate and optimize",
]) {
for (const hidden of ["add project resources", "deploy the project to AWS"]) {
expect(out).not.toContain(hidden);
}
expect(out).toContain("evaluate and optimize");
});

test("inside a project create is never drawn and the rest of the menu is", async () => {
Expand Down
Loading