Skip to content

Commit 12f5d73

Browse files
msivasubramaniaanvrubezhny
authored andcommitted
removed filter
1 parent 45d257a commit 12f5d73

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

src/componentsView.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class ComponentInfoCommands extends ComponentInfo {
6565
if (thisCommands === undefined) {
6666
this.children = [];
6767
} else {
68-
this.children = thisCommands.filter((command) => command.exec).flatMap(c => new ComponentInfoCommand(this, c));
68+
this.children = thisCommands.flatMap(c => new ComponentInfoCommand(this, c) );
6969
}
7070
}
7171
return this.children;

test/ui/suite/componentCommands.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,11 @@ export function testComponentCommands(path: string) {
6363
//get expected commands
6464
const devfile = fs.readFileSync(pth.join(path, componentName, 'devfile.yaml'), 'utf-8');
6565
const parsedDevfile = parse(devfile) as { [key: string]: any };
66-
const expectedCommands = parsedDevfile.commands
67-
.filter((command: { exec: any; }) => command.exec)
68-
.map((command: { id: any; }) => command.id);
66+
const expectedCommands = [];
67+
68+
parsedDevfile.commands.forEach((command) => {
69+
expectedCommands.push(command.id);
70+
});
6971

7072
//get component
7173
const components = await section.getVisibleItems();
@@ -86,7 +88,7 @@ export function testComponentCommands(path: string) {
8688
});
8789

8890
it('Command can be ran', async function () {
89-
this.timeout(30_000);
91+
9092
// get first command's label and select it
9193
const commandName = await commands[0].getLabel();
9294
await commands[0].select();

0 commit comments

Comments
 (0)