-
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.
- Loading branch information
0 parents
commit b643f7e
Showing
20 changed files
with
7,246 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This project uses EditorConfig (http://editorconfig.org) to standardize | ||
# tabulation, charset and other attributes of source files. Please head to | ||
# http://editorconfig.org/#download to check if your editor comes with | ||
# EditorConfig bundled or to download a plugin. | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = tab | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[{*.json,*.yml}] | ||
indent_style = space | ||
indent_size = 2 |
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 @@ | ||
node_modules |
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 @@ | ||
language: node_js | ||
|
||
os: | ||
- linux | ||
- osx | ||
- windows | ||
|
||
node_js: | ||
- "12" | ||
- "8" | ||
|
||
cache: | ||
npm: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
concordialang-codeceptjs-testcafe | ||
|
||
Copyright (c) Thiago Delgado Pinto | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as | ||
published by the Free Software Foundation, either version 3 of the | ||
License, or (at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Affero General Public License for more details. | ||
|
||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
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,11 @@ | ||
import { HelperConfiguration } from 'concordialang-codeceptjs-core'; | ||
import { TestScriptExecutionOptions } from 'concordialang-plugin'; | ||
export declare class TestCafeHelperConfiguration implements HelperConfiguration { | ||
readonly _browser: string; | ||
readonly _url: string; | ||
constructor(_browser?: string, _url?: string); | ||
/** @inheritdoc */ | ||
name(): string; | ||
/** @inheritdoc */ | ||
generate(execOptions: TestScriptExecutionOptions): any; | ||
} |
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,25 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TestCafeHelperConfiguration = void 0; | ||
class TestCafeHelperConfiguration { | ||
constructor(_browser = 'chrome', _url = 'http://localhost') { | ||
this._browser = _browser; | ||
this._url = _url; | ||
} | ||
/** @inheritdoc */ | ||
name() { | ||
return 'TestCafe'; | ||
} | ||
/** @inheritdoc */ | ||
generate(execOptions) { | ||
const [browser] = execOptions.target | ||
? execOptions.target.split(',').map(t => t.trim()) | ||
: [this._browser]; | ||
return { | ||
"browser": browser, | ||
"url": this._url, | ||
"show": !(true === execOptions.headless), | ||
}; | ||
} | ||
} | ||
exports.TestCafeHelperConfiguration = TestCafeHelperConfiguration; |
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 @@ | ||
declare function is(it: any): boolean; | ||
declare function isInCI(): boolean; |
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,10 @@ | ||
function is(it) { | ||
return !!it && it !== '0' && it !== 'false'; | ||
} | ||
function isInCI() { | ||
return is(process.env['CI']); | ||
} | ||
// Returns with an error when *not* in CI mode | ||
if (!isInCI()) { | ||
process.exit(1); | ||
} |
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,9 @@ | ||
import { CodeceptJS, TestScriptExecutor } from 'concordialang-codeceptjs-core'; | ||
/** | ||
* Plug-in for CodeceptJS with TestCafé. | ||
* | ||
* @author Thiago Delgado Pinto | ||
*/ | ||
export declare class CodeceptJSTestCafe extends CodeceptJS { | ||
protected createTestScriptExecutor(): TestScriptExecutor; | ||
} |
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,16 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CodeceptJSTestCafe = void 0; | ||
const concordialang_codeceptjs_core_1 = require("concordialang-codeceptjs-core"); | ||
const TestCafeHelperConfiguration_1 = require("./TestCafeHelperConfiguration"); | ||
/** | ||
* Plug-in for CodeceptJS with TestCafé. | ||
* | ||
* @author Thiago Delgado Pinto | ||
*/ | ||
class CodeceptJSTestCafe extends concordialang_codeceptjs_core_1.CodeceptJS { | ||
createTestScriptExecutor() { | ||
return new concordialang_codeceptjs_core_1.TestScriptExecutor([new TestCafeHelperConfiguration_1.TestCafeHelperConfiguration()]); | ||
} | ||
} | ||
exports.CodeceptJSTestCafe = CodeceptJSTestCafe; |
Empty file.
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,16 @@ | ||
console.log('\u001B[96m'); // cyan | ||
console.log('Thank you for installing the plug-in\u001B[94m concordialang-codeceptjs-testcafe \u001B[96m\n'); | ||
console.log('To support database scripts in you tests, execute the corresponding command:\n'); | ||
console.log('| driver | command to install | note |'); | ||
console.log('| ------------- | ------------------------------ | ------------ |'); | ||
console.log('| CSV files |\u001B[94m npm i -D database-js-csv \u001B[96m | |'); | ||
console.log('| Excel files |\u001B[94m npm i -D database-js-xlsx \u001B[96m | |'); | ||
console.log('| Firebase |\u001B[94m npm i -D database-js-firebase \u001B[96m | |'); | ||
console.log('| INI files |\u001B[94m npm i -D database-js-ini \u001B[96m | |'); | ||
console.log('| JSON files |\u001B[94m npm i -D database-js-json \u001B[96m | |'); | ||
console.log('| MySQL |\u001B[94m npm i -D database-js-mysql \u001B[96m | |'); | ||
console.log('| MS Access |\u001B[94m npm i -D database-js-adodb \u001B[96m | Windows only |'); | ||
console.log('| MS SQL Server |\u001B[94m npm i -D database-js-mssql \u001B[96m | |'); | ||
console.log('| PostgreSQL |\u001B[94m npm i -D database-js-postgres \u001B[96m | |'); | ||
console.log('| SQLite |\u001B[94m npm i -D database-js-sqlite \u001B[96m | |'); | ||
console.log('\u001B[0m'); // light gray |
Oops, something went wrong.