Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get tests to work #43

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

Jules-Bertholet
Copy link
Contributor

Closes #36. Unfortunately this required adding the main ckeditor5 repo as a submodule, you will have to run git submdule init and git submodule update.
To actually run the tests, use yarn test, optionally with --coverage, --watch, or --source-map.

@tony
Copy link
Collaborator

tony commented May 12, 2021

@Jules-Bertholet Have you seen ckeditor/ckeditor5-dev#594? Do you think it'd impact this?

Bikeshed: Do you have any thoughts if that'd impact the need to include a submodule dependency? I'm interested in avoiding that if possible. I suppose another option could be to clone the ckeditor5 repo via a script and have it under .gitignore.

@Jules-Bertholet
Copy link
Contributor Author

No, ckeditor/ckeditor5-dev#594 as is wouldn't eliminate the need for getting files from the main repo (note that all that is needed is the contents of https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-core/tests/_utils).

@tony
Copy link
Collaborator

tony commented May 12, 2021

@Jules-Bertholet Any comments on using a shell script that'd check if it exists and clone it rather than a submodule?

The reason I ask is I think submodules are heavy. Development and building doesn't need them.

If they're only part of tests, we may be able to avoid attaching the repo a the git level. Also we may be able to use commands that clone with less depth (--depth 1)

If you'd like I can propose something

@Jules-Bertholet
Copy link
Contributor Author

If you'd like I can propose something

Go ahead

@tony
Copy link
Collaborator

tony commented May 12, 2021

@Jules-Bertholet Absolutely

Note: I may not be able to get around to that immediately. I'm assuming the "allow contributions from maintainers" is checked in the right side of the PR though?

@Jules-Bertholet
Copy link
Contributor Author

It is checked, yes

@tony
Copy link
Collaborator

tony commented May 16, 2021

@Jules-Bertholet Could you rebase this PR? (to fix the README conflict?)

I reformatted the README with prettier in fef1e16

Could you take a stab at this w/o the git submodule? e.g. creating a shell script + npm pretest to check if the repo exists and if not clone it? pretest in scripts of package.json (it'd be invoked automatically with npm test)

The reason why is git submodules are heavy duty for a one-off case and it breaks from the pattern of using npm packages.

@Jules-Bertholet
Copy link
Contributor Author

I've updated the instructions for fetching the submodule so that only needed files are downoaded (this makes the submodule solution much lighter).

@Jules-Bertholet
Copy link
Contributor Author

@tony I've added a pretest script to set up the repo

@Jules-Bertholet
Copy link
Contributor Author

Note that once ckeditor/ckeditor5#7311 is merged we will be able to dump the submodule completely.

@tony
Copy link
Collaborator

tony commented May 22, 2021

One detail - I think we should avoid the git submodule part unless we've no other option. Do you use them often? I do but want to try without it for this case. The reason why is this is only used for tests and I think submodules would be for cases where we fundamentally relied on it (even for normal dev/packaging, but we use NPM for that). If it's true ckeditor/ckeditor5#7311 is near, that is something I'd like to explore since it fits the packaging setup here better.

Have you considered .gitignore with ckeditor/ and having the script git clone https://github.com/ckeditor/ckeditor5.git/?

@Jules-Bertholet
Copy link
Contributor Author

I've eliminated the submodules

@tony
Copy link
Collaborator

tony commented May 24, 2021

Thank you!!!

The --filter=blob:none seems to make this command last longer for me.

Do you notice anything between these commands?

- git clone --no-checkout --depth=1 --filter=blob:none https://github.com/ckeditor/ckeditor5
- git clone --no-checkout --depth=1 https://github.com/ckeditor/ckeditor5

For me the second one, curiously, was faster, despite the fact the download was huge (32.41mB)

This was due to my git version: git -v is git version 2.25.1. With this older git version, these commands were super long lasting

I updated to git version 2.31.1 which has the 2.29 partial cloning updates (see related blog post) and this thing checked out fast

@tony
Copy link
Collaborator

tony commented May 24, 2021

When running locally, here is what I get:

node --version
v12.20.1
ckeditor5-math on  tests [] ❯ yarn test
yarn run v1.22.10
$ bash -c 'if [ ! -e ckeditor5/.git ]; then git clone --no-checkout --depth=1 --filter=blob:none https://github.com/ckeditor/ckeditor5 && git -C ckeditor5 sparse-checkout set packages/ckeditor5-core/tests/_utils && git -C ckeditor5 checkout master; fi'
Cloning into 'ckeditor5'...
remote: Enumerating objects: 1050, done.
remote: Counting objects: 100% (1050/1050), done.
remote: Compressing objects: 100% (767/767), done.
remote: Total 1050 (delta 4), reused 751 (delta 3), pack-reused 0
Receiving objects: 100% (1050/1050), 203.19 KiB | 339.00 KiB/s, done.
Resolving deltas: 100% (4/4), done.
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 8 (delta 2), reused 2 (delta 1), pack-reused 0
Receiving objects: 100% (8/8), 7.34 KiB | 7.34 MiB/s, done.
Resolving deltas: 100% (2/2), done.
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0
Receiving objects: 100% (1/1), 130 bytes | 130.00 KiB/s, done.
Already on 'master'
Your branch is up to date with 'origin/master'.
$ node node_modules/.bin/ckeditor5-dev-tests --files=ckeditor5
⚠ You're running tests in dev mode - some error protections are loose. Use the `--production` flag to use strictest verification methods.

START:
24 05 2021 09:14:25.639:WARN [filelist]: Pattern "/home/t/work/javascript/ckeditor5-math/packages/ckeditor5-utils/tests/_assets/**/*" does not match any file.
ℹ 「wdm」: Compiled successfully.
24 05 2021 09:14:25.644:WARN [filelist]: Pattern "/home/t/work/javascript/ckeditor5-math/packages/ckeditor5-utils/tests/_assets/**/*" does not match any file.
ℹ 「wdm」: Compiling...
✖ 「wdm」:    949 modules

ERROR in ./ckeditor5/packages/ckeditor5-core/tests/_utils/classictesteditor.js
Module not found: Error: Can't resolve '../../src/editor/editor' in '/home/t/work/javascript/ckeditor5-math/ckeditor5/packages/ckeditor5-core/tests/_utils'

ERROR in ./ckeditor5/packages/ckeditor5-core/tests/_utils/classictesteditor.js
Module not found: Error: Can't resolve '../../src/editor/editorui' in '/home/t/work/javascript/ckeditor5-math/ckeditor5/packages/ckeditor5-core/tests/_utils'

ERROR in ./ckeditor5/packages/ckeditor5-core/tests/_utils/classictesteditor.js
Module not found: Error: Can't resolve '../../src/editor/utils/dataapimixin' in '/home/t/work/javascript/ckeditor5-math/ckeditor5/packages/ckeditor5-core/tests/_utils'

ERROR in ./ckeditor5/packages/ckeditor5-core/tests/_utils/classictesteditor.js
Module not found: Error: Can't resolve '../../src/editor/utils/elementapimixin' in '/home/t/work/javascript/ckeditor5-math/ckeditor5/packages/ckeditor5-core/tests/_utils'
ℹ 「wdm」: Failed to compile.
24 05 2021 09:14:27.601:INFO [karma-server]: Karma v5.2.3 server started at http://localhost:9876/
24 05 2021 09:14:27.602:INFO [launcher]: Launching browsers CHROME_LOCAL with concurrency unlimited
24 05 2021 09:14:27.640:INFO [launcher]: Starting browser Chrome
24 05 2021 09:14:28.684:INFO [Chrome 90.0.4430.212 (Linux x86_64)]: Connected on socket OigGxkZNvRZoHbfgAAAA with id 2794066
Chrome 90.0.4430.212 (Linux x86_64) ERROR
  Uncaught SyntaxError: Unexpected token '!'
  at http://localhost:9876/context.html:37:33

  SyntaxError: Unexpected token '!'
      at Object../ckeditor5/packages/ckeditor5-core/tests/_utils/classictesteditor.js (build/.automated-tests/entry-point.js:109:1)
      at __webpack_require__ (build/.automated-tests/entry-point.js:20:30)
      at eval (webpack:///./tests/automath.js?:4:122)
      at Module../tests/automath.js (build/.automated-tests/entry-point.js:11390:1)
      at __webpack_require__ (build/.automated-tests/entry-point.js:20:30)
      at eval (webpack:///./build/.automated-tests/entry-point.js?:4:114)
      at Module../build/.automated-tests/entry-point.js (build/.automated-tests/entry-point.js:97:1)
      at __webpack_require__ (build/.automated-tests/entry-point.js:20:30)
      at build/.automated-tests/entry-point.js:84:18
      at build/.automated-tests/entry-point.js:87:10

Finished in 0.205 secs / 0 secs @ 09:14:28 GMT-0500 (Central Daylight Time)

SUMMARY:
✔ 0 tests completed
Error: Karma finished with "1" code.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@tony
Copy link
Collaborator

tony commented May 24, 2021

@Jules-Bertholet Would you like to take a look at this and see if you get the same error when trying again? (e.g. rm -rf node_modules and rm -rf ckeditor5 first)

If not, I can merge this in and try to fix after.

My plan is to set up a GH action to run these

@Jules-Bertholet
Copy link
Contributor Author

Should work now

@tony
Copy link
Collaborator

tony commented Jun 21, 2021

@Jules-Bertholet I think this needs to pull the correct tag from ckeditor5

Do tests pass for you with yarn test? Do you have your system info?

Even with v27.1.0 of ckeditor5 checked out:

yarn run v1.22.10
$ bash -c 'if [ ! -e node_modules/@ckeditor/ckeditor5-core/tests/_utils ]; then git clone --no-checkout --depth=1 --filter=blob:none https://github.com/ckeditor/ckeditor5 && git -C ckeditor5 sparse-checkout set packages/ckeditor5-core packages/ckeditor5-core/tests/_utils && git -C ckeditor5 checkout master && ln -sfrT ckeditor5/packages/ckeditor5-core/tests node_modules/@ckeditor/ckeditor5-core/tests ; fi'
$ node node_modules/.bin/ckeditor5-dev-tests --files=ckeditor5

START:
�[33m21 06 2021 09:16:13.354:WARN [filelist]: �[39mPattern "/home/t/work/javascript/ckeditor5-math/packages/ckeditor5-utils/tests/_assets/**/*" does not match any file.
�[34mℹ�[39m �[90m「wdm」�[39m: Compiled successfully.
�[33m21 06 2021 09:16:13.359:WARN [filelist]: �[39mPattern "/home/t/work/javascript/ckeditor5-math/packages/ckeditor5-utils/tests/_assets/**/*" does not match any file.
�[34mℹ�[39m �[90m「wdm」�[39m: Compiling...
�[34mℹ�[39m �[90m「wdm」�[39m:    957 modules
�[34mℹ�[39m �[90m「wdm」�[39m: Compiled successfully.
�[32m21 06 2021 09:16:15.367:INFO [karma-server]: �[39mKarma v5.2.3 server started at http://localhost:9876/
�[32m21 06 2021 09:16:15.367:INFO [launcher]: �[39mLaunching browsers CHROME_LOCAL with concurrency unlimited
�[32m21 06 2021 09:16:15.401:INFO [launcher]: �[39mStarting browser Chrome
�[32m21 06 2021 09:16:15.804:INFO [Chrome 91.0.4472.114 (Linux x86_64)]: �[39mConnected on socket 8kzIUmH04xDz55xoAAAA with id 88091590
  AutoMath - integration
    ✔ should load Clipboard plugin
    ✔ should load Undo plugin
    ✔ has proper name
    use fake timers
      ✖ replaces pasted text with mathtex element after 100ms
      ✖ replaces pasted text with inline mathtex element after 100ms
      ✖ can undo auto-mathing
      ✖ works for not collapsed selection inside single element
      ✖ works for not collapsed selection over a few elements
      ✖ inserts mathtex in-place (collapsed selection)
      ✖ inserts math in-place (non-collapsed selection)
      ✖ does nothing if pasted two equation as text
  Math
    ✔ should be loaded
    ✔ should load MathEditing plugin
    ✔ should load Widget plugin
    ✔ should load MathUI plugin
    ✔ should load AutoMath plugin
    ✔ has proper name
  MathUI
    init
      ✔ should register click observer
      ✔ should create #formView
      math toolbar button
        ✔ should be registered
        ✔ should be toggleable button
        ✔ should be bound to the math command
        ✔ should call #_showUI upon #execute
    _showUI()
      ✔ should not work if the math command is disabled
      ✔ should not throw if the UI is already visible
      ✖ should add #mainFormView to the balloon and attach the balloon to the selection when text fragment is selected
      ✖ should add #mainFormView to the balloon and attach the balloon to the selection when selection is collapsed
      ✖ should disable #mainFormView element when math command is disabled
      _hideUI()
        ✔ should remove the UI from the balloon
        ✔ should focus the `editable` by default
        ✔ should focus the `editable` before before removing elements from the balloon
        ✔ should not throw an error when views are not in the `balloon`
        ✔ should clear ui#update listener from the ViewDocument
      keyboard support
        ✔ should show the UI on Ctrl+M keystroke
        ✔ should prevent default action on Ctrl+M keystroke
        ✔ should make stack with math visible on Ctrl+M keystroke - no math
        ✔ should make stack with math visible on Ctrl+M keystroke - math
        ✔ should hide the UI after Esc key press (from editor) and not focus the editable
        ✔ should not hide the UI after Esc key press (from editor) when UI is open but is not visible
      mouse support
        ✔ should hide the UI and not focus editable upon clicking outside the UI
        ✔ should not hide the UI upon clicking inside the the UI
      math form view
        ✔ should mark the editor UI as focused when the #formView is focused
        binding
          ✔ should bind mainFormView.mathInputView#value to math command value
          ✔ should execute math command on mainFormView#submit event
          ✔ should hide the balloon on mainFormView#cancel if math command does not have a value
          ✔ should hide the balloon after Esc key press if math command does not have a value
          ✔ should blur math input element before hiding the view

Finished in 1.214 secs / 0.102 secs @ 09:16:17 GMT-0500 (Central Daylight Time)

SUMMARY:
✔ 36 tests completed
✖ 11 tests failed

FAILED TESTS:
  AutoMath - integration
    use fake timers
      ✖ replaces pasted text with mathtex element after 100ms
        Chrome 91.0.4472.114 (Linux x86_64)
      TypeError: data.stopPropagation is not a function
          at Object.eval (webpack:///./node_modules/@ckeditor/ckeditor5-clipboard/src/clipboardobserver.js?:73:11)
          at Object.fire (webpack:///./node_modules/@ckeditor/ckeditor5-utils/src/emittermixin.js?:208:30)
          at fireListenerFor (webpack:///./node_modules/@ckeditor/ckeditor5-engine/src/view/observer/bubblingemittermixin.js?:168:10)
          at Document.fire (webpack:///./node_modules/@ckeditor/ckeditor5-engine/src/view/observer/bubblingemittermixin.js?:98:4)
          at pasteHtml (webpack:///./tests/automath.js?:183:32)
          at Context.eval (webpack:///./tests/automath.js?:77:4)

      ✖ replaces pasted text with inline mathtex element after 100ms
        Chrome 91.0.4472.114 (Linux x86_64)
      TypeError: data.stopPropagation is not a function
          at Object.eval (webpack:///./node_modules/@ckeditor/ckeditor5-clipboard/src/clipboardobserver.js?:73:11)
          at Object.fire (webpack:///./node_modules/@ckeditor/ckeditor5-utils/src/emittermixin.js?:208:30)
          at fireListenerFor (webpack:///./node_modules/@ckeditor/ckeditor5-engine/src/view/observer/bubblingemittermixin.js?:168:10)
          at Document.fire (webpack:///./node_modules/@ckeditor/ckeditor5-engine/src/view/observer/bubblingemittermixin.js?:98:4)
          at pasteHtml (webpack:///./tests/automath.js?:183:32)
          at Context.eval (webpack:///./tests/automath.js?:92:4)

      ✖ can undo auto-mathing
        Chrome 91.0.4472.114 (Linux x86_64)
      TypeError: data.stopPropagation is not a function
          at Object.eval (webpack:///./node_modules/@ckeditor/ckeditor5-clipboard/src/clipboardobserver.js?:73:11)
          at Object.fire (webpack:///./node_modules/@ckeditor/ckeditor5-utils/src/emittermixin.js?:208:30)
          at fireListenerFor (webpack:///./node_modules/@ckeditor/ckeditor5-engine/src/view/observer/bubblingemittermixin.js?:168:10)
          at Document.fire (webpack:///./node_modules/@ckeditor/ckeditor5-engine/src/view/observer/bubblingemittermixin.js?:98:4)
          at pasteHtml (webpack:///./tests/automath.js?:183:32)
          at Context.eval (webpack:///./tests/automath.js?:107:4)

      ✖ works for not collapsed selection inside single element
        Chrome 91.0.4472.114 (Linux x86_64)
      TypeError: data.stopPropagation is not a function
          at Object.eval (webpack:///./node_modules/@ckeditor/ckeditor5-clipboard/src/clipboardobserver.js?:73:11)
          at Object.fire (webpack:///./node_modules/@ckeditor/ckeditor5-utils/src/emittermixin.js?:208:30)
          at fireListenerFor (webpack:///./node_modules/@ckeditor/ckeditor5-engine/src/view/observer/bubblingemittermixin.js?:168:10)
          at Document.fire (webpack:///./node_modules/@ckeditor/ckeditor5-engine/src/view/observer/bubblingemittermixin.js?:98:4)
          at pasteHtml (webpack:///./tests/automath.js?:183:32)
          at Context.eval (webpack:///./tests/automath.js?:124:4)

      ✖ works for not collapsed selection over a few elements
        Chrome 91.0.4472.114 (Linux x86_64)
      TypeError: data.stopPropagation is not a function
          at Object.eval (webpack:///./node_modules/@ckeditor/ckeditor5-clipboard/src/clipboardobserver.js?:73:11)
          at Object.fire (webpack:///./node_modules/@ckeditor/ckeditor5-utils/src/emittermixin.js?:208:30)
          at fireListenerFor (webpack:///./node_modules/@ckeditor/ckeditor5-engine/src/view/observer/bubblingemittermixin.js?:168:10)
          at Document.fire (webpack:///./node_modules/@ckeditor/ckeditor5-engine/src/view/observer/bubblingemittermixin.js?:98:4)
          at pasteHtml (webpack:///./tests/automath.js?:183:32)
          at Context.eval (webpack:///./tests/automath.js?:135:4)

      ✖ inserts mathtex in-place (collapsed selection)
        Chrome 91.0.4472.114 (Linux x86_64)
      TypeError: data.stopPropagation is not a function
          at Object.eval (webpack:///./node_modules/@ckeditor/ckeditor5-clipboard/src/clipboardobserver.js?:73:11)
          at Object.fire (webpack:///./node_modules/@ckeditor/ckeditor5-utils/src/emittermixin.js?:208:30)
          at fireListenerFor (webpack:///./node_modules/@ckeditor/ckeditor5-engine/src/view/observer/bubblingemittermixin.js?:168:10)
          at Document.fire (webpack:///./node_modules/@ckeditor/ckeditor5-engine/src/view/observer/bubblingemittermixin.js?:98:4)
          at pasteHtml (webpack:///./tests/automath.js?:183:32)
          at Context.eval (webpack:///./tests/automath.js?:146:4)

      ✖ inserts math in-place (non-collapsed selection)
        Chrome 91.0.4472.114 (Linux x86_64)
      TypeError: data.stopPropagation is not a function
          at Object.eval (webpack:///./node_modules/@ckeditor/ckeditor5-clipboard/src/clipboardobserver.js?:73:11)
          at Object.fire (webpack:///./node_modules/@ckeditor/ckeditor5-utils/src/emittermixin.js?:208:30)
          at fireListenerFor (webpack:///./node_modules/@ckeditor/ckeditor5-engine/src/view/observer/bubblingemittermixin.js?:168:10)
          at Document.fire (webpack:///./node_modules/@ckeditor/ckeditor5-engine/src/view/observer/bubblingemittermixin.js?:98:4)
          at pasteHtml (webpack:///./tests/automath.js?:183:32)
          at Context.eval (webpack:///./tests/automath.js?:159:4)

      ✖ does nothing if pasted two equation as text
        Chrome 91.0.4472.114 (Linux x86_64)
      TypeError: data.stopPropagation is not a function
          at Object.eval (webpack:///./node_modules/@ckeditor/ckeditor5-clipboard/src/clipboardobserver.js?:73:11)
          at Object.fire (webpack:///./node_modules/@ckeditor/ckeditor5-utils/src/emittermixin.js?:208:30)
          at fireListenerFor (webpack:///./node_modules/@ckeditor/ckeditor5-engine/src/view/observer/bubblingemittermixin.js?:168:10)
          at Document.fire (webpack:///./node_modules/@ckeditor/ckeditor5-engine/src/view/observer/bubblingemittermixin.js?:98:4)
          at pasteHtml (webpack:///./tests/automath.js?:183:32)
          at Context.eval (webpack:///./tests/automath.js?:172:4)

  MathUI
    _showUI()
      ✖ should add #mainFormView to the balloon and attach the balloon to the selection when text fragment is selected
        Chrome 91.0.4472.114 (Linux x86_64)
      AssertError: expected add to be called with exact arguments 
      { view: 
         { element: 
            { '0': [Object],
              '1': [Object],
              '2': [Object],
              '3': [Object],
              'data-ck-expando': 'ee9360ab9725f355d42423bc5837cf0d9' },
           isRendered: true,
           locale: 
            { uiLanguage: 'en',
              contentLanguage: 'en',
              uiLanguageDirection: 'ltr',
              contentLanguageDirection: 'ltr',
              t: [Function] },
           t: [Function],
           _viewCollections: 
            { _items: [Object],
              _itemMap: {},
              _idProperty: 'id',
              _bindToExternalToInternalMap: {},
              _bindToInternalToExternalMap: {},
              _skippedIndexesFromExternal: [] },
           _unboundChildren: 
            { _items: [Object],
              _itemMap: {},
              _idProperty: 'viewUid',
              _bindToExternalToInternalMap: {},
              _bindToInternalToExternalMap: {},
              _skippedIndexesFromExternal: [],
              _parentElement: null,
              id: 'e9489d87771aa50da3fa601b2f550ca12' },
           render: [Function],
           focusTracker: 
            { isFocused: [Getter/Setter],
              focusedElement: [Getter/Setter],
              _elements: {},
              _nextEventLoopTimeout: null },
           keystrokes: { _listener: {} },
           _focusables: 
            { _items: [Object],
              _itemMap: {},
              _idProperty: 'viewUid',
              _bindToExternalToInternalMap: {},
              _bindToInternalToExternalMap: {},
              _skippedIndexesFromExternal: [],
              _parentElement: null },
           _focusCycler: 
            { focusables: [Object],
              focusTracker: [Object],
              keystrokeHandler: [Object],
              actions: [Object] },
           saveButtonView: 
            { element: [Object],
              isRendered: true,
              locale: [Object],
              t: [Function],
              _viewCollections: [Object],
              _unboundChildren: [Object],
              render: [Function],
              _bindTemplate: [Object],
              class: [Getter/Setter],
              labelStyle: [Getter/Setter],
              icon: [Getter/Setter],
              isEnabled: [Getter/Setter],
              isOn: [Getter/Setter],
              isVisible: [Getter/Setter],
              isToggleable: [Getter/Setter],
              keystroke: [Getter/Setter],
              label: [Getter/Setter],
              tabindex: [Getter/Setter],
              tooltip: [Getter/Setter],
              tooltipPosition: [Getter/Setter],
              type: [Getter/Setter],
              withText: [Getter/Setter],
              withKeystroke: [Getter/Setter],
              children: [Object],
              tooltipView: [Object],
              labelView: [Object],
              iconView: [Object],
              keystrokeView: [Object],
              _tooltipString: [Getter/Setter],
              template: [Object],
              viewUid: 'ebe65cdc71a6f20e858cc8a039fa477a4' },
           mathInputView: 
            { element: [Object],
              isRendered: true,
              locale: [Object],
              t: [Function],
              _viewCollections: [Object],
              _unboundChildren: [Object],
              render: [Function],
              label: [Getter/Setter],
              value: [Getter/Setter],
              isReadOnly: [Getter/Setter],
              errorText: [Getter/Setter],
              infoText: [Getter/Setter],
              labelView: [Object],
              inputView: [Object],
              _bindTemplate: [Object],
              statusView: [Object],
              _statusText: [Getter/Setter],
              template: [Object],
              viewUid: 'e6ea66c58a52d9afc42a8cf8501aed779' },
           displayButtonView: 
            { element: [Object],
              isRendered: true,
              locale: [Object],
              t: [Function],
              _viewCollections: [Object],
              _unboundChildren: [Object],
              render: [Function],
              _bindTemplate: [Object],
              class: [Getter/Setter],
              labelStyle: [Getter/Setter],
              icon: [Getter/Setter],
              isEnabled: [Getter/Setter],
              isOn: [Getter/Setter],
              isVisible: [Getter/Setter],
              isToggleable: [Getter/Setter],
              keystroke: [Getter/Setter],
              label: [Getter/Setter],
              tabindex: [Getter/Setter],
              tooltip: [Getter/Setter],
              tooltipPosition: [Getter/Setter],
              type: [Getter/Setter],
              withText: [Getter/Setter],
              withKeystroke: [Getter/Setter],
              children: [Object],
              tooltipView: [Object],
              labelView: [Object],
              iconView: [Object],
              keystrokeView: [Object],
              _tooltipString: [Getter/Setter],
              template: [Object],
              toggleSwitchView: [Object],
              viewUid: 'ea636e5ca09498a3dc196cf976351ae1b' },
           cancelButtonView: 
            { element: [Object],
              isRendered: true,
              locale: [Object],
              t: [Function],
              _viewCollections: [Object],
              _unboundChildren: [Object],
              render: [Function],
              _bindTemplate: [Object],
              class: [Getter/Setter],
              labelStyle: [Getter/Setter],
              icon: [Getter/Setter],
              isEnabled: [Getter/Setter],
              isOn: [Getter/Setter],
              isVisible: [Getter/Setter],
              isToggleable: [Getter/Setter],
              keystroke: [Getter/Setter],
              label: [Getter/Setter],
              tabindex: [Getter/Setter],
              tooltip: [Getter/Setter],
              tooltipPosition: [Getter/Setter],
              type: [Getter/Setter],
              withText: [Getter/Setter],
              withKeystroke: [Getter/Setter],
              children: [Object],
              tooltipView: [Object],
              labelView: [Object],
              iconView: [Object],
              keystrokeView: [Object],
              _tooltipString: [Getter/Setter],
              template: [Object],
              _delegations: {},
              viewUid: 'e8668a8e432939ad95bdd82902886335d' },
           previewEnabled: true,
           previewLabel: 
            { element: {},
              isRendered: true,
              locale: [Object],
              t: [Function],
              _viewCollections: [Object],
              _unboundChildren: [Object],
              render: [Function],
              text: [Getter/Setter],
              for: [Getter/Setter],
              id: 'ck-editor__label_eb400089880f6ef1d19e73f093cc3d88a',
              _bindTemplate: [Object],
              template: [Object],
              viewUid: 'eed27fd7a6dd1a9d7c26c32cc3bf21f06' },
           mathView: 
            { element: {},
              isRendered: true,
              locale: [Object],
              t: [Function],
              _viewCollections: [Object],
              _unboundChildren: [Object],
              render: [Function],
              engine: [Function: engine],
              lazyLoad: undefined,
              previewUid: 'math-preview-e5b5d369496dc2509c2f820fcd260559c',
              previewClassName: [],
              value: [Getter/Setter],
              display: [Getter/Setter],
              template: [Object],
              viewUid: 'eb1b08f927f8e0fab07971dba67a7faa2' },
           template: 
            { tag: 'form',
              attributes: [Object],
              children: [Object],
              _isRendered: true,
              _revertData: null },
           viewUid: 'eb2019b91e1209fc701d787d63b98ca0c' },
        position: 
         { target: {},
           positions: 
            [ [Function: southArrowNorth],
              [Function: southArrowNorthWest],
              [Function: southArrowNorthEast] ] } }  position: { target: {} } }
          at Object.fail (node_modules/sinon/pkg/sinon.js:158:25)
          at failAssertion (node_modules/sinon/pkg/sinon.js:115:20)
          at Object.assert.<computed> [as calledWithExactly] (node_modules/sinon/pkg/sinon.js:141:17)
          at Context.eval (webpack:///./tests/mathui.js?:147:17)

      ✖ should add #mainFormView to the balloon and attach the balloon to the selection when selection is collapsed
        Chrome 91.0.4472.114 (Linux x86_64)
      AssertError: expected add to be called with exact arguments 
      { view: 
         { element: 
            { '0': [Object],
              '1': [Object],
              '2': [Object],
              '3': [Object],
              'data-ck-expando': 'e6260be2bd1cccf47ade5d5ba765c47c6' },
           isRendered: true,
           locale: 
            { uiLanguage: 'en',
              contentLanguage: 'en',
              uiLanguageDirection: 'ltr',
              contentLanguageDirection: 'ltr',
              t: [Function] },
           t: [Function],
           _viewCollections: 
            { _items: [Object],
              _itemMap: {},
              _idProperty: 'id',
              _bindToExternalToInternalMap: {},
              _bindToInternalToExternalMap: {},
              _skippedIndexesFromExternal: [] },
           _unboundChildren: 
            { _items: [Object],
              _itemMap: {},
              _idProperty: 'viewUid',
              _bindToExternalToInternalMap: {},
              _bindToInternalToExternalMap: {},
              _skippedIndexesFromExternal: [],
              _parentElement: null,
              id: 'e6d14a331c12738abcc079f7cc85dd033' },
           render: [Function],
           focusTracker: 
            { isFocused: [Getter/Setter],
              focusedElement: [Getter/Setter],
              _elements: {},
              _nextEventLoopTimeout: null },
           keystrokes: { _listener: {} },
           _focusables: 
            { _items: [Object],
              _itemMap: {},
              _idProperty: 'viewUid',
              _bindToExternalToInternalMap: {},
              _bindToInternalToExternalMap: {},
              _skippedIndexesFromExternal: [],
              _parentElement: null },
           _focusCycler: 
            { focusables: [Object],
              focusTracker: [Object],
              keystrokeHandler: [Object],
              actions: [Object] },
           saveButtonView: 
            { element: [Object],
              isRendered: true,
              locale: [Object],
              t: [Function],
              _viewCollections: [Object],
              _unboundChildren: [Object],
              render: [Function],
              _bindTemplate: [Object],
              class: [Getter/Setter],
              labelStyle: [Getter/Setter],
              icon: [Getter/Setter],
              isEnabled: [Getter/Setter],
              isOn: [Getter/Setter],
              isVisible: [Getter/Setter],
              isToggleable: [Getter/Setter],
              keystroke: [Getter/Setter],
              label: [Getter/Setter],
              tabindex: [Getter/Setter],
              tooltip: [Getter/Setter],
              tooltipPosition: [Getter/Setter],
              type: [Getter/Setter],
              withText: [Getter/Setter],
              withKeystroke: [Getter/Setter],
              children: [Object],
              tooltipView: [Object],
              labelView: [Object],
              iconView: [Object],
              keystrokeView: [Object],
              _tooltipString: [Getter/Setter],
              template: [Object],
              viewUid: 'e296181ad54db4b0a7981391bfbcb83ec' },
           mathInputView: 
            { element: [Object],
              isRendered: true,
              locale: [Object],
              t: [Function],
              _viewCollections: [Object],
              _unboundChildren: [Object],
              render: [Function],
              label: [Getter/Setter],
              value: [Getter/Setter],
              isReadOnly: [Getter/Setter],
              errorText: [Getter/Setter],
              infoText: [Getter/Setter],
              labelView: [Object],
              inputView: [Object],
              _bindTemplate: [Object],
              statusView: [Object],
              _statusText: [Getter/Setter],
              template: [Object],
              viewUid: 'efc6abb8d21dc1a5e906c989bda2ab5a8' },
           displayButtonView: 
            { element: [Object],
              isRendered: true,
              locale: [Object],
              t: [Function],
              _viewCollections: [Object],
              _unboundChildren: [Object],
              render: [Function],
              _bindTemplate: [Object],
              class: [Getter/Setter],
              labelStyle: [Getter/Setter],
              icon: [Getter/Setter],
              isEnabled: [Getter/Setter],
              isOn: [Getter/Setter],
              isVisible: [Getter/Setter],
              isToggleable: [Getter/Setter],
              keystroke: [Getter/Setter],
              label: [Getter/Setter],
              tabindex: [Getter/Setter],
              tooltip: [Getter/Setter],
              tooltipPosition: [Getter/Setter],
              type: [Getter/Setter],
              withText: [Getter/Setter],
              withKeystroke: [Getter/Setter],
              children: [Object],
              tooltipView: [Object],
              labelView: [Object],
              iconView: [Object],
              keystrokeView: [Object],
              _tooltipString: [Getter/Setter],
              template: [Object],
              toggleSwitchView: [Object],
              viewUid: 'e0ccc653538b6c281a46ad1e6b25d43be' },
           cancelButtonView: 
            { element: [Object],
              isRendered: true,
              locale: [Object],
              t: [Function],
              _viewCollections: [Object],
              _unboundChildren: [Object],
              render: [Function],
              _bindTemplate: [Object],
              class: [Getter/Setter],
              labelStyle: [Getter/Setter],
              icon: [Getter/Setter],
              isEnabled: [Getter/Setter],
              isOn: [Getter/Setter],
              isVisible: [Getter/Setter],
              isToggleable: [Getter/Setter],
              keystroke: [Getter/Setter],
              label: [Getter/Setter],
              tabindex: [Getter/Setter],
              tooltip: [Getter/Setter],
              tooltipPosition: [Getter/Setter],
              type: [Getter/Setter],
              withText: [Getter/Setter],
              withKeystroke: [Getter/Setter],
              children: [Object],
              tooltipView: [Object],
              labelView: [Object],
              iconView: [Object],
              keystrokeView: [Object],
              _tooltipString: [Getter/Setter],
              template: [Object],
              _delegations: {},
              viewUid: 'e317cf56494a9f27a0076131ec084c704' },
           previewEnabled: true,
           previewLabel: 
            { element: {},
              isRendered: true,
              locale: [Object],
              t: [Function],
              _viewCollections: [Object],
              _unboundChildren: [Object],
              render: [Function],
              text: [Getter/Setter],
              for: [Getter/Setter],
              id: 'ck-editor__label_e46aca683ea9b19c49b460f0acb29992b',
              _bindTemplate: [Object],
              template: [Object],
              viewUid: 'e8f140a1fd9c1d64d69794ce6526ef782' },
           mathView: 
            { element: {},
              isRendered: true,
              locale: [Object],
              t: [Function],
              _viewCollections: [Object],
              _unboundChildren: [Object],
              render: [Function],
              engine: [Function: engine],
              lazyLoad: undefined,
              previewUid: 'math-preview-e5430599bd2e9797dfb40e49b9aa5e62b',
              previewClassName: [],
              value: [Getter/Setter],
              display: [Getter/Setter],
              template: [Object],
              viewUid: 'e6d1f50d285754a92e962963456cfbb0d' },
           template: 
            { tag: 'form',
              attributes: [Object],
              children: [Object],
              _isRendered: true,
              _revertData: null },
           viewUid: 'e2d8130911b2f8def4e49d7d9e774c545' },
        position: 
         { target: {},
           positions: 
            [ [Function: southArrowNorth],
              [Function: southArrowNorthWest],
              [Function: southArrowNorthEast] ] } }  position: { target: {} } }
          at Object.fail (node_modules/sinon/pkg/sinon.js:158:25)
          at failAssertion (node_modules/sinon/pkg/sinon.js:115:20)
          at Object.assert.<computed> [as calledWithExactly] (node_modules/sinon/pkg/sinon.js:141:17)
          at Context.eval (webpack:///./tests/mathui.js?:162:17)

      ✖ should disable #mainFormView element when math command is disabled
        Chrome 91.0.4472.114 (Linux x86_64)
      AssertionError: expected false to be true

      + expected - actual

      -false
      +true
      
    at Context.eval (webpack:///./tests/mathui.js?:178:53)


Error: Karma finished with "1" code.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@Jules-Bertholet
Copy link
Contributor Author

No, tests don't pass for me. I only intended to get them to run, never look at why they were failing

@@ -0,0 +1,2 @@
{
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jules-Bertholet Is this needed? We could also at .vscode/, .vim/ to .gitignore

@tony
Copy link
Collaborator

tony commented Jun 21, 2021

No, tests don't pass for me. I only intended to get them to run, never look at why they were failing

Roger that! That's still helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to test?
2 participants