Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bezbac committed Jan 7, 2025
1 parent df8cc7c commit 100f241
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
2 changes: 2 additions & 0 deletions tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.tui-test/
node_modules/
4 changes: 2 additions & 2 deletions tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ RUN apt update
# Install curl
RUN apt install curl -y

# Install expect
RUN apt install expect -y
# Install Node.js and npm
RUN apt install -y nodejs npm

# Install zsh
RUN apt install zsh -y
Expand Down
7 changes: 7 additions & 0 deletions tests/example.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { test, expect } from "@microsoft/tui-test";

test.use({ program: { file: "zellij" } });

test("shows current pane", async ({ terminal }) => {
await expect(terminal.getByText("Pane #1", { full: true })).toBeVisible();
});
3 changes: 0 additions & 3 deletions tests/expect.sh

This file was deleted.

2 changes: 1 addition & 1 deletion tests/integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ cd ..
docker build -t zellij:test -f ./tests/Dockerfile .

# Run the expect script inside the docker container
docker run -v ./tests/expect.sh:/expect.sh -t zellij:test -c "/expect.sh"
docker run -v ./tests/package.json:/tests/package.json -v ./tests/example.test.js:/tests/example.test.js -t zellij:test -c "cd /tests && npm install && ./node_modules/.bin/tui-test"
6 changes: 6 additions & 0 deletions tests/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"type": "module",
"dependencies": {
"@microsoft/tui-test": "0.0.1-rc.5"
}
}

0 comments on commit 100f241

Please sign in to comment.