fileactionsSpec.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  1. /**
  2. * ownCloud
  3. *
  4. * @author Vincent Petry
  5. * @copyright 2014 Vincent Petry <pvince81@owncloud.com>
  6. *
  7. * This library is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
  9. * License as published by the Free Software Foundation; either
  10. * version 3 of the License, or any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
  16. *
  17. * You should have received a copy of the GNU Affero General Public
  18. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  19. *
  20. */
  21. describe('OCA.Files.FileActions tests', function() {
  22. var fileList, fileActions;
  23. beforeEach(function() {
  24. // init horrible parameters
  25. var $body = $('#testArea');
  26. $body.append('<input type="hidden" id="dir" value="/subdir"></input>');
  27. $body.append('<input type="hidden" id="permissions" value="31"></input>');
  28. $body.append('<table id="filestable"><tbody id="fileList"></tbody></table>');
  29. // dummy files table
  30. fileActions = new OCA.Files.FileActions();
  31. fileActions.registerAction({
  32. name: 'Testdropdown',
  33. displayName: 'Testdropdowndisplay',
  34. mime: 'all',
  35. permissions: OC.PERMISSION_READ,
  36. icon: function () {
  37. return OC.imagePath('core', 'actions/download');
  38. }
  39. });
  40. fileActions.registerAction({
  41. name: 'Testinline',
  42. displayName: 'Testinlinedisplay',
  43. type: OCA.Files.FileActions.TYPE_INLINE,
  44. mime: 'all',
  45. permissions: OC.PERMISSION_READ
  46. });
  47. fileActions.registerAction({
  48. name: 'Testdefault',
  49. displayName: 'Testdefaultdisplay',
  50. mime: 'all',
  51. permissions: OC.PERMISSION_READ
  52. });
  53. fileActions.setDefault('all', 'Testdefault');
  54. fileList = new OCA.Files.FileList($body, {
  55. fileActions: fileActions
  56. });
  57. });
  58. afterEach(function() {
  59. fileActions = null;
  60. fileList.destroy();
  61. fileList = undefined;
  62. $('#dir, #permissions, #filestable').remove();
  63. });
  64. it('calling clear() clears file actions', function() {
  65. fileActions.clear();
  66. expect(fileActions.actions).toEqual({});
  67. expect(fileActions.defaults).toEqual({});
  68. expect(fileActions.icons).toEqual({});
  69. expect(fileActions.currentFile).toBe(null);
  70. });
  71. describe('displaying actions', function() {
  72. var $tr;
  73. beforeEach(function() {
  74. var fileData = {
  75. id: 18,
  76. type: 'file',
  77. name: 'testName.txt',
  78. mimetype: 'text/plain',
  79. size: '1234',
  80. etag: 'a01234c',
  81. mtime: '123456',
  82. permissions: OC.PERMISSION_READ | OC.PERMISSION_UPDATE
  83. };
  84. // note: FileActions.display() is called implicitly
  85. $tr = fileList.add(fileData);
  86. });
  87. it('renders inline file actions', function() {
  88. // actions defined after call
  89. expect($tr.find('.action.action-testinline').length).toEqual(1);
  90. expect($tr.find('.action.action-testinline').attr('data-action')).toEqual('Testinline');
  91. });
  92. it('does not render dropdown actions', function() {
  93. expect($tr.find('.action.action-testdropdown').length).toEqual(0);
  94. });
  95. it('does not render default action', function() {
  96. expect($tr.find('.action.action-testdefault').length).toEqual(0);
  97. });
  98. it('replaces file actions when displayed twice', function() {
  99. fileActions.display($tr.find('td.filename'), true, fileList);
  100. fileActions.display($tr.find('td.filename'), true, fileList);
  101. expect($tr.find('.action.action-testinline').length).toEqual(1);
  102. });
  103. it('renders actions menu trigger', function() {
  104. expect($tr.find('.action.action-menu').length).toEqual(1);
  105. expect($tr.find('.action.action-menu').attr('data-action')).toEqual('menu');
  106. });
  107. it('only renders actions relevant to the mime type', function() {
  108. fileActions.registerAction({
  109. name: 'Match',
  110. displayName: 'MatchDisplay',
  111. type: OCA.Files.FileActions.TYPE_INLINE,
  112. mime: 'text/plain',
  113. permissions: OC.PERMISSION_READ
  114. });
  115. fileActions.registerAction({
  116. name: 'Nomatch',
  117. displayName: 'NoMatchDisplay',
  118. type: OCA.Files.FileActions.TYPE_INLINE,
  119. mime: 'application/octet-stream',
  120. permissions: OC.PERMISSION_READ
  121. });
  122. fileActions.display($tr.find('td.filename'), true, fileList);
  123. expect($tr.find('.action.action-match').length).toEqual(1);
  124. expect($tr.find('.action.action-nomatch').length).toEqual(0);
  125. });
  126. it('only renders actions relevant to the permissions', function() {
  127. fileActions.registerAction({
  128. name: 'Match',
  129. displayName: 'MatchDisplay',
  130. type: OCA.Files.FileActions.TYPE_INLINE,
  131. mime: 'text/plain',
  132. permissions: OC.PERMISSION_UPDATE
  133. });
  134. fileActions.registerAction({
  135. name: 'Nomatch',
  136. displayName: 'NoMatchDisplay',
  137. type: OCA.Files.FileActions.TYPE_INLINE,
  138. mime: 'text/plain',
  139. permissions: OC.PERMISSION_DELETE
  140. });
  141. fileActions.display($tr.find('td.filename'), true, fileList);
  142. expect($tr.find('.action.action-match').length).toEqual(1);
  143. expect($tr.find('.action.action-nomatch').length).toEqual(0);
  144. });
  145. it('display inline icon', function() {
  146. fileActions.registerAction({
  147. name: 'Icon',
  148. displayName: 'IconDisplay',
  149. type: OCA.Files.FileActions.TYPE_INLINE,
  150. mime: 'all',
  151. icon: OC.imagePath('core', 'actions/icon'),
  152. permissions: OC.PERMISSION_READ
  153. });
  154. fileActions.registerAction({
  155. name: 'NoIcon',
  156. displayName: 'NoIconDisplay',
  157. type: OCA.Files.FileActions.TYPE_INLINE,
  158. mime: 'all',
  159. permissions: OC.PERMISSION_READ
  160. });
  161. fileActions.display($tr.find('td.filename'), true, fileList);
  162. expect($tr.find('.action.action-icon').length).toEqual(1);
  163. expect($tr.find('.action.action-icon').find('img').length).toEqual(1);
  164. expect($tr.find('.action.action-icon').find('img').eq(0).attr('src')).toEqual(OC.imagePath('core', 'actions/icon'));
  165. expect($tr.find('.action.action-noicon').length).toEqual(1);
  166. expect($tr.find('.action.action-noicon').find('img').length).toEqual(0);
  167. });
  168. it('display alt text on inline icon', function() {
  169. fileActions.registerAction({
  170. name: 'IconAltText',
  171. displayName: 'IconAltTextDisplay',
  172. type: OCA.Files.FileActions.TYPE_INLINE,
  173. mime: 'all',
  174. icon: OC.imagePath('core', 'actions/iconAltText'),
  175. altText: 'alt icon text',
  176. permissions: OC.PERMISSION_READ
  177. });
  178. fileActions.registerAction({
  179. name: 'IconNoAltText',
  180. displayName: 'IconNoAltTextDisplay',
  181. type: OCA.Files.FileActions.TYPE_INLINE,
  182. mime: 'all',
  183. icon: OC.imagePath('core', 'actions/iconNoAltText'),
  184. permissions: OC.PERMISSION_READ
  185. });
  186. fileActions.display($tr.find('td.filename'), true, fileList);
  187. expect($tr.find('.action.action-iconalttext').length).toEqual(1);
  188. expect($tr.find('.action.action-iconalttext').find('img').length).toEqual(1);
  189. expect($tr.find('.action.action-iconalttext').find('img').eq(0).attr('alt')).toEqual('alt icon text');
  190. expect($tr.find('.action.action-iconnoalttext').length).toEqual(1);
  191. expect($tr.find('.action.action-iconnoalttext').find('img').length).toEqual(1);
  192. expect($tr.find('.action.action-iconnoalttext').find('img').eq(0).attr('alt')).toEqual('');
  193. });
  194. });
  195. describe('action handler', function() {
  196. var actionStub, $tr, clock;
  197. beforeEach(function() {
  198. clock = sinon.useFakeTimers();
  199. var fileData = {
  200. id: 18,
  201. type: 'file',
  202. name: 'testName.txt',
  203. mimetype: 'text/plain',
  204. size: '1234',
  205. etag: 'a01234c',
  206. mtime: '123456'
  207. };
  208. actionStub = sinon.stub();
  209. fileActions.registerAction({
  210. name: 'Test',
  211. type: OCA.Files.FileActions.TYPE_INLINE,
  212. mime: 'all',
  213. icon: OC.imagePath('core', 'actions/test'),
  214. permissions: OC.PERMISSION_READ,
  215. actionHandler: actionStub
  216. });
  217. $tr = fileList.add(fileData);
  218. });
  219. afterEach(function() {
  220. OC.hideMenus();
  221. // jump past animations
  222. clock.tick(1000);
  223. clock.restore();
  224. });
  225. it('passes context to action handler', function() {
  226. $tr.find('.action-test').click();
  227. expect(actionStub.calledOnce).toEqual(true);
  228. expect(actionStub.getCall(0).args[0]).toEqual('testName.txt');
  229. var context = actionStub.getCall(0).args[1];
  230. expect(context.$file.is($tr)).toEqual(true);
  231. expect(context.fileList).toBeDefined();
  232. expect(context.fileActions).toBeDefined();
  233. expect(context.dir).toEqual('/subdir');
  234. expect(context.fileInfoModel.get('name')).toEqual('testName.txt');
  235. // when data-path is defined
  236. actionStub.reset();
  237. $tr.attr('data-path', '/somepath');
  238. $tr.find('.action-test').click();
  239. context = actionStub.getCall(0).args[1];
  240. expect(context.dir).toEqual('/somepath');
  241. });
  242. it('also triggers action handler when calling triggerAction()', function() {
  243. var model = new OCA.Files.FileInfoModel({
  244. id: 1,
  245. name: 'Test.txt',
  246. path: '/subdir',
  247. mime: 'text/plain',
  248. permissions: 31
  249. });
  250. fileActions.triggerAction('Test', model, fileList);
  251. expect(actionStub.calledOnce).toEqual(true);
  252. expect(actionStub.getCall(0).args[0]).toEqual('Test.txt');
  253. expect(actionStub.getCall(0).args[1].fileList).toEqual(fileList);
  254. expect(actionStub.getCall(0).args[1].fileActions).toEqual(fileActions);
  255. expect(actionStub.getCall(0).args[1].fileInfoModel).toEqual(model);
  256. });
  257. describe('actions menu', function() {
  258. it('shows actions menu inside row when clicking the menu trigger', function() {
  259. expect($tr.find('td.filename .fileActionsMenu').length).toEqual(0);
  260. $tr.find('.action-menu').click();
  261. expect($tr.find('td.filename .fileActionsMenu').length).toEqual(1);
  262. });
  263. it('shows highlight on current row', function() {
  264. $tr.find('.action-menu').click();
  265. expect($tr.hasClass('mouseOver')).toEqual(true);
  266. });
  267. it('cleans up after hiding', function() {
  268. var slideUpStub = sinon.stub($.fn, 'slideUp');
  269. $tr.find('.action-menu').click();
  270. expect($tr.find('.fileActionsMenu').length).toEqual(1);
  271. OC.hideMenus();
  272. // sliding animation
  273. expect(slideUpStub.calledOnce).toEqual(true);
  274. slideUpStub.getCall(0).args[1]();
  275. expect($tr.hasClass('mouseOver')).toEqual(false);
  276. expect($tr.find('.fileActionsMenu').length).toEqual(0);
  277. });
  278. });
  279. });
  280. describe('custom rendering', function() {
  281. var $tr;
  282. beforeEach(function() {
  283. var fileData = {
  284. id: 18,
  285. type: 'file',
  286. name: 'testName.txt',
  287. mimetype: 'text/plain',
  288. size: '1234',
  289. etag: 'a01234c',
  290. mtime: '123456'
  291. };
  292. $tr = fileList.add(fileData);
  293. });
  294. it('regular function', function() {
  295. var actionStub = sinon.stub();
  296. fileActions.registerAction({
  297. name: 'Test',
  298. displayName: '',
  299. mime: 'all',
  300. type: OCA.Files.FileActions.TYPE_INLINE,
  301. permissions: OC.PERMISSION_READ,
  302. render: function(actionSpec, isDefault, context) {
  303. expect(actionSpec.name).toEqual('Test');
  304. expect(actionSpec.displayName).toEqual('');
  305. expect(actionSpec.permissions).toEqual(OC.PERMISSION_READ);
  306. expect(actionSpec.mime).toEqual('all');
  307. expect(isDefault).toEqual(false);
  308. expect(context.fileList).toEqual(fileList);
  309. expect(context.$file[0]).toEqual($tr[0]);
  310. var $customEl = $('<a class="action action-test" href="#"><span>blabli</span><span>blabla</span></a>');
  311. $tr.find('td:first').append($customEl);
  312. return $customEl;
  313. },
  314. actionHandler: actionStub
  315. });
  316. fileActions.display($tr.find('td.filename'), true, fileList);
  317. var $actionEl = $tr.find('td:first .action-test');
  318. expect($actionEl.length).toEqual(1);
  319. expect($actionEl.hasClass('action')).toEqual(true);
  320. $actionEl.click();
  321. expect(actionStub.calledOnce).toEqual(true);
  322. expect(actionStub.getCall(0).args[0]).toEqual('testName.txt');
  323. });
  324. });
  325. describe('merging', function() {
  326. var $tr;
  327. beforeEach(function() {
  328. var fileData = {
  329. id: 18,
  330. type: 'file',
  331. name: 'testName.txt',
  332. path: '/anotherpath/there',
  333. mimetype: 'text/plain',
  334. size: '1234',
  335. etag: 'a01234c',
  336. mtime: '123456'
  337. };
  338. $tr = fileList.add(fileData);
  339. });
  340. afterEach(function() {
  341. $tr = null;
  342. });
  343. it('copies all actions to target file actions', function() {
  344. var actions1 = new OCA.Files.FileActions();
  345. var actions2 = new OCA.Files.FileActions();
  346. var actionStub1 = sinon.stub();
  347. var actionStub2 = sinon.stub();
  348. actions1.registerAction({
  349. name: 'Test',
  350. type: OCA.Files.FileActions.TYPE_INLINE,
  351. mime: 'all',
  352. permissions: OC.PERMISSION_READ,
  353. icon: OC.imagePath('core', 'actions/test'),
  354. actionHandler: actionStub1
  355. });
  356. actions2.registerAction({
  357. name: 'Test2',
  358. type: OCA.Files.FileActions.TYPE_INLINE,
  359. mime: 'all',
  360. permissions: OC.PERMISSION_READ,
  361. icon: OC.imagePath('core', 'actions/test'),
  362. actionHandler: actionStub2
  363. });
  364. actions2.merge(actions1);
  365. actions2.display($tr.find('td.filename'), true, fileList);
  366. expect($tr.find('.action-test').length).toEqual(1);
  367. expect($tr.find('.action-test2').length).toEqual(1);
  368. $tr.find('.action-test').click();
  369. expect(actionStub1.calledOnce).toEqual(true);
  370. expect(actionStub2.notCalled).toEqual(true);
  371. actionStub1.reset();
  372. $tr.find('.action-test2').click();
  373. expect(actionStub1.notCalled).toEqual(true);
  374. expect(actionStub2.calledOnce).toEqual(true);
  375. });
  376. it('overrides existing actions on merge', function() {
  377. var actions1 = new OCA.Files.FileActions();
  378. var actions2 = new OCA.Files.FileActions();
  379. var actionStub1 = sinon.stub();
  380. var actionStub2 = sinon.stub();
  381. actions1.registerAction({
  382. name: 'Test',
  383. type: OCA.Files.FileActions.TYPE_INLINE,
  384. mime: 'all',
  385. permissions: OC.PERMISSION_READ,
  386. icon: OC.imagePath('core', 'actions/test'),
  387. actionHandler: actionStub1
  388. });
  389. actions2.registerAction({
  390. name: 'Test', // override
  391. mime: 'all',
  392. type: OCA.Files.FileActions.TYPE_INLINE,
  393. permissions: OC.PERMISSION_READ,
  394. icon: OC.imagePath('core', 'actions/test'),
  395. actionHandler: actionStub2
  396. });
  397. actions1.merge(actions2);
  398. actions1.display($tr.find('td.filename'), true, fileList);
  399. expect($tr.find('.action-test').length).toEqual(1);
  400. $tr.find('.action-test').click();
  401. expect(actionStub1.notCalled).toEqual(true);
  402. expect(actionStub2.calledOnce).toEqual(true);
  403. });
  404. it('overrides existing action when calling register after merge', function() {
  405. var actions1 = new OCA.Files.FileActions();
  406. var actions2 = new OCA.Files.FileActions();
  407. var actionStub1 = sinon.stub();
  408. var actionStub2 = sinon.stub();
  409. actions1.registerAction({
  410. mime: 'all',
  411. name: 'Test',
  412. type: OCA.Files.FileActions.TYPE_INLINE,
  413. permissions: OC.PERMISSION_READ,
  414. icon: OC.imagePath('core', 'actions/test'),
  415. actionHandler: actionStub1
  416. });
  417. actions1.merge(actions2);
  418. // late override
  419. actions1.registerAction({
  420. mime: 'all',
  421. name: 'Test', // override
  422. type: OCA.Files.FileActions.TYPE_INLINE,
  423. permissions: OC.PERMISSION_READ,
  424. icon: OC.imagePath('core', 'actions/test'),
  425. actionHandler: actionStub2
  426. });
  427. actions1.display($tr.find('td.filename'), true, fileList);
  428. expect($tr.find('.action-test').length).toEqual(1);
  429. $tr.find('.action-test').click();
  430. expect(actionStub1.notCalled).toEqual(true);
  431. expect(actionStub2.calledOnce).toEqual(true);
  432. });
  433. it('leaves original file actions untouched (clean copy)', function() {
  434. var actions1 = new OCA.Files.FileActions();
  435. var actions2 = new OCA.Files.FileActions();
  436. var actionStub1 = sinon.stub();
  437. var actionStub2 = sinon.stub();
  438. actions1.registerAction({
  439. mime: 'all',
  440. name: 'Test',
  441. type: OCA.Files.FileActions.TYPE_INLINE,
  442. permissions: OC.PERMISSION_READ,
  443. icon: OC.imagePath('core', 'actions/test'),
  444. actionHandler: actionStub1
  445. });
  446. // copy the Test action to actions2
  447. actions2.merge(actions1);
  448. // late override
  449. actions2.registerAction({
  450. mime: 'all',
  451. name: 'Test', // override
  452. type: OCA.Files.FileActions.TYPE_INLINE,
  453. permissions: OC.PERMISSION_READ,
  454. icon: OC.imagePath('core', 'actions/test'),
  455. actionHandler: actionStub2
  456. });
  457. // check if original actions still call the correct handler
  458. actions1.display($tr.find('td.filename'), true, fileList);
  459. expect($tr.find('.action-test').length).toEqual(1);
  460. $tr.find('.action-test').click();
  461. expect(actionStub1.calledOnce).toEqual(true);
  462. expect(actionStub2.notCalled).toEqual(true);
  463. });
  464. });
  465. describe('events', function() {
  466. var clock;
  467. beforeEach(function() {
  468. clock = sinon.useFakeTimers();
  469. });
  470. afterEach(function() {
  471. clock.restore();
  472. });
  473. it('notifies update event handlers once after multiple changes', function() {
  474. var actionStub = sinon.stub();
  475. var handler = sinon.stub();
  476. fileActions.on('registerAction', handler);
  477. fileActions.registerAction({
  478. mime: 'all',
  479. name: 'Test',
  480. type: OCA.Files.FileActions.TYPE_INLINE,
  481. permissions: OC.PERMISSION_READ,
  482. icon: OC.imagePath('core', 'actions/test'),
  483. actionHandler: actionStub
  484. });
  485. fileActions.registerAction({
  486. mime: 'all',
  487. name: 'Test2',
  488. permissions: OC.PERMISSION_READ,
  489. icon: OC.imagePath('core', 'actions/test'),
  490. actionHandler: actionStub
  491. });
  492. expect(handler.calledTwice).toEqual(true);
  493. });
  494. it('does not notifies update event handlers after unregistering', function() {
  495. var actionStub = sinon.stub();
  496. var handler = sinon.stub();
  497. fileActions.on('registerAction', handler);
  498. fileActions.off('registerAction', handler);
  499. fileActions.registerAction({
  500. mime: 'all',
  501. name: 'Test',
  502. type: OCA.Files.FileActions.TYPE_INLINE,
  503. permissions: OC.PERMISSION_READ,
  504. icon: OC.imagePath('core', 'actions/test'),
  505. actionHandler: actionStub
  506. });
  507. fileActions.registerAction({
  508. mime: 'all',
  509. name: 'Test2',
  510. type: OCA.Files.FileActions.TYPE_INLINE,
  511. permissions: OC.PERMISSION_READ,
  512. icon: OC.imagePath('core', 'actions/test'),
  513. actionHandler: actionStub
  514. });
  515. expect(handler.notCalled).toEqual(true);
  516. });
  517. });
  518. describe('default actions', function() {
  519. describe('download', function() {
  520. it('redirects to URL and sets busy state to list', function() {
  521. var handleDownloadStub = sinon.stub(OCA.Files.Files, 'handleDownload');
  522. var busyStub = sinon.stub(fileList, 'showFileBusyState');
  523. var fileData = {
  524. id: 18,
  525. type: 'file',
  526. name: 'testName.txt',
  527. mimetype: 'text/plain',
  528. size: '1234',
  529. etag: 'a01234c',
  530. mtime: '123456',
  531. permissions: OC.PERMISSION_READ | OC.PERMISSION_UPDATE
  532. };
  533. // note: FileActions.display() is called implicitly
  534. fileList.add(fileData);
  535. var model = fileList.getModelForFile('testName.txt');
  536. fileActions.registerDefaultActions();
  537. fileActions.triggerAction('Download', model, fileList);
  538. expect(busyStub.calledOnce).toEqual(true);
  539. expect(busyStub.calledWith('testName.txt', true)).toEqual(true);
  540. expect(handleDownloadStub.calledOnce).toEqual(true);
  541. expect(handleDownloadStub.getCall(0).args[0]).toEqual(
  542. OC.webroot + '/remote.php/webdav/subdir/testName.txt'
  543. );
  544. busyStub.reset();
  545. handleDownloadStub.yield();
  546. expect(busyStub.calledOnce).toEqual(true);
  547. expect(busyStub.calledWith('testName.txt', false)).toEqual(true);
  548. busyStub.restore();
  549. handleDownloadStub.restore();
  550. });
  551. });
  552. });
  553. });