File tree Expand file tree Collapse file tree
__tests__/html2/accessibility/sendBox Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <!doctype html>
2+ < html lang ="en-US ">
3+ < head >
4+ < link href ="/assets/index.css " rel ="stylesheet " type ="text/css " />
5+ </ head >
6+ < body >
7+ < main id ="webchat "> </ main >
8+ < script type ="importmap ">
9+ {
10+ "imports" : {
11+ "botframework-webchat" : "/__dist__/packages/bundle/static/botframework-webchat.js" ,
12+ "react" : "/__dist__/packages/bundle/static/react.js" ,
13+ "react-dom" : "/__dist__/packages/bundle/static/react-dom.js"
14+ }
15+ }
16+ </ script >
17+ < script type ="module ">
18+ import '/test-harness.mjs' ;
19+ import '/test-page-object.mjs' ;
20+
21+ import { createStoreWithOptions , renderWebChat , testIds } from 'botframework-webchat' ;
22+
23+ const {
24+ testHelpers : { createDirectLineEmulator }
25+ } = window ;
26+
27+ // TODO: Should find ways to eliminate this line.
28+ window . WebChat = { createStoreWithOptions, testIds } ;
29+
30+ testHelpers . hideKnownError ( ) ;
31+
32+ run ( async function ( ) {
33+ const { directLine, store } = createDirectLineEmulator ( ) ;
34+
35+ renderWebChat (
36+ {
37+ directLine,
38+ overrideLocalizedStrings : {
39+ TEXT_INPUT_ALT : 'Hello, World!'
40+ } ,
41+ store
42+ } ,
43+ document . getElementById ( 'webchat' )
44+ ) ;
45+
46+ await pageConditions . uiConnected ( ) ;
47+
48+ expect ( pageElements . sendBoxTextBox ( ) . tagName ) . toBe ( 'INPUT' ) ;
49+ expect ( pageElements . sendBoxTextBox ( ) . getAttribute ( 'aria-label' ) ) . toBe ( 'Hello, World!' ) ;
50+ } ) ;
51+ </ script >
52+ </ body >
53+ </ html >
Original file line number Diff line number Diff line change 1+ <!doctype html>
2+ < html lang ="en-US ">
3+ < head >
4+ < link href ="/assets/index.css " rel ="stylesheet " type ="text/css " />
5+ </ head >
6+ < body >
7+ < main id ="webchat "> </ main >
8+ < script type ="importmap ">
9+ {
10+ "imports" : {
11+ "botframework-webchat" : "/__dist__/packages/bundle/static/botframework-webchat.js" ,
12+ "react" : "/__dist__/packages/bundle/static/react.js" ,
13+ "react-dom" : "/__dist__/packages/bundle/static/react-dom.js"
14+ }
15+ }
16+ </ script >
17+ < script type ="module ">
18+ import '/test-harness.mjs' ;
19+ import '/test-page-object.mjs' ;
20+
21+ import { createStoreWithOptions , renderWebChat , testIds } from 'botframework-webchat' ;
22+
23+ const {
24+ testHelpers : { createDirectLineEmulator }
25+ } = window ;
26+
27+ // TODO: Should find ways to eliminate this line.
28+ window . WebChat = { createStoreWithOptions, testIds } ;
29+
30+ testHelpers . hideKnownError ( ) ;
31+
32+ run ( async function ( ) {
33+ const { directLine, store } = createDirectLineEmulator ( ) ;
34+
35+ renderWebChat (
36+ {
37+ directLine,
38+ overrideLocalizedStrings : {
39+ TEXT_INPUT_ALT : 'Hello, World!'
40+ } ,
41+ store,
42+ styleOptions : {
43+ sendBoxTextWrap : true
44+ }
45+ } ,
46+ document . getElementById ( 'webchat' )
47+ ) ;
48+
49+ await pageConditions . uiConnected ( ) ;
50+
51+ expect ( pageElements . sendBoxTextBox ( ) . tagName ) . toBe ( 'TEXTAREA' ) ;
52+ expect ( pageElements . sendBoxTextBox ( ) . getAttribute ( 'aria-label' ) ) . toBe ( 'Hello, World!' ) ;
53+ } ) ;
54+ </ script >
55+ </ body >
56+ </ html >
You can’t perform that action at this time.
0 commit comments