Skip to content

Commit

Permalink
chore(tests): script to find ignored tests (#396)
Browse files Browse the repository at this point in the history
* chore(test): add script to find exclusive tests (fdescribe and fit)

* test(e2e): run all e2e tests
  • Loading branch information
André Kilchenmann committed Feb 25, 2021
1 parent 0f94df6 commit 9ca249d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
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

0 comments on commit 9ca249d

Please sign in to comment.