From 1ab895f2d93cc8a83148ae946bd9e43c42e754d6 Mon Sep 17 00:00:00 2001 From: minnakt <47064971+minnakt@users.noreply.github.com> Date: Thu, 22 Feb 2024 13:17:42 -0500 Subject: [PATCH 1/5] DEVPROD-4251: Resolve flake in select_execution.ts (#2271) --- cypress/integration/task/select_execution.ts | 5 ++++- src/gql/generated/types.ts | 1 + .../task/executionDropdown/ExecutionSelector.tsx | 13 +++++++------ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/cypress/integration/task/select_execution.ts b/cypress/integration/task/select_execution.ts index c14430fe4e..6140faee0d 100644 --- a/cypress/integration/task/select_execution.ts +++ b/cypress/integration/task/select_execution.ts @@ -8,12 +8,15 @@ describe("Selecting Task Execution", () => { }); it("Should take user to the latest execution if no execution is specified", () => { + cy.location("search").should("include", "execution=1"); cy.dataCy("execution-select").contains("Execution 2 (latest)"); cy.dataCy("task-status-badge").contains("Will Run"); - cy.location("search").should("include", "execution=1"); }); it("Toggling a different execution should change the displayed execution", () => { + cy.location("search").should("include", "execution=1"); + cy.dataCy("execution-select").contains("Execution 2 (latest)"); + cy.dataCy("execution-select").should("have.attr", "aria-disabled", "false"); cy.dataCy("execution-select").click(); cy.dataCy("execution-0").click(); cy.dataCy("task-status-badge").contains("Succeeded"); diff --git a/src/gql/generated/types.ts b/src/gql/generated/types.ts index 53fdab5136..c75561a068 100644 --- a/src/gql/generated/types.ts +++ b/src/gql/generated/types.ts @@ -2402,6 +2402,7 @@ export type SpruceConfig = { jira?: Maybe; keys: Array; providers?: Maybe; + secretFields: Array; slack?: Maybe; spawnHost: SpawnHostConfig; ui?: Maybe; diff --git a/src/pages/task/executionDropdown/ExecutionSelector.tsx b/src/pages/task/executionDropdown/ExecutionSelector.tsx index 02a99d5b0b..9c4343c65a 100644 --- a/src/pages/task/executionDropdown/ExecutionSelector.tsx +++ b/src/pages/task/executionDropdown/ExecutionSelector.tsx @@ -37,16 +37,17 @@ export const ExecutionSelect: React.FC = ({ const getDateCopy = useDateFormat(); return ( { updateExecution(selected); }} + placeholder="Choose an execution" + value={`Execution ${formatZeroIndexForDisplay(currentExecution)}${ + currentExecution === latestExecution ? " (latest)" : "" + }`} > {allExecutions?.map((singleExecution) => { const optionText = `Execution ${formatZeroIndexForDisplay( @@ -58,9 +59,9 @@ export const ExecutionSelect: React.FC = ({ return (