Skip to content

Commit

Permalink
New release for version 3.5.0 (#1209)
Browse files Browse the repository at this point in the history
Merge master into release to release V3.5.0
  • Loading branch information
chunweii authored Sep 30, 2023
1 parent 107af02 commit 6adb0b2
Show file tree
Hide file tree
Showing 101 changed files with 6,968 additions and 1,170 deletions.
19 changes: 19 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: 'Features'
labels:
- 'category.Feature'
- 'category.Enhancement'
- title: 'Bug Fixes'
labels:
- 'category.Bug'
- title: 'Maintenance'
label: 'category.Chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.

template: |
## Changelog
$CHANGES
81 changes: 0 additions & 81 deletions .github/workflows/deployment-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,84 +56,3 @@ jobs:
- name: Set upload_url Context
id: set_upload_url
run: echo "::set-output name=upload_url::${{ steps.draft_release.outputs.upload_url }}"

deploy_linux:
runs-on: ubuntu-latest
needs: draft_release
strategy:
matrix:
node-version: [14.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build
run: |
npm install
npm run electron:linux
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.draft_release.outputs.upload_url }}
asset_path: ./release/CATcher-${{ needs.draft_release.outputs.version_num }}.AppImage
asset_name: CATcher-${{ needs.draft_release.outputs.version_num }}.AppImage
asset_content_type: application/octet-stream

deploy_windows:
runs-on: windows-latest
needs: draft_release
strategy:
matrix:
node-version: [14.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build
run: |
npm install
npm run electron:windows
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.draft_release.outputs.upload_url }}
asset_path: ./release/CATcher ${{ needs.draft_release.outputs.version_num }}.exe
asset_name: CATcher-${{ needs.draft_release.outputs.version_num }}.exe
asset_content_type: application/octet-stream

deploy_macos:
runs-on: macos-latest
needs: draft_release
strategy:
matrix:
node-version: [14.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build
run: |
npm install
npm run electron:mac
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.draft_release.outputs.upload_url }}
asset_path: ./release/CATcher-${{ needs.draft_release.outputs.version_num }}.dmg
asset_name: CATcher-${{ needs.draft_release.outputs.version_num }}.dmg
asset_content_type: application/octet-stream
3 changes: 0 additions & 3 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npm run lint
- run: npm test -- "--karma-config=./tests/karma.ci.conf.js"
- run: npm run webdriver-manager update -- --gecko false --standalone false --versions.chrome $(curl https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$(google-chrome --version | grep -iEo "[0-9]{1,3}" | head -n1))
- run: npm run webdriver-manager update -- --chrome false --standalone false
- run: npm run actions:e2e

macos-setup-and-tests:
runs-on: macos-latest
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Playwright Tests
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: |
npm install
npm update
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/release
main.js
src/**/*.js
electron-utils/*.js
*.js.map

# tests coverage
Expand Down Expand Up @@ -53,3 +52,6 @@ Thumbs.db

# graphql types
graphql/graphql-types.ts
/test-results/
/playwright-report/
/playwright/.cache/
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# .npmrc
engine-strict=true
12 changes: 1 addition & 11 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css"
],
"scripts": [
"node_modules/marked/lib/marked.js",
"node_modules/marked/marked.min.js",
"node_modules/prismjs/prism.js",
"node_modules/prismjs/components/prism-csharp.min.js",
"node_modules/prismjs/components/prism-css.min.js"
Expand All @@ -49,7 +49,6 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
Expand All @@ -72,7 +71,6 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
Expand All @@ -95,7 +93,6 @@
"optimization": false,
"outputHashing": "all",
"sourceMap": true,
"extractCss": true,
"namedChunks": false,
"aot": false,
"extractLicenses": true,
Expand Down Expand Up @@ -149,13 +146,6 @@
"tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "CATcher:serve:test"
}
}
}
}
Expand Down
14 changes: 8 additions & 6 deletions codegen.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
overwrite: true
schema: "graphql/schema/github-schema.ts"
schema: 'graphql/schema/github-schema.ts'
documents:
- graphql/fragments/*.graphql
- graphql/queries/*.graphql
- graphql/mutations/*.graphql
generates:
graphql/graphql-types.ts:
plugins:
- "typescript"
- "typescript-operations"
- "typescript-document-nodes"
- "typescript-resolvers"
- "fragment-matcher"
- 'typescript'
- 'typescript-operations'
- 'typescript-document-nodes'
- 'typescript-resolvers'
- 'fragment-matcher'
config:
apolloClientVersion: 3
48 changes: 27 additions & 21 deletions e2e/page-objects/bugReporting.po.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
import { by, element } from 'protractor';
import { expect, Page } from '@playwright/test';

interface BugReport {
title: string;
severityLabel?: string;
bugTypeLabel?: string;
}

export class BugReportingPage {
readonly page: Page;

constructor(page: Page) {
this.page = page;
}

async getPhaseDescription() {
return element(by.css('app-root')).element(by.id('phase-descriptor')).getText();
return this.page.locator('app-layout-header').textContent();
}

async accessNewBugReportingPage() {
return element(by.className('create-new-bug-report-button')).click();
return this.page.getByRole('button', { name: 'New Issue' }).click();
}

/**
Expand All @@ -16,23 +28,17 @@ export class BugReportingPage {
* @param bugTypeLabel Bug-Report's Type.
* @returns true if a unique Bug-Report is present, false otherwise.
*/
async isBugReportPresent({ title, severityLabel, bugTypeLabel }: { title: string; severityLabel?: string; bugTypeLabel?: string }) {
return element
.all(by.className('mat-row'))
.filter(async (element, index) => {
// Obtain Bug-Report Element's data
const titleText: string = await element.getText();
const severityText = await element.element(by.className('mat-column-severity')).getText();
const responseText = await element.element(by.className('mat-column-type')).getText();

// Compare based on provided information
return (
titleText.includes(title) &&
(severityLabel == null ? severityText.includes(severityLabel) : true) &&
(bugTypeLabel == null ? responseText.includes(bugTypeLabel) : true)
);
})
.count()
.then((count: number) => count === 1);
async isBugReportPresent({ title, severityLabel, bugTypeLabel }: BugReport) {
let allRows = this.page.locator('.mat-row').filter({ hasText: title });

if (severityLabel != null) {
allRows = allRows.filter({ hasText: severityLabel });
}

if (bugTypeLabel != null) {
allRows = allRows.filter({ hasText: bugTypeLabel });
}

return allRows.count().then((count: number) => count === 1);
}
}
7 changes: 0 additions & 7 deletions e2e/page-objects/header.po.ts

This file was deleted.

42 changes: 21 additions & 21 deletions e2e/page-objects/login.po.ts
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
import { browser, element, by, ExpectedConditions } from 'protractor';
import { expect, Page } from '@playwright/test';

export class LoginPage {
navigateToRoot() {
return browser.get('/');
}
readonly page: Page;

async getTitle() {
return element(by.css('app-root')).element(by.css('app-layout-header')).getText();
constructor(page: Page) {
this.page = page;
}

async getConfirmationScreenTitle() {
return element(by.className('login-title')).getText();
async navigateToRoot() {
await this.page.goto('/');
}

async login() {
await this.selectSession();
}

async confirmUser() {
await browser.wait(ExpectedConditions.presenceOf(element(by.className('sign-in-button'))));
const confirm = element(by.className('sign-in-button'));
await confirm.click();
}

/**
* Steps to select session on the login page.
*/
private async selectSession() {
const profiles = element(by.css('app-root')).element(by.css('app-profiles'));

await profiles.click();
const options = element.all(by.className('mat-option')).get(1);
await options.click();
await this.page.locator('app-profiles').click();
await this.page.locator('mat-option').locator('nth=1').click();
await this.page.getByRole('button', { name: 'Submit' }).click();
}

const button = element(by.className('sign-in-button'));
await button.click();
/**
* Steps to confirm user when redirected back by Github OAuth
*/
async confirmUser() {
await expect(this.page.getByText('Confirm Login Account')).toHaveText('Confirm Login Account');
const login_button = this.page.getByRole('button', { name: 'github-logo Continue as CAT-Tester' });
await expect(login_button).toBeVisible();
await login_button.click();
}

async bypassAuthentication() {
Expand Down
Loading

0 comments on commit 6adb0b2

Please sign in to comment.