Skip to content

Commit 102c0bb

Browse files
committed
Remove @symfony/stimulus-testing
1 parent fb7e6c6 commit 102c0bb

File tree

19 files changed

+340
-3694
lines changed

19 files changed

+340
-3694
lines changed

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@
1717
"@rollup/plugin-commonjs": "^28.0.6",
1818
"@rollup/plugin-node-resolve": "^16.0.1",
1919
"@rollup/plugin-typescript": "^12.1.4",
20-
"@symfony/stimulus-testing": "^2.0.1",
20+
"@testing-library/dom": "^10.4.0",
21+
"@testing-library/jest-dom": "^6.6.3",
22+
"@testing-library/user-event": "^14.6.1",
2123
"@types/node": "^22.6.0",
2224
"@vitest/browser": "^2.1.1",
25+
"jsdom": "^26.1.0",
2326
"lightningcss": "^1.28.2",
2427
"playwright": "^1.47.0",
2528
"rollup": "^4.44.1",

src/Cropperjs/assets/test/controller.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
*/
99

1010
import { Application, Controller } from '@hotwired/stimulus';
11-
import { clearDOM, mountDOM } from '@symfony/stimulus-testing';
1211
import { getByTestId, waitFor } from '@testing-library/dom';
12+
import { clearDOM, mountDOM } from '../../../../test/stimulus-helpers';
1313
import CropperjsController from '../src/controller';
1414

1515
let cropper: Cropper | null = null;
@@ -44,7 +44,7 @@ describe('CropperjsController', () => {
4444
beforeEach(() => {
4545
container = mountDOM(`
4646
<div id="form_photo" class="cropperjs">
47-
<input type="hidden" id="form_photo_options" name="form[photo][options]"
47+
<input type="hidden" id="form_photo_options" name="form[photo][options]"
4848
data-testid="input"
4949
data-controller="check cropperjs"
5050
data-cropperjs-public-url-value="https://symfony.com/logos/symfony_black_02.png"

src/Dropzone/assets/test/controller.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
*/
99

1010
import { Application, Controller } from '@hotwired/stimulus';
11-
import { clearDOM, mountDOM } from '@symfony/stimulus-testing';
1211
import { getByTestId, waitFor } from '@testing-library/dom';
1312
import user from '@testing-library/user-event';
13+
import { clearDOM, mountDOM } from '../../../../test/stimulus-helpers';
1414
import DropzoneController from '../src/controller';
1515

1616
// Controller used to check the actual controller was properly booted
@@ -33,35 +33,35 @@ describe('DropzoneController', () => {
3333

3434
beforeEach(() => {
3535
container = mountDOM(`
36-
<div class="dropzone-container" data-controller="check dropzone" data-testid="container">
36+
<div class="dropzone-container" data-controller="check dropzone" data-testid="container">
3737
<input type="file"
3838
style="display: none"
3939
data-dropzone-target="input"
4040
data-testid="input" />
41-
42-
<div class="dropzone-placeholder"
43-
data-dropzone-target="placeholder"
41+
42+
<div class="dropzone-placeholder"
43+
data-dropzone-target="placeholder"
4444
data-testid="placeholder">
4545
Placeholder
4646
</div>
47-
47+
4848
<div class="dropzone-preview"
4949
data-dropzone-target="preview"
5050
data-testid="preview"
5151
style="display: none">
52-
52+
5353
<button type="button"
5454
class="dropzone-preview-button"
5555
data-dropzone-target="previewClearButton"
5656
data-testid="button"></button>
57-
57+
5858
<div class="dropzone-preview-image"
5959
data-dropzone-target="previewImage"
6060
data-testid="preview-image"
6161
style="display: none"></div>
62-
62+
6363
<div class="dropzone-preview-filename"
64-
data-dropzone-target="previewFilename"
64+
data-dropzone-target="previewFilename"
6565
data-testid="preview-filename"></div>
6666
</div>
6767
</div>

src/LazyImage/assets/test/controller.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
*/
99

1010
import { Application, Controller } from '@hotwired/stimulus';
11-
import { clearDOM, mountDOM } from '@symfony/stimulus-testing';
1211
import { getByTestId, waitFor } from '@testing-library/dom';
12+
import { clearDOM, mountDOM } from '../../../../test/stimulus-helpers';
1313
import LazyImageController from '../src/controller';
1414

1515
// Controller used to check the actual controller was properly booted
@@ -35,7 +35,7 @@ describe('LazyImageController', () => {
3535

3636
beforeEach(() => {
3737
container = mountDOM(`
38-
<img
38+
<img
3939
src="https://symfony.com/logos/symfony_black_02.png"
4040
srcset="https://symfony.com/logos/symfony_black_02.png 1x, https://symfony.com/logos/symfony_black_02.png 2x"
4141
data-testid="img"

src/Map/assets/test/abstract_map_controller.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Application } from '@hotwired/stimulus';
2-
import { clearDOM, mountDOM } from '@symfony/stimulus-testing';
32
import { getByTestId, waitFor } from '@testing-library/dom';
4-
import * as L from 'leaflet';
3+
import { clearDOM, mountDOM } from '../../../../test/stimulus-helpers';
54
import AbstractMapController from '../src/abstract_map_controller.ts';
65

76
class MyMapController extends AbstractMapController {

src/Map/src/Bridge/Google/assets/test/map_controller.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
*/
99

1010
import { Application, Controller } from '@hotwired/stimulus';
11-
import { clearDOM, mountDOM } from '@symfony/stimulus-testing';
1211
import { getByTestId, waitFor } from '@testing-library/dom';
12+
import { clearDOM, mountDOM } from '../../../../test/stimulus-helpers';
1313
import GoogleController from '../src/map_controller';
1414

1515
// Controller used to check the actual controller was properly booted

src/Map/src/Bridge/Leaflet/assets/test/map_controller.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
*/
99

1010
import { Application, Controller } from '@hotwired/stimulus';
11-
import { clearDOM, mountDOM } from '@symfony/stimulus-testing';
1211
import { getByTestId, waitFor } from '@testing-library/dom';
12+
import { clearDOM, mountDOM } from '../../../../test/stimulus-helpers';
1313
import LeafletController from '../src/map_controller';
1414

1515
// Controller used to check the actual controller was properly booted

src/Notify/assets/test/controller.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
*/
99

1010
import { Application, Controller } from '@hotwired/stimulus';
11-
import { clearDOM, mountDOM } from '@symfony/stimulus-testing';
1211
import { getByTestId, waitFor } from '@testing-library/dom';
1312
import { vi } from 'vitest';
13+
import { clearDOM, mountDOM } from '../../../../test/stimulus-helpers';
1414
import NotifyController from '../src/controller';
1515

1616
// Controller used to check the actual controller was properly booted

src/React/assets/test/render_controller.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
*/
99

1010
import { Application, Controller } from '@hotwired/stimulus';
11-
import { clearDOM, mountDOM } from '@symfony/stimulus-testing';
1211
import { getByTestId, waitFor } from '@testing-library/dom';
1312
import React from 'react';
13+
import { clearDOM, mountDOM } from '../../../../test/stimulus-helpers';
1414
import ReactController from '../src/render_controller';
1515

1616
// Controller used to check the actual controller was properly booted

src/Svelte/assets/test/render_controller.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
*/
99

1010
import { Application, Controller } from '@hotwired/stimulus';
11-
import { clearDOM, mountDOM } from '@symfony/stimulus-testing';
1211
import { getByTestId, waitFor } from '@testing-library/dom';
12+
import { clearDOM, mountDOM } from '../../../../test/stimulus-helpers';
1313
import SvelteController from '../src/render_controller';
1414
import MyComponent from './fixtures/MyComponent.svelte';
1515

0 commit comments

Comments
 (0)