cy.get('[data-cy=new-process-panel]').contains('Run workflow').click();
cy.get('[data-cy=process-io-card]').should('contain', 'exposed_value_xyz');
- cy.get('[data-cy=process-io-card]').should('contain', 'exposed_value_xyz');
+ cy.get('[data-cy=process-io-card]').should('contain', 'Cannot display secret');
cy.get('[data-cy=process-io-card]').should('not.contain', 'secret_value_xyz');
cy.url().then((url) => {
basename?: string;
}
+export interface SecretInclude {
+ $include: string;
+}
+
export interface GenericCommandInputParameter<Type, Value> {
id: string;
label?: string;
export type FloatArrayCommandInputParameter = GenericArrayCommandInputParameter<CWLType.FLOAT, string>;
export type FileArrayCommandInputParameter = GenericArrayCommandInputParameter<CWLType.FILE, File>;
export type DirectoryArrayCommandInputParameter = GenericArrayCommandInputParameter<CWLType.DIRECTORY, Directory>;
+export type SecretCommandInputParameter = GenericArrayCommandInputParameter<CWLType.STRING, SecretInclude>;
-type SecretInclude = {
- $include: string;
-}
export type WorkflowInputsData = {
[key: string]: boolean | number | string | File | Directory | SecretInclude;
return null;
};
+export const isSecret = (input: GenericCommandInputParameter<any, any>) =>
+ (typeof input.value === 'object') && input.value.$include?.startsWith("/secrets/");
+
export const stringifyInputType = ({ type }: CommandInputParameter) => {
- if (typeof type === 'string') {
+ if (typeof type === 'string') {
return type;
} else if (type instanceof Array) {
return type.join(' | ');
IntCommandInputParameter,
isArrayOfType,
isPrimitiveOfType,
+ isSecret,
StringArrayCommandInputParameter,
StringCommandInputParameter,
getEnumType,
export const getIOParamDisplayValue = (auth: AuthState, input: CommandInputParameter | CommandOutputParameter, pdh?: string): ProcessIOValue[] => {
switch (true) {
- case (typeof input.value === 'object') && input.value.$include?.startsWith("/secrets/"):
+ case isSecret(input):
return [{ display: <SecretValue /> }];
case isPrimitiveOfType(input, CWLType.BOOLEAN):