chat_no_jquery_test.rb 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864
  1. require 'browser_test_helper'
  2. class ChatNoJqueryTest < TestCase
  3. def test_basic
  4. chat_url = "#{browser_url}/assets/chat/znuny-no-jquery.html?port=#{ENV['WS_PORT']}"
  5. agent = browser_instance
  6. login(
  7. browser: agent,
  8. username: 'master@example.com',
  9. password: 'test',
  10. url: browser_url,
  11. )
  12. tasks_close_all(
  13. browser: agent,
  14. )
  15. # disable chat
  16. click(
  17. browser: agent,
  18. css: 'a[href="#manage"]',
  19. )
  20. click(
  21. browser: agent,
  22. css: '.content.active a[href="#channels/chat"]',
  23. )
  24. switch(
  25. browser: agent,
  26. css: '.content.active .js-chatSetting',
  27. type: 'off',
  28. )
  29. # nav bar shuld be gone
  30. sleep 2
  31. exists_not(
  32. browser: agent,
  33. css: 'a[href="#customer_chat"]',
  34. )
  35. sleep 15
  36. customer = browser_instance
  37. location(
  38. browser: customer,
  39. url: chat_url,
  40. )
  41. sleep 4
  42. exists_not(
  43. browser: customer,
  44. css: '.zammad-chat',
  45. )
  46. match(
  47. browser: customer,
  48. css: '.settings',
  49. value: '{"state":"chat_disabled"}',
  50. )
  51. click(
  52. browser: agent,
  53. css: 'a[href="#manage"]',
  54. )
  55. click(
  56. browser: agent,
  57. css: '.content.active a[href="#channels/chat"]',
  58. )
  59. switch(
  60. browser: agent,
  61. css: '.content.active .js-chatSetting',
  62. type: 'on',
  63. )
  64. sleep 15 # wait for rerendering
  65. switch(
  66. browser: agent,
  67. css: '#navigation .js-chatMenuItem .js-switch',
  68. type: 'off',
  69. )
  70. click(
  71. browser: agent,
  72. css: 'a[href="#customer_chat"]',
  73. wait: 2,
  74. )
  75. match_not(
  76. browser: agent,
  77. css: '.active.content',
  78. value: 'disabled',
  79. )
  80. reload(
  81. browser: customer,
  82. )
  83. sleep 4
  84. exists_not(
  85. browser: customer,
  86. css: '.zammad-chat',
  87. )
  88. match_not(
  89. browser: customer,
  90. css: '.settings',
  91. value: '{"state":"chat_disabled"}',
  92. )
  93. match(
  94. browser: customer,
  95. css: '.settings',
  96. value: '{"event":"chat_status_customer","data":{"state":"offline"}}',
  97. )
  98. click(
  99. browser: agent,
  100. css: 'a[href="#customer_chat"]',
  101. )
  102. switch(
  103. browser: agent,
  104. css: '#navigation .js-chatMenuItem .js-switch',
  105. type: 'on',
  106. )
  107. reload(
  108. browser: customer,
  109. )
  110. watch_for(
  111. browser: customer,
  112. css: '.zammad-chat',
  113. timeout: 5,
  114. )
  115. match_not(
  116. browser: customer,
  117. css: '.settings',
  118. value: '{"state":"chat_disabled"}',
  119. )
  120. match_not(
  121. browser: customer,
  122. css: '.settings',
  123. value: '{"event":"chat_status_customer","data":{"state":"offline"}}',
  124. )
  125. match(
  126. browser: customer,
  127. css: '.settings',
  128. value: '"data":{"state":"online"}',
  129. )
  130. # init chat
  131. click(
  132. browser: customer,
  133. css: '.zammad-chat .js-chat-open',
  134. )
  135. exists(
  136. browser: customer,
  137. css: '.zammad-chat-is-shown',
  138. )
  139. watch_for(
  140. browser: customer,
  141. css: '.zammad-chat',
  142. value: '(waiting|warte)',
  143. )
  144. watch_for(
  145. browser: agent,
  146. css: '.js-chatMenuItem .counter',
  147. value: '1',
  148. )
  149. click(
  150. browser: customer,
  151. css: '.zammad-chat .js-chat-toggle .zammad-chat-header-icon',
  152. )
  153. watch_for_disappear(
  154. browser: customer,
  155. css: '.zammad-chat',
  156. value: '(waiting|warte)',
  157. )
  158. watch_for_disappear(
  159. browser: agent,
  160. css: '.js-chatMenuItem .counter',
  161. )
  162. end
  163. def test_basic_usecase1
  164. chat_url = "#{browser_url}/assets/chat/znuny-no-jquery.html?port=#{ENV['WS_PORT']}"
  165. agent = browser_instance
  166. login(
  167. browser: agent,
  168. username: 'master@example.com',
  169. password: 'test',
  170. url: browser_url,
  171. )
  172. tasks_close_all(
  173. browser: agent,
  174. )
  175. click(
  176. browser: agent,
  177. css: 'a[href="#customer_chat"]',
  178. )
  179. agent.find_elements(css: '.active .chat-window .js-disconnect:not(.is-hidden)').each(&:click)
  180. agent.find_elements(css: '.active .chat-window .js-close').each(&:click)
  181. customer = browser_instance
  182. location(
  183. browser: customer,
  184. url: chat_url,
  185. )
  186. watch_for(
  187. browser: customer,
  188. css: '.zammad-chat',
  189. timeout: 5,
  190. )
  191. click(
  192. browser: customer,
  193. css: '.js-chat-open',
  194. )
  195. exists(
  196. browser: customer,
  197. css: '.zammad-chat-is-shown',
  198. )
  199. watch_for(
  200. browser: customer,
  201. css: '.zammad-chat',
  202. value: '(waiting|warte)',
  203. )
  204. click(
  205. browser: agent,
  206. css: '.active .js-acceptChat',
  207. )
  208. sleep 2
  209. exists_not(
  210. browser: agent,
  211. css: '.active .chat-window .chat-status.is-modified',
  212. )
  213. match(
  214. browser: agent,
  215. css: '.active .chat-window .js-body',
  216. value: chat_url,
  217. )
  218. set(
  219. browser: agent,
  220. css: '.active .chat-window .js-customerChatInput',
  221. value: 'my name is me',
  222. )
  223. click(
  224. browser: agent,
  225. css: '.active .chat-window .js-send',
  226. )
  227. watch_for(
  228. browser: customer,
  229. css: '.zammad-chat .zammad-chat-agent-status',
  230. value: 'online',
  231. )
  232. watch_for(
  233. browser: customer,
  234. css: '.zammad-chat',
  235. value: 'my name is me',
  236. )
  237. set(
  238. browser: customer,
  239. css: '.zammad-chat .zammad-chat-input',
  240. value: 'my name is customer',
  241. )
  242. click(
  243. browser: customer,
  244. css: '.zammad-chat .zammad-chat-send',
  245. )
  246. watch_for(
  247. browser: agent,
  248. css: '.active .chat-window',
  249. value: 'my name is customer',
  250. )
  251. exists(
  252. browser: agent,
  253. css: '.active .chat-window .chat-status.is-modified',
  254. )
  255. click(
  256. browser: agent,
  257. css: '.active .chat-window .js-customerChatInput',
  258. )
  259. exists_not(
  260. browser: agent,
  261. css: '.active .chat-window .chat-status.is-modified',
  262. )
  263. click(
  264. browser: customer,
  265. css: '.js-chat-toggle .zammad-chat-header-icon',
  266. )
  267. watch_for(
  268. browser: agent,
  269. css: '.active .chat-window',
  270. value: 'closed the conversation',
  271. )
  272. end
  273. def test_basic_usecase2
  274. chat_url = "#{browser_url}/assets/chat/znuny-no-jquery.html?port=#{ENV['WS_PORT']}"
  275. agent = browser_instance
  276. login(
  277. browser: agent,
  278. username: 'master@example.com',
  279. password: 'test',
  280. url: browser_url,
  281. )
  282. tasks_close_all(
  283. browser: agent,
  284. )
  285. click(
  286. browser: agent,
  287. css: 'a[href="#customer_chat"]',
  288. )
  289. agent.find_elements(css: '.active .chat-window .js-disconnect:not(.is-hidden)').each(&:click)
  290. agent.find_elements(css: '.active .chat-window .js-close').each(&:click)
  291. customer = browser_instance
  292. location(
  293. browser: customer,
  294. url: chat_url,
  295. )
  296. watch_for(
  297. browser: customer,
  298. css: '.zammad-chat',
  299. timeout: 5,
  300. )
  301. click(
  302. browser: customer,
  303. css: '.js-chat-open',
  304. )
  305. exists(
  306. browser: customer,
  307. css: '.zammad-chat-is-shown',
  308. )
  309. watch_for(
  310. browser: customer,
  311. css: '.zammad-chat',
  312. value: '(waiting|warte)',
  313. )
  314. click(
  315. browser: agent,
  316. css: '.active .js-acceptChat',
  317. )
  318. sleep 2
  319. exists_not(
  320. browser: agent,
  321. css: '.active .chat-window .chat-status.is-modified',
  322. )
  323. # keep focus outside of chat window to check .chat-status.is-modified later
  324. click(
  325. browser: agent,
  326. css: '#global-search',
  327. )
  328. watch_for(
  329. browser: customer,
  330. css: '.zammad-chat .zammad-chat-agent-status',
  331. value: 'online',
  332. )
  333. set(
  334. browser: customer,
  335. css: '.zammad-chat .zammad-chat-input',
  336. value: 'my name is customer',
  337. )
  338. click(
  339. browser: customer,
  340. css: '.zammad-chat .zammad-chat-send',
  341. )
  342. watch_for(
  343. browser: agent,
  344. css: '.active .chat-window',
  345. value: 'my name is customer',
  346. )
  347. exists(
  348. browser: agent,
  349. css: '.active .chat-window .chat-status.is-modified',
  350. )
  351. set(
  352. browser: agent,
  353. css: '.active .chat-window .js-customerChatInput',
  354. value: 'my name is me',
  355. )
  356. exists_not(
  357. browser: agent,
  358. css: '.active .chat-window .chat-status.is-modified',
  359. )
  360. click(
  361. browser: agent,
  362. css: '.active .chat-window .js-send',
  363. )
  364. watch_for(
  365. browser: customer,
  366. css: '.zammad-chat',
  367. value: 'my name is me',
  368. )
  369. click(
  370. browser: agent,
  371. css: '.active .chat-window .js-disconnect:not(.is-hidden)',
  372. )
  373. click(
  374. browser: agent,
  375. css: '.active .chat-window .js-close',
  376. )
  377. watch_for(
  378. browser: customer,
  379. css: '.zammad-chat .zammad-chat-agent-status',
  380. value: 'offline',
  381. )
  382. watch_for(
  383. browser: customer,
  384. css: '.zammad-chat',
  385. value: '(Chat closed by|Chat beendet von)',
  386. )
  387. click(
  388. browser: customer,
  389. css: '.zammad-chat .js-chat-toggle .zammad-chat-header-icon',
  390. )
  391. watch_for_disappear(
  392. browser: customer,
  393. css: '.zammad-chat-is-open',
  394. )
  395. agent.find_elements(css: '.active .chat-window .js-disconnect:not(.is-hidden)').each(&:click)
  396. agent.find_elements(css: '.active .chat-window .js-close').each(&:click)
  397. sleep 2
  398. click(
  399. browser: customer,
  400. css: '.zammad-chat .js-chat-open',
  401. )
  402. exists(
  403. browser: customer,
  404. css: '.zammad-chat-is-shown',
  405. )
  406. watch_for(
  407. browser: customer,
  408. css: '.zammad-chat',
  409. value: '(waiting|warte)',
  410. )
  411. click(
  412. browser: agent,
  413. css: '.active .js-acceptChat',
  414. )
  415. sleep 2
  416. exists_not(
  417. browser: agent,
  418. css: '.active .chat-window .chat-status.is-modified',
  419. )
  420. exists(
  421. browser: agent,
  422. css: '.active .chat-window .chat-status',
  423. )
  424. end
  425. def test_basic_usecase3
  426. chat_url = "#{browser_url}/assets/chat/znuny-no-jquery.html?port=#{ENV['WS_PORT']}"
  427. agent = browser_instance
  428. login(
  429. browser: agent,
  430. username: 'master@example.com',
  431. password: 'test',
  432. url: browser_url,
  433. )
  434. tasks_close_all(
  435. browser: agent,
  436. )
  437. click(
  438. browser: agent,
  439. css: 'a[href="#customer_chat"]',
  440. )
  441. agent.find_elements(css: '.active .chat-window .js-disconnect:not(.is-hidden)').each(&:click)
  442. agent.find_elements(css: '.active .chat-window .js-close').each(&:click)
  443. # set chat preferences
  444. click(
  445. browser: agent,
  446. css: '.active .js-settings',
  447. )
  448. modal_ready(browser: agent)
  449. set(
  450. browser: agent,
  451. css: '.modal [name="chat::phrase::1"]',
  452. value: 'Hi Stranger!;My Greeting',
  453. )
  454. click(
  455. browser: agent,
  456. css: '.modal .js-submit',
  457. )
  458. modal_disappear(browser: agent)
  459. customer = browser_instance
  460. location(
  461. browser: customer,
  462. url: chat_url,
  463. )
  464. watch_for(
  465. browser: customer,
  466. css: '.zammad-chat',
  467. timeout: 5,
  468. )
  469. click(
  470. browser: customer,
  471. css: '.js-chat-open',
  472. )
  473. exists(
  474. browser: customer,
  475. css: '.zammad-chat-is-shown',
  476. )
  477. watch_for(
  478. browser: agent,
  479. css: '.active .js-badgeWaitingCustomers',
  480. value: '1',
  481. )
  482. click(
  483. browser: agent,
  484. css: '.active .js-acceptChat',
  485. )
  486. watch_for(
  487. browser: customer,
  488. css: '.zammad-chat',
  489. value: 'Hi Stranger|My Greeting',
  490. )
  491. watch_for(
  492. browser: customer,
  493. css: '.zammad-chat .zammad-chat-agent-status',
  494. value: 'online',
  495. )
  496. match(
  497. browser: agent,
  498. css: '.active .chat-window .js-body',
  499. value: chat_url,
  500. )
  501. set(
  502. browser: agent,
  503. css: '.active .chat-window .js-customerChatInput',
  504. value: 'my name is me',
  505. )
  506. click(
  507. browser: agent,
  508. css: '.active .chat-window .js-send',
  509. )
  510. watch_for(
  511. browser: customer,
  512. css: '.zammad-chat',
  513. value: 'my name is me',
  514. )
  515. set(
  516. browser: customer,
  517. css: '.zammad-chat .zammad-chat-input',
  518. value: 'my name is customer',
  519. )
  520. click(
  521. browser: customer,
  522. css: '.zammad-chat .zammad-chat-send',
  523. )
  524. watch_for(
  525. browser: agent,
  526. css: '.active .chat-window',
  527. value: 'my name is customer',
  528. )
  529. click(
  530. browser: agent,
  531. css: '.active .chat-window .js-customerChatInput',
  532. )
  533. reload(
  534. browser: customer,
  535. )
  536. exists(
  537. browser: customer,
  538. css: '.zammad-chat',
  539. )
  540. watch_for(
  541. browser: customer,
  542. css: '.zammad-chat',
  543. value: 'Hi Stranger|My Greeting',
  544. )
  545. watch_for(
  546. browser: customer,
  547. css: '.zammad-chat',
  548. value: 'my name is me',
  549. )
  550. watch_for(
  551. browser: customer,
  552. css: '.zammad-chat',
  553. value: 'my name is customer',
  554. )
  555. location(
  556. browser: customer,
  557. url: "#{chat_url}#new_hash",
  558. )
  559. sleep 2
  560. match(
  561. browser: agent,
  562. css: '.active .chat-window .js-body',
  563. value: "#{chat_url}#new_hash",
  564. )
  565. click(
  566. browser: customer,
  567. css: '.zammad-chat .js-chat-toggle .zammad-chat-header-icon',
  568. )
  569. watch_for(
  570. browser: agent,
  571. css: '.active .chat-window',
  572. value: 'closed the conversation',
  573. )
  574. end
  575. def test_open_chat_by_button
  576. chat_url = "#{browser_url}/assets/chat/znuny-no-jquery-open_by_button.html?port=#{ENV['WS_PORT']}"
  577. agent = browser_instance
  578. login(
  579. browser: agent,
  580. username: 'master@example.com',
  581. password: 'test',
  582. url: browser_url,
  583. )
  584. tasks_close_all(
  585. browser: agent,
  586. )
  587. click(
  588. browser: agent,
  589. css: 'a[href="#customer_chat"]',
  590. )
  591. agent.find_elements(css: '.active .chat-window .js-disconnect:not(.is-hidden)').each(&:click)
  592. agent.find_elements(css: '.active .chat-window .js-close').each(&:click)
  593. customer = browser_instance
  594. location(
  595. browser: customer,
  596. url: chat_url,
  597. )
  598. watch_for(
  599. browser: customer,
  600. css: '.zammad-chat',
  601. timeout: 5,
  602. )
  603. exists_not(
  604. browser: customer,
  605. css: '.zammad-chat-is-shown',
  606. )
  607. exists_not(
  608. browser: customer,
  609. css: '.zammad-chat-is-open',
  610. )
  611. click(
  612. browser: customer,
  613. css: '.open-zammad-chat',
  614. )
  615. watch_for(
  616. browser: customer,
  617. css: '.zammad-chat-is-shown',
  618. timeout: 4,
  619. )
  620. watch_for(
  621. browser: customer,
  622. css: '.zammad-chat-is-open',
  623. timeout: 4,
  624. )
  625. watch_for(
  626. browser: customer,
  627. css: '.zammad-chat',
  628. value: '(waiting|warte)',
  629. )
  630. click(
  631. browser: customer,
  632. css: '.zammad-chat-header-icon-close',
  633. )
  634. watch_for_disappear(
  635. browser: customer,
  636. css: '.zammad-chat-is-shown',
  637. timeout: 4,
  638. )
  639. watch_for_disappear(
  640. browser: customer,
  641. css: '.zammad-chat-is-open',
  642. timeout: 4,
  643. )
  644. end
  645. def test_timeouts
  646. chat_url = "#{browser_url}/assets/chat/znuny-no-jquery.html?port=#{ENV['WS_PORT']}"
  647. agent = browser_instance
  648. login(
  649. browser: agent,
  650. username: 'master@example.com',
  651. password: 'test',
  652. url: browser_url,
  653. )
  654. tasks_close_all(
  655. browser: agent,
  656. )
  657. click(
  658. browser: agent,
  659. css: 'a[href="#customer_chat"]',
  660. )
  661. agent.find_elements(css: '.active .chat-window .js-disconnect:not(.is-hidden)').each(&:click)
  662. agent.find_elements(css: '.active .chat-window .js-close').each(&:click)
  663. exists(
  664. browser: agent,
  665. css: '#navigation .js-chatMenuItem .js-switch input[checked]'
  666. )
  667. # no customer action, hide widget
  668. customer = browser_instance
  669. location(
  670. browser: customer,
  671. url: chat_url,
  672. )
  673. watch_for(
  674. browser: customer,
  675. css: '.zammad-chat',
  676. timeout: 5,
  677. )
  678. watch_for_disappear(
  679. browser: customer,
  680. css: '.zammad-chat',
  681. timeout: 95,
  682. )
  683. # no agent action, show sorry screen
  684. reload(
  685. browser: customer,
  686. )
  687. exists(
  688. browser: customer,
  689. css: '.zammad-chat',
  690. )
  691. click(
  692. browser: customer,
  693. css: '.js-chat-open',
  694. )
  695. watch_for(
  696. browser: customer,
  697. css: '.zammad-chat',
  698. value: '(waiting|warte)',
  699. timeout: 35,
  700. )
  701. watch_for(
  702. browser: customer,
  703. css: '.zammad-chat',
  704. value: '(takes longer|dauert länger)',
  705. timeout: 120,
  706. )
  707. # check if agent is offline, idle timeout, chat not answered
  708. exists_not(
  709. browser: agent,
  710. css: '#navigation .js-chatMenuItem .js-switch input[checked]'
  711. )
  712. switch(
  713. browser: agent,
  714. css: '#navigation .js-chatMenuItem .js-switch',
  715. type: 'on',
  716. )
  717. # no customer action, show sorry screen
  718. reload(
  719. browser: customer,
  720. )
  721. exists(
  722. browser: customer,
  723. css: '.zammad-chat',
  724. )
  725. click(
  726. browser: customer,
  727. css: '.js-chat-open',
  728. )
  729. watch_for(
  730. browser: agent,
  731. css: '.js-chatMenuItem .counter',
  732. value: '1',
  733. )
  734. click(
  735. browser: agent,
  736. css: '.active .js-acceptChat',
  737. )
  738. sleep 2
  739. set(
  740. browser: agent,
  741. css: '.active .chat-window .js-customerChatInput',
  742. value: 'agent is asking',
  743. )
  744. click(
  745. browser: agent,
  746. css: '.active .chat-window .js-send',
  747. )
  748. watch_for(
  749. browser: customer,
  750. css: '.zammad-chat',
  751. value: 'agent is asking',
  752. )
  753. watch_for(
  754. browser: customer,
  755. css: '.zammad-chat',
  756. value: '(Since you didn\'t respond|Da Sie in den letzten)',
  757. timeout: 150,
  758. )
  759. agent.find_elements( { css: '.active .chat-window .js-close' } ).each(&:click)
  760. sleep 2
  761. click(
  762. browser: customer,
  763. css: '.js-restart',
  764. )
  765. sleep 5
  766. click(
  767. browser: customer,
  768. css: '.js-chat-open',
  769. )
  770. exists(
  771. browser: customer,
  772. css: '.zammad-chat-is-shown',
  773. )
  774. watch_for(
  775. browser: customer,
  776. css: '.zammad-chat',
  777. value: '(waiting|warte)',
  778. )
  779. click(
  780. browser: agent,
  781. css: '.active .js-acceptChat',
  782. )
  783. sleep 2
  784. exists(
  785. browser: agent,
  786. css: '.active .chat-window .chat-status',
  787. )
  788. set(
  789. browser: agent,
  790. css: '.active .chat-window .js-customerChatInput',
  791. value: 'my name is me',
  792. )
  793. click(
  794. browser: agent,
  795. css: '.active .chat-window .js-send',
  796. )
  797. watch_for(
  798. browser: customer,
  799. css: '.zammad-chat .zammad-chat-agent-status',
  800. value: 'online',
  801. )
  802. watch_for(
  803. browser: customer,
  804. css: '.zammad-chat',
  805. value: 'my name is me',
  806. )
  807. end
  808. def disable_chat
  809. login(
  810. browser: agent,
  811. username: 'master@example.com',
  812. password: 'test',
  813. url: browser_url,
  814. )
  815. tasks_close_all(
  816. browser: agent,
  817. )
  818. # disable chat
  819. click(
  820. browser: agent,
  821. css: 'a[href="#manage"]',
  822. )
  823. click(
  824. browser: agent,
  825. css: '.content.active a[href="#channels/chat"]',
  826. )
  827. switch(
  828. browser: agent,
  829. css: '.content.active .js-chatSetting',
  830. type: 'off',
  831. )
  832. end
  833. end