@@ -74,8 +76,7 @@ describe('HTML module', () => {
Privacy Preference Center
-
-
+
`
@@ -88,8 +89,7 @@ describe('HTML module', () => {
-
+
@@ -98,11 +98,11 @@ describe('HTML module', () => {
-
- aaa
-
-
-
+
+ aaa
+
+
+
`
const result = await minifyHtml(removeNonInteractiveElements(html, opts))
@@ -113,7 +113,6 @@ describe('HTML module', () => {
})
it('should cut out all non-interactive elements from HTML', () => {
- // Call the function with the loaded HTML
html = fs.readFileSync(path.join(__dirname, '../data/checkout.html'), 'utf8')
const result = removeNonInteractiveElements(html, opts)
expect(result).to.include('Name on card')
@@ -122,46 +121,34 @@ describe('HTML module', () => {
it('should allow adding new elements', () => {
const html = '
Hey '
-
- const result = removeNonInteractiveElements(html, {
- textElements: ['h6'],
- })
-
+ const result = removeNonInteractiveElements(html, { textElements: ['h6'] })
expect(result).to.include('Hey ')
})
it('should cut out all non-interactive elements from GitLab HTML', () => {
- // Call the function with the loaded HTML
html = fs.readFileSync(path.join(__dirname, '../data/gitlab.html'), 'utf8')
- // console.log(html);
const result = removeNonInteractiveElements(html, opts)
-
result.should.include('Get free trial')
result.should.include('Sign in')
result.should.include(' {
- // Call the function with the loaded HTML
html = fs.readFileSync(path.join(__dirname, '../data/testomat.html'), 'utf8')
- // console.log(html);
const result = removeNonInteractiveElements(html, opts)
result.should.include('
describe('Locator', () => {
beforeEach(() => {
- doc = new DOMParser().parseFromString(xml, 'application/xhtml+xml')
+ doc = new DOMParser().parseFromString(xml, 'text/xml')
})
describe('constructor', () => {
diff --git a/test/unit/parser_test.js b/test/unit/parser_test.js
index 331d3b50e..5748fca2c 100644
--- a/test/unit/parser_test.js
+++ b/test/unit/parser_test.js
@@ -4,7 +4,6 @@ import('chai').then((chai) => {
})
const parser = require('../../lib/parser')
-/* eslint-disable no-unused-vars */
class Obj {
method1(locator, sec) {}
diff --git a/test/unit/utils_test.js b/test/unit/utils_test.js
index 1a4aef63f..77a968806 100644
--- a/test/unit/utils_test.js
+++ b/test/unit/utils_test.js
@@ -14,7 +14,7 @@ describe('utils', () => {
it('not exists', () => expect(utils.fileExists('not_utils.js')).to.be.false)
it('not exists if file used as directory', () => expect(utils.fileExists(`${__filename}/not_utils.js`)).to.be.false)
})
- /* eslint-disable no-unused-vars */
+
describe('#getParamNames', () => {
it('fn#1', () => expect(utils.getParamNames((a, b) => {})).eql(['a', 'b']))
it('fn#2', () => expect(utils.getParamNames((I, userPage) => {})).eql(['I', 'userPage']))
@@ -23,7 +23,6 @@ describe('utils', () => {
it('should handle trailing comma', () =>
expect(utils.getParamNames((I, trailing, comma) => {})).eql(['I', 'trailing', 'comma']))
})
- /* eslint-enable no-unused-vars */
describe('#methodsOfObject', () => {
it('should get methods', () => {
diff --git a/translations/de-DE.js b/translations/de-DE.js
index aee1be9b2..7a84c985d 100644
--- a/translations/de-DE.js
+++ b/translations/de-DE.js
@@ -68,6 +68,7 @@ module.exports = {
sendGetRequest: 'mache_einen_get_request',
sendPutRequest: 'mache_einen_put_request',
sendDeleteRequest: 'mache_einen_delete_request',
+ sendDeleteRequestWithPayload: 'mache_einen_delete_request_mit_payload',
sendPostRequest: 'mache_einen_post_request',
switchTo: 'wechlse_in_iframe',
},
diff --git a/translations/fr-FR.js b/translations/fr-FR.js
index 6cb6a7a14..de67a063f 100644
--- a/translations/fr-FR.js
+++ b/translations/fr-FR.js
@@ -70,7 +70,7 @@ module.exports = {
scrollTo: 'défileVers',
sendGetRequest: 'envoieLaRequêteGet',
sendPutRequest: 'envoieLaRequêtePut',
- sendDeleteRequest: 'envoieLaRequêteDelete',
+ sendDeleteRequest: 'envoieLaRequêteDeleteAvecPayload',
sendPostRequest: 'envoieLaRequêtePost',
},
}
diff --git a/typings/index.d.ts b/typings/index.d.ts
index 89523177a..9b8acc91c 100644
--- a/typings/index.d.ts
+++ b/typings/index.d.ts
@@ -114,6 +114,14 @@ declare namespace CodeceptJS {
* ```
*/
emptyOutputFolder?: boolean;
+ /**
+ * mask sensitive data in output logs
+ *
+ * ```js
+ * maskSensitiveData: true
+ * ```
+ */
+ maskSensitiveData?: boolean;
/**
* Pattern to filter tests by name.
* This option is useful if you plan to use multiple configs for different environments.
@@ -554,7 +562,7 @@ declare const xScenario: CodeceptJS.IScenario;
declare const xFeature: CodeceptJS.IFeature;
declare function Data(data: any): CodeceptJS.IData;
declare function xData(data: any): CodeceptJS.IData;
-declare function defineParameterType(options: CodeceptJS.IParameterTypeDefinition): void
+declare function DefineParameterType(options: CodeceptJS.IParameterTypeDefinition): void
// Hooks
declare const BeforeSuite: CodeceptJS.IHook;
@@ -599,7 +607,7 @@ declare namespace NodeJS {
Given: typeof Given;
When: typeof When;
Then: typeof Then;
- DefineParameterType: typeof defineParameterType
+ DefineParameterType: typeof DefineParameterType
}
}
diff --git a/typings/tests/helpers/WebDriverIO.types.ts b/typings/tests/helpers/WebDriverIO.types.ts
index 137f55e7e..449d2dafc 100644
--- a/typings/tests/helpers/WebDriverIO.types.ts
+++ b/typings/tests/helpers/WebDriverIO.types.ts
@@ -405,11 +405,6 @@ expectType(wd.scrollPageToTop());
expectType(wd.scrollPageToBottom());
-expectError(wd.setGeoLocation());
-expectError(wd.setGeoLocation(num));
-expectType(wd.setGeoLocation(num, num));
-expectType(wd.setGeoLocation(num, num, num));
-
expectError(wd.dontSeeCookie());
expectType(wd.dontSeeCookie(str));
@@ -480,8 +475,6 @@ psp.then(
},
);
-expectType>(wd.grabGeoLocation());
-
expectError(wd.grabElementBoundingRect());
//expectType>(wd.grabElementBoundingRect('h3'));
//expectType>(wd.grabElementBoundingRect('h3', 'width'));