Skip to content

Commit

Permalink
adding platform tests on CI build.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ committed Jun 6, 2024
1 parent 6e6e847 commit 1a235d4
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,29 @@ on:
branches: [ main ]
release:
types: [published]
schedule:
cron: '0 0 * * *' # Run every day at midnight
jobs:

test:
name: Test
test-js:
name: Test JS
runs-on: ubuntu-latest
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
steps:
- uses: actions/setup-node@v4
with:
node-version: 21
registry-url: 'https://registry.npmjs.org'
- name: Checkout
uses: actions/checkout@v2
- name: Test
run: |
make test-js
test-go:
name: Test Go
runs-on: ubuntu-latest
container: ghcr.io/packagrio/packagr:latest-golang
env:
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ serve-backend: deps
test:
go test ./...

test-js:
cd js && yarn run e2e

# Steps related to building and publishing fasten-sources-js library.

build-js:
Expand Down
2 changes: 1 addition & 1 deletion js/e2e/src/cigna_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { test, expect } from "@playwright/test";
import {getEndpointDefinition} from '../utils';
import {generateSourceAuthorizeUrl} from '../../src/connect/authorization-url';

test("Cigna Login Flow", async ({page}, testInfo) => {
test.skip("Cigna Login Flow", async ({page}, testInfo) => {
try {
await page.evaluate(_ => {},`browserstack_executor: ${JSON.stringify({action: "setSessionName", arguments: {name:testInfo.title}})}`);
await page.waitForTimeout(5000);
Expand Down
2 changes: 1 addition & 1 deletion js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"e2e": "npx playwright test --headed",
"e2e": "npx playwright test",
"e2e-debug": "npx playwright test --headed --debug"
},
"author": "Jason Kulatunga <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion js/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default {
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
reporter: process.env.CI ? 'html' : 'line',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
Expand Down

0 comments on commit 1a235d4

Please sign in to comment.