Skip to content

Commit

Permalink
test: Modify terminal view tests to work also with zsh (redhat-develo…
Browse files Browse the repository at this point in the history
…per#1419)

Signed-off-by: Dominik Jelinek <[email protected]>
  • Loading branch information
djelinek authored and Lukas Grossmann committed Aug 1, 2024
1 parent 9161103 commit 6862855
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions tests/test-project/src/test/bottomBar/views.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,13 @@ describe('Output View/Text Views', function () {
try {
await terminal.selectChannel(`1: ${terminalName}`);
} catch (err) {
terminalName = 'sh';
await terminal.selectChannel(`1: ${terminalName}`);
try {
terminalName = 'sh';
await terminal.selectChannel(`1: ${terminalName}`);
} catch (error) {
terminalName = 'zsh';
await terminal.selectChannel(`1: ${terminalName}`);
}
}
const text = await terminal.getText();
expect(text).not.empty;
Expand All @@ -113,12 +118,12 @@ describe('Output View/Text Views', function () {
});

it('newTerminal opens a new term channel', async function () {
const expectedChannel = `2: ${terminalName}`;
const expectedChannel = [`2: ${terminalName}`, `2: zsh`];
await terminal.newTerminal();
await VSBrowser.instance.driver.wait(
async () => {
try {
return (await terminal.getCurrentChannel()) === expectedChannel;
return expectedChannel.includes(await terminal.getCurrentChannel());
} catch (err) {
return false;
}
Expand All @@ -127,7 +132,7 @@ describe('Output View/Text Views', function () {
undefined,
1000,
);
expect(await terminal.getCurrentChannel()).equals(expectedChannel);
expect(expectedChannel).contains(await terminal.getCurrentChannel());
});
});
});

0 comments on commit 6862855

Please sign in to comment.