Skip to content

Commit

Permalink
UpdateCI - Functional tests - Added testCafe quarantineMode parameter…
Browse files Browse the repository at this point in the history
… and applied it for scheduler.
  • Loading branch information
AntonSermyazhko committed Jan 22, 2020
1 parent c736c2b commit b4113c5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ matrix:
- { TARGET: test, BROWSER: firefox, JQUERY: true, CONSTEL: ui.scheduler }
- { TARGET: test, BROWSER: firefox, JQUERY: true, CONSTEL: viz }
- { TARGET: test_functional, COMPONENT: dataGrid }
- { TARGET: test_functional, COMPONENT: scheduler }
- { TARGET: test_functional, COMPONENT: scheduler, QUARANTINE_MODE: true }
- { TARGET: test_functional, COMPONENT: editors }
- { TARGET: test_functional, COMPONENT: navigation }
- { TARGET: test_themebuilder }
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ env:
- TARGET=test BROWSER=firefox JQUERY=true CONSTEL=ui.scheduler
- TARGET=test BROWSER=firefox JQUERY=true CONSTEL=viz
- TARGET=test_functional COMPONENT=dataGrid
- TARGET=test_functional COMPONENT=scheduler
- TARGET=test_functional COMPONENT=scheduler QUARANTINE_MODE=true
- TARGET=test_functional COMPONENT=editors
- TARGET=test_functional COMPONENT=navigation
- TARGET=test_themebuilder
Expand Down
5 changes: 3 additions & 2 deletions docker-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ function run_test_functional {
npm i
npm run build

local args="--browsers chrome:headless";
[ "$COMPONENT" ] && args="$args --componentFolder $COMPONENT";
local args="--browsers=chrome:headless";
[ -n "$COMPONENT" ] && args="$args --componentFolder=$COMPONENT";
[ -n "$QUARANTINE_MODE" ] && args="$args --quarantineMode=true";

npm run test-functional -- $args
}
Expand Down
2 changes: 1 addition & 1 deletion shippable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ env:
- TARGET=test BROWSER=firefox JQUERY=true CONSTEL=ui.scheduler
- TARGET=test BROWSER=firefox JQUERY=true CONSTEL=viz
- TARGET=test_functional COMPONENT=dataGrid
- TARGET=test_functional COMPONENT=scheduler
- TARGET=test_functional COMPONENT=scheduler QUARANTINE_MODE=true
- TARGET=test_functional COMPONENT=editors
- TARGET=test_functional COMPONENT=navigation
- TARGET=test_themebuilder
Expand Down
9 changes: 6 additions & 3 deletions testing/functional/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,19 @@ createTestCafe('localhost', 1437, 1438)
let componentFolder = args.componentFolder.trim();

componentFolder = componentFolder ? `${componentFolder}/**` : '**';
const browsers = args.browsers.split(' ');
const quarantineMode = args.quarantineMode;

const runner = testCafe.createRunner()
.browsers(args.browsers.split(' '))
.browsers(browsers)
.src([`./testing/functional/tests/${componentFolder}/*.ts`]);

if(testName) {
runner.filter(name => name === testName);
}

return runner.run({
quarantineMode: false
quarantineMode: quarantineMode
});
})
.then(failedCount => {
Expand All @@ -38,7 +40,8 @@ function getArgs() {
default: {
browsers: 'chrome',
test: '',
componentFolder: ''
componentFolder: '',
quarantineMode: false
}
});
}

0 comments on commit b4113c5

Please sign in to comment.