-
-
Notifications
You must be signed in to change notification settings - Fork 731
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
injecting test & siute to container (#4785)
* injecting test & siute to container * added container const * fix: export STANDARD_ACTING_HELPERS type --------- Co-authored-by: DavertMik <[email protected]> Co-authored-by: kobenguyent <[email protected]>
- Loading branch information
1 parent
7030c7f
commit 9aae736
Showing
16 changed files
with
97 additions
and
14 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
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
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
const standardActingHelpers = ['Playwright', 'WebDriver', 'Puppeteer', 'Appium', 'TestCafe'] | ||
const Container = require('../container') | ||
// due to using this in internal tooling we won't post deprecation warning | ||
// but please switch to Container.STANDARD_ACTING_HELPERS | ||
const standardActingHelpers = Container.STANDARD_ACTING_HELPERS | ||
|
||
module.exports = standardActingHelpers |
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
11 changes: 11 additions & 0 deletions
11
test/data/sandbox/configs/store-test-and-suite/codecept.conf.js
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 @@ | ||
exports.config = { | ||
tests: './*_test.js', | ||
output: './output', | ||
helpers: { | ||
FileSystem: {}, | ||
}, | ||
include: {}, | ||
bootstrap: false, | ||
mocha: {}, | ||
name: 'store-test-and-suite tests', | ||
} |
25 changes: 25 additions & 0 deletions
25
test/data/sandbox/configs/store-test-and-suite/store-test-and-suite_test.js
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 @@ | ||
const assert = require('assert') | ||
|
||
Feature('store-test-and-suite suite') | ||
|
||
BeforeSuite(({ suite, test }) => { | ||
assert.strictEqual(suite.title, 'store-test-and-suite suite') | ||
assert(!test) | ||
}) | ||
|
||
Before(({ test }) => { | ||
assert.strictEqual(test.title, 'test store-test-and-suite test') | ||
test.artifacts.screenshot = 'screenshot' | ||
}) | ||
|
||
Scenario('test store-test-and-suite test', ({ test }) => { | ||
assert.strictEqual(test.title, 'test store-test-and-suite test') | ||
assert(test.artifacts) | ||
assert(test.meta) | ||
assert.strictEqual(test.artifacts.screenshot, 'screenshot') | ||
test.meta.browser = 'chrome' | ||
}) | ||
|
||
After(({ test }) => { | ||
assert.strictEqual(test.meta.browser, 'chrome') | ||
}) |
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,20 @@ | ||
const { expect } = require('expect') | ||
const exec = require('child_process').exec | ||
const { codecept_dir, codecept_run } = require('./consts') | ||
const debug = require('debug')('codeceptjs:tests') | ||
|
||
const config_run_config = (config, grep, verbose = false) => `${codecept_run} ${verbose ? '--verbose' : ''} --config ${codecept_dir}/configs/store-test-and-suite/${config} ${grep ? `--grep "${grep}"` : ''}` | ||
|
||
describe('CodeceptJS store-test-and-suite', function () { | ||
this.timeout(10000) | ||
|
||
it('should run store-test-and-suite test', done => { | ||
exec(config_run_config('codecept.conf.js'), (err, stdout) => { | ||
debug(stdout) | ||
expect(stdout).toContain('test store-test-and-suite test') | ||
expect(stdout).toContain('OK') | ||
expect(err).toBeFalsy() | ||
done() | ||
}) | ||
}) | ||
}) |