@@ -154,6 +154,48 @@ test.only('Stream for existed fields', async t => {
154
154
await t . expect ( paramsAfterExistedFieldAdding [ 1 ] ) . eql ( toString ( toNumber ( paramsBeforeExistedFieldAdding [ 1 ] ) + 1 ) , 'Increased number of rows after adding' ) ;
155
155
await t . expect ( paramsAfterExistedFieldAdding [ 0 ] ) . eql ( paramsBeforeExistedFieldAdding [ 0 ] , 'The same number of columns after adding' ) ;
156
156
} ) ;
157
+ test . only ( 'Stream for existed fields with another function' , async t => {
158
+ keyName = chance . word ( { length : 20 } ) ;
159
+ // Add New Stream Key
160
+ await browserPage . addStreamKey ( keyName , 'Field1' , 'Value1' ) ;
161
+ await browserPage . addEntryToStream ( 'Field2' , 'Value2' ) ;
162
+
163
+ // Print number and all fields and values
164
+ const paramsBeforeEntryAdding = await browserPage . getStreamRowColumnNumber ( ) ;
165
+ console . log ( `paramsBeforeEntryAdding: ${ paramsBeforeEntryAdding } ` ) ;
166
+ // Print all columns name in Stream
167
+ let allColumns = await browserPage . streamEntriesContainer . find ( 'span' ) ;
168
+ let allColumnsLength = await allColumns . count ;
169
+ for ( let i = 0 ; i < allColumnsLength ; i ++ ) {
170
+ const col = await allColumns . nth ( i ) . textContent ;
171
+ console . log ( `column from span: ${ i } , ${ col } ` ) ;
172
+ }
173
+ // const allOtherColumns = await browserPage.streamEntriesContainer.find('[aria-colcount]').find('span');
174
+ // const allOtherColumnsLength = await allOtherColumns.count;
175
+ // for (let i = 0; i < allOtherColumnsLength; i++) {
176
+ // const columns2 = await allOtherColumns.nth(i).textContent;
177
+ // console.log(`column from entries container: ${i}, ${columns2}`);
178
+ // }
179
+ // Verify that when user adds a new Entry with already existed Field name, a new Field is available as column in the Stream table
180
+ const paramsBeforeExistedFieldAdding = await browserPage . getStreamRowColumnNumber ( ) ;
181
+
182
+ // Add entry with existed field
183
+ await browserPage . addEntryToStream ( 'Field2' , 'Value3' ) ;
184
+
185
+ // Print number and fields with values after adding
186
+ const paramsAfterExistedFieldAdding = await browserPage . getStreamRowColumnNumber ( ) ;
187
+ console . log ( `paramsAfterExistedFieldAdding: ${ paramsAfterExistedFieldAdding } ` ) ;
188
+
189
+ allColumns = await browserPage . streamEntriesContainer . find ( 'span' ) ;
190
+ allColumnsLength = await allColumns . count ;
191
+ for ( let i = 0 ; i < allColumnsLength ; i ++ ) {
192
+ const col = await allColumns . nth ( i ) . textContent ;
193
+ console . log ( `column from span: ${ i } , ${ col } ` ) ;
194
+ }
195
+
196
+ await t . expect ( paramsAfterExistedFieldAdding [ 1 ] ) . eql ( toString ( toNumber ( paramsBeforeExistedFieldAdding [ 1 ] ) + 1 ) , 'Increased number of rows after adding' ) ;
197
+ await t . expect ( paramsAfterExistedFieldAdding [ 0 ] ) . eql ( paramsBeforeExistedFieldAdding [ 0 ] , 'The same number of columns after adding' ) ;
198
+ } ) ;
157
199
test ( 'Verify that during new entry adding to existing Stream, user can clear the value and the row itself' , async t => {
158
200
keyName = chance . word ( { length : 20 } ) ;
159
201
// Generate data for stream
0 commit comments