Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(tests): script to find ignored tests #396

Merged
merged 5 commits into from Feb 25, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Expand Up @@ -22,6 +22,8 @@ jobs:
run: npm install
- name: Build app in prod mode
run: npm run build-prod
- name: Find ignored tests
run: ./find-ignored-tests.sh
- name: Run unit tests
run: npm run test-ci
- name: Run e2e tests
Expand Down
2 changes: 1 addition & 1 deletion e2e/src/footer.e2e-spec.ts
@@ -1,7 +1,7 @@
import { browser } from 'protractor';
import { FooterPage } from './page-objects/footer.po';

fdescribe('footer', () => {
describe('footer', () => {
let footer: FooterPage;

beforeEach(() => {
Expand Down
20 changes: 20 additions & 0 deletions find-ignored-tests.sh
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

# find deactivated and exclusive tests: fdescirbe / fit / xdescribe / xit
# list=$(find . -name "*spec.ts" | xargs grep 'fit\|fdescribe\|xdescribe\|xit')

# TODO: the following command has to be replaced with the one above
# as soon DSP-Admin is connected with DSP-VRE again

# Find exclusive tests: fdescribe / fit
exclusive=$(find . -name "*spec.ts" | xargs grep 'fit\|fdescribe')

# get all exclusive tests
hits=$(find . -name "*spec.ts" | xargs grep 'fit\|fdescribe' | wc -l)
if [ $hits -ne 0 ]; then
for i in "${exclusive[@]}"; do
echo "WARNING: Exclusive tests found: "
echo "$i"
done
exit 1
fi