1818*/
1919const { spawnElectron, createTestServer} = require ( './' ) ;
2020
21- const STARTUP_TIMEOUT = 30000 ;
22- const TEST_TIMEOUT = 15000 ;
23-
2421describe ( 'E2E :: Keyboard shortcuts test suite' , ( ) => {
2522 let electron ;
2623 let mainWindow ;
@@ -52,14 +49,14 @@ describe('E2E :: Keyboard shortcuts test suite', () => {
5249 } ) ;
5350 mainWindow = await electron . waitForWindow (
5451 ( { url, title} ) => url . includes ( 'chrome-tabs' ) || title === 'ElectronIM tabs' ) ;
55- } , STARTUP_TIMEOUT ) ;
52+ } ) ;
5653
5754 afterAll ( async ( ) => {
5855 await Promise . all ( [
5956 electron . kill ( ) ,
6057 testServer . close ( )
6158 ] ) ;
62- } , STARTUP_TIMEOUT ) ;
59+ } ) ;
6360
6461 test ( 'application starts with multiple tabs' , async ( ) => {
6562 const tabs = mainWindow . locator ( '.chrome-tab' ) ;
@@ -82,7 +79,7 @@ describe('E2E :: Keyboard shortcuts test suite', () => {
8279 ) ;
8380 // Then
8481 expect ( await electron . isFullScreen ( ) ) . toBe ( ! initialFullScreen ) ;
85- } , TEST_TIMEOUT ) ;
82+ } ) ;
8683
8784 test ( 'pressing F11 again toggles back to initial state' , async ( ) => {
8885 // Given
@@ -95,7 +92,7 @@ describe('E2E :: Keyboard shortcuts test suite', () => {
9592 ) ;
9693 // Then
9794 expect ( await electron . isFullScreen ( ) ) . toBe ( initialFullScreen ) ;
98- } , TEST_TIMEOUT ) ;
95+ } ) ;
9996 } ) ;
10097
10198 describe ( 'Ctrl+[1-9] tab switching' , ( ) => {
@@ -108,23 +105,23 @@ describe('E2E :: Keyboard shortcuts test suite', () => {
108105 await electron . waitForActiveTab ( mainWindow , 'test-service-1' ) ;
109106 // Then
110107 expect ( await electron . getActiveTabId ( mainWindow ) ) . toBe ( 'test-service-1' ) ;
111- } , TEST_TIMEOUT ) ;
108+ } ) ;
112109
113110 test ( 'Ctrl+2 activates second tab' , async ( ) => {
114111 // When
115112 await electron . sendKeys ( '2' , [ 'control' ] ) ;
116113 await electron . waitForActiveTab ( mainWindow , 'test-service-2' ) ;
117114 // Then
118115 expect ( await electron . getActiveTabId ( mainWindow ) ) . toBe ( 'test-service-2' ) ;
119- } , TEST_TIMEOUT ) ;
116+ } ) ;
120117
121118 test ( 'Ctrl+3 activates third tab' , async ( ) => {
122119 // When
123120 await electron . sendKeys ( '3' , [ 'control' ] ) ;
124121 await electron . waitForActiveTab ( mainWindow , 'test-service-3' ) ;
125122 // Then
126123 expect ( await electron . getActiveTabId ( mainWindow ) ) . toBe ( 'test-service-3' ) ;
127- } , TEST_TIMEOUT ) ;
124+ } ) ;
128125 } ) ;
129126
130127 describe ( 'Ctrl+Tab tab traversal' , ( ) => {
@@ -137,7 +134,7 @@ describe('E2E :: Keyboard shortcuts test suite', () => {
137134 await electron . waitForActiveTab ( mainWindow , 'test-service-2' ) ;
138135 // Then
139136 expect ( await electron . getActiveTabId ( mainWindow ) ) . toBe ( 'test-service-2' ) ;
140- } , TEST_TIMEOUT ) ;
137+ } ) ;
141138
142139 test ( 'Ctrl+Shift+Tab cycles to previous tab' , async ( ) => {
143140 // Given
@@ -148,7 +145,7 @@ describe('E2E :: Keyboard shortcuts test suite', () => {
148145 await electron . waitForActiveTab ( mainWindow , 'test-service-1' ) ;
149146 // Then
150147 expect ( await electron . getActiveTabId ( mainWindow ) ) . toBe ( 'test-service-1' ) ;
151- } , TEST_TIMEOUT ) ;
148+ } ) ;
152149
153150 test ( 'Ctrl+Tab wraps around from last to first tab' , async ( ) => {
154151 // Given
@@ -160,7 +157,7 @@ describe('E2E :: Keyboard shortcuts test suite', () => {
160157 await electron . waitForActiveTab ( mainWindow , 'test-service-1' ) ;
161158 // Then
162159 expect ( await electron . getActiveTabId ( mainWindow ) ) . toBe ( 'test-service-1' ) ;
163- } , TEST_TIMEOUT ) ;
160+ } ) ;
164161 } ) ;
165162
166163 describe ( 'Ctrl+f find in page' , ( ) => {
@@ -177,7 +174,7 @@ describe('E2E :: Keyboard shortcuts test suite', () => {
177174 ) ;
178175 // Then
179176 expect ( await electron . isFindInPageOpen ( ) ) . toBe ( true ) ;
180- } , TEST_TIMEOUT ) ;
177+ } ) ;
181178
182179 test ( 'pressing Escape closes find-in-page dialog' , async ( ) => {
183180 // Given
@@ -197,7 +194,7 @@ describe('E2E :: Keyboard shortcuts test suite', () => {
197194 ) ;
198195 // Then
199196 expect ( await electron . isFindInPageOpen ( ) ) . toBe ( false ) ;
200- } , TEST_TIMEOUT ) ;
197+ } ) ;
201198 } ) ;
202199
203200 describe ( 'Meta key shortcuts (macOS legacy support)' , ( ) => {
@@ -207,14 +204,14 @@ describe('E2E :: Keyboard shortcuts test suite', () => {
207204 await electron . waitForActiveTab ( mainWindow , 'test-service-1' ) ;
208205 // Then
209206 expect ( await electron . getActiveTabId ( mainWindow ) ) . toBe ( 'test-service-1' ) ;
210- } , TEST_TIMEOUT ) ;
207+ } ) ;
211208
212209 test ( 'Meta+2 activates first tab' , async ( ) => {
213210 // When
214211 await electron . sendKeys ( '2' , [ 'meta' ] ) ;
215212 await electron . waitForActiveTab ( mainWindow , 'test-service-2' ) ;
216213 // Then
217214 expect ( await electron . getActiveTabId ( mainWindow ) ) . toBe ( 'test-service-2' ) ;
218- } , TEST_TIMEOUT ) ;
215+ } ) ;
219216 } ) ;
220217} ) ;
0 commit comments