-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:dBildungsplattform/schulportal-test…
…automatisierung into SPSH-1131
- Loading branch information
Showing
42 changed files
with
693 additions
and
316 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,57 @@ | ||
/* eslint-env node */ | ||
module.exports = { | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/stylistic', | ||
'plugin:playwright/recommended' | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/stylistic', | ||
'plugin:playwright/recommended' | ||
], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint'], | ||
root: true, | ||
parserOptions: { | ||
sourceType: 'module' | ||
ecmaVersion: 'latest', | ||
parser: '@typescript-eslint/parser' | ||
}, | ||
rules: { | ||
// 'prettier/prettier': ['warn'], | ||
// 'import/no-extraneous-dependencies': ['error', { devDependencies: false }], | ||
// 'import/no-cycle': ['error'], | ||
// ...typescriptConfigs.recommended.rules, | ||
// ...playwright.configs['flat/recommended'].rules | ||
'no-void': ['error', { allowAsStatement: true }], | ||
'no-console': ['warn'], | ||
'max-classes-per-file': ['error', 1], | ||
'class-methods-use-this': 'off', | ||
'no-param-reassign': 'warn', | ||
'no-underscore-dangle': 'error', | ||
'@typescript-eslint/no-inferrable-types': ['off'], | ||
'@typescript-eslint/typedef': [ | ||
'warn', | ||
{ | ||
arrayDestructuring: true, | ||
arrowParameter: true, | ||
memberVariableDeclaration: true, | ||
objectDestructuring: true, | ||
parameter: true, | ||
propertyDeclaration: true, | ||
variableDeclaration: true, | ||
variableDeclarationIgnoreFunction: true | ||
} | ||
], | ||
// '@typescript-eslint/unbound-method': 'error', | ||
// '@typescript-eslint/explicit-member-accessibility': 'error', | ||
'@typescript-eslint/explicit-function-return-type': 'error', | ||
'@typescript-eslint/no-explicit-any': 'error', | ||
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '_.+' }], | ||
// "@typescript-eslint/no-unnecessary-condition": "error", | ||
'@typescript-eslint/no-empty-interface': [ | ||
'error', | ||
{ | ||
allowSingleExtends: true | ||
} | ||
], | ||
|
||
// currently disabled rules - TODO: fix them | ||
'playwright/no-conditional-in-test': 'off' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Scheduled main crossBrowser Firefox | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '10 6 * * *' | ||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: Remove Microsoft APT and Update Packages | ||
run: | | ||
sudo rm /etc/apt/sources.list.d/microsoft-prod.list | ||
sudo apt-get update || true | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps | ||
- name: Run Playwright tests | ||
run: ENV='dev' FRONTEND_URL='https://main.dev.spsh.dbildungsplattform.de/' npx playwright test -g "@crossBrowser" --project "firefox" | ||
env: | ||
USER: '${{ secrets.USER }}' | ||
PW: '${{ secrets.PW }}' | ||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30npm login | ||
- uses: RocketChat/[email protected] | ||
if: failure() | ||
with: | ||
type: ${{ job.status }} | ||
job_name: 'Playwright Job Status: ' | ||
url: ${{ secrets.RC_WEBHOOK }} | ||
channel: '#SPSH-Test-Automation' | ||
username: Playwright Notificator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/prettierrc", | ||
"printWidth": 120, | ||
"singleAttributePerLine": true, | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export const testschule = "Testschule Schulportal"; | ||
export const testschule665 = "Testschule-PW665"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const typelehrer = "LEHR"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const email = "E-Mail"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export const LONG = '@long'; | ||
export const SHORT = '@short'; | ||
export const STAGE = '@stage'; | ||
export const SMOKE = '@smoke'; | ||
export const SMOKE = '@smoke'; | ||
export const BROWSER = '@crossBrowser'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { faker } from "@faker-js/faker/locale/de"; | ||
|
||
export async function generateLehrerVorname(){ | ||
return "TAuto-PW-V-" + faker.person.firstName(); | ||
} | ||
|
||
export async function generateLehrerNachname(){ | ||
return "TAuto-PW-N-" + faker.person.lastName(); | ||
} | ||
|
||
export async function generateRolleName(){ | ||
return "TAuto-PW-R-" + faker.lorem.word({ length: { min: 8, max: 12 }}); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import moment from 'moment'; | ||
|
||
export async function gotoTargetURL(page, target: string) { | ||
await page.goto(target); | ||
} | ||
|
||
export async function generateDateToday() { | ||
return moment().format('DD.MM.YYYY'); | ||
} | ||
|
||
export async function generateDateFuture(days: number, months: number) { | ||
return moment().add({ days: days, months: months }).format('DD.MM.YYYY'); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.