diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 8dc1085..01076bc 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -4,15 +4,27 @@ on: pull_request jobs: build: - - runs-on: ubuntu-latest + runs-on: windows-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@master - with: - node-version: 12.x - - name: Install - run: npm ci - - name: E2E - run: npm run se2e + - uses: actions/checkout@v2 + - uses: actions/setup-node@master + with: + node-version: 12.x + - name: Install + run: npm ci + - name: E2E + uses: GabrielBB/xvfb-action@v1.0 + with: + run: npm run se2e + - name: Email results + uses: wadeww/send-email-action@master + with: + server_address: smtp.gmail.com + server_port: 465 + username: ${{secrets.MAIL_USERNAME}} + password: ${{secrets.MAIL_PASSWORD}} + subject: E2E results + body: E2E tests against ${{github.ref}} Status ${{job.status}} + to: wade.w.wilkey@gmail.com + from: meeee diff --git a/se2e/test.e2e-spec.ts b/se2e/test.e2e-spec.ts index 94b4fb2..04f12bf 100644 --- a/se2e/test.e2e-spec.ts +++ b/se2e/test.e2e-spec.ts @@ -2,7 +2,7 @@ import { Application } from "spectron"; import { expect } from "chai"; import * as path from "path"; -describe("hi", () => { +describe("E2E Tests", () => { let app; before(async () => { let electronPath = path.join( @@ -28,8 +28,25 @@ describe("hi", () => { startTimeout: 20000, chromeDriverLogPath: "../chromedriverlog.txt" }); + await app.start(); await app.client.waitUntilWindowLoaded(); + + await new Promise((resolve) => setTimeout(resolve, 5000)); + + const bounds = await app.browserWindow.getBounds(); + + console.log('Window Size:', bounds.width, bounds.height); + app.browserWindow.maximize(); + + const maxBounds = await app.browserWindow.getBounds(); + console.log('Max Window Size:', maxBounds.width, maxBounds.height); + + await app.browserWindow.setSize(1500, 900); + const myBounds = await app.browserWindow.getBounds(); + console.log('Set Window Size:', myBounds.width, myBounds.height); + + }); after(() => { diff --git a/src/app/app.component.html b/src/app/app.component.html index 139e8f7..7e26506 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -383,7 +383,7 @@ - {{ title }} app is running! + {{ title }} app is running yeah!