Skip to content

Commit c20c1cb

Browse files
msivasubramaniaanvrubezhny
authored andcommitted
fixed test cases
1 parent e939d4b commit c20c1cb

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

test/ui/suite/componentCommands.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,9 @@ 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 = [];
67-
68-
parsedDevfile.commands.forEach((command) => {
69-
expectedCommands.push(command.id);
70-
});
66+
const expectedCommands = parsedDevfile.commands
67+
.filter((command: { exec: any; }) => command.exec)
68+
.map((command: { id: unknown; }) => command.id);
7169

7270
//get component
7371
const components = await section.getVisibleItems();
@@ -88,7 +86,6 @@ export function testComponentCommands(path: string) {
8886
});
8987

9088
it('Command can be ran', async function () {
91-
this.timeout(60000);
9289

9390
// get first command's label and select it
9491
const commandName = await commands[0].getLabel();

0 commit comments

Comments
 (0)