Skip to content

Commit

Permalink
third try on playwright test
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanak-michal committed Apr 12, 2024
1 parent 4782b73 commit 7b15153
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ jobs:
run: npx playwright install --with-deps chromium

- name: Run Playwright tests
run: npx playwright test

- name: Report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
run: npm run playwright

# - name: Report
# uses: actions/upload-artifact@v4
# if: always()
# with:
# name: playwright-report
# path: playwright-report/
# retention-days: 30
6 changes: 4 additions & 2 deletions e2e/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ test('perform ThingsDB test', async ({ page }) => {
});
expect(connected).toBeTruthy();

const ping = await page.evaluate(() => window["thingsdb"].ping())
expect(ping).toBeTruthy();
await page.evaluate(() => window["thingsdb"].ping())
await page.evaluate(() => window["thingsdb"].auth())

const hello = await page.evaluate(() => window["thingsdb"].query('@thingsdb', '"Hello World!"'));
expect(hello).toBe('Hello World!');
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"private": true,
"main": "dist/thingsdb.js",
"scripts": {
"test": "jest",
"test": "jest ./test",
"build": "webpack --mode=production",
"dev": "webpack --mode=development",
"start": "webpack-dev-server --mode development",
Expand Down

0 comments on commit 7b15153

Please sign in to comment.