From e6b0aaeb3eaafbc1d0299cbd7879ca95a573f365 Mon Sep 17 00:00:00 2001 From: Ykumar1415 Date: Fri, 21 Jul 2023 23:49:46 +0530 Subject: [PATCH 1/3] added tag_filter in NightwatchOptions --- types/nightwatch-options.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/nightwatch-options.d.ts b/types/nightwatch-options.d.ts index 009bec0331..33824318b0 100644 --- a/types/nightwatch-options.d.ts +++ b/types/nightwatch-options.d.ts @@ -129,6 +129,8 @@ export interface NightwatchScreenshotOptions { } export interface NightwatchOptions { + + tag_filter?: string | string[] /** * Location(s) where custom commands will be loaded from. */ From 272966a6219f6811bfc48743494eac445db29044 Mon Sep 17 00:00:00 2001 From: Ykumar1415 Date: Sun, 23 Jul 2023 13:17:13 +0530 Subject: [PATCH 2/3] tag_filter added --- types/nightwatch-options.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/types/nightwatch-options.d.ts b/types/nightwatch-options.d.ts index 33824318b0..6ba6e8aa23 100644 --- a/types/nightwatch-options.d.ts +++ b/types/nightwatch-options.d.ts @@ -130,7 +130,6 @@ export interface NightwatchScreenshotOptions { export interface NightwatchOptions { - tag_filter?: string | string[] /** * Location(s) where custom commands will be loaded from. */ @@ -437,6 +436,12 @@ export interface NightwatchOptions { */ skiptags?: string; + /** + * Tag(s) used/to be used during test execution. + * Can be a single tag or an array of tags. + */ + tag_filter?: string | string[]; + /** * Use xpath as the default locator strategy. */ From b9c7bb04214471d3865931808f768a9b95426f0f Mon Sep 17 00:00:00 2001 From: Ykumar1415 Date: Tue, 8 Aug 2023 22:36:34 +0530 Subject: [PATCH 3/3] tag_filter test added --- types/index.d.ts | 2 +- types/tests/index.test-d.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/types/index.d.ts b/types/index.d.ts index 42b7d9a7a6..ce2c48e2da 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -567,7 +567,7 @@ export interface NightwatchAPI */ setSessionId(sessionId: string): this; - options: NightwatchTestOptions; + options: NightwatchOptions & Pick; Keys: NightwatchKeys; diff --git a/types/tests/index.test-d.ts b/types/tests/index.test-d.ts index 664a7c9540..b28baa5caa 100644 --- a/types/tests/index.test-d.ts +++ b/types/tests/index.test-d.ts @@ -34,6 +34,8 @@ const testGeneral: NightwatchTests = { 'Demo test Google 1': () => { browser.registerBasicAuth('test-username', 'test-password').navigateTo('https://google.com').pause(1000); + // check types on browser.options + expectType(browser.options.tag_filter); // expect element to be present in 1000ms browser.expect.element('body').to.be.present.before(1000);