Skip to content

Commit 27a34c7

Browse files
committed
Add failing test case for conatiner width change
1 parent 0249976 commit 27a34c7

File tree

3 files changed

+232
-52
lines changed

3 files changed

+232
-52
lines changed

test-app/app/controllers/index.js

+22
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ export default class ModifierController extends Controller {
1515
{ fruit: 'lemon', day: 'Sunday' },
1616
];
1717

18+
@tracked mutableRecords = ['Zero', 'One', 'Two', 'Three', 'Four'];
19+
1820
@action handleDragChange(reordered) {
1921
this.records = reordered;
2022
}
@@ -76,4 +78,24 @@ export default class ModifierController extends Controller {
7678
set(this, 'model.itemsGrid2', newOrder);
7779
set(this, 'model.dragged', draggedModel);
7880
}
81+
82+
@action
83+
updateMutable(newOrder, draggedMode) {
84+
this.mutableRecords = newOrder;
85+
}
86+
87+
@action
88+
removeItemHorizontal(item) {
89+
this.mutableRecords = this.mutableRecords.filter(
90+
(record) => record !== item,
91+
);
92+
}
93+
94+
@action
95+
addItemToHorizontal() {
96+
this.mutableRecords = [
97+
...this.mutableRecords,
98+
`Item ${this.mutableRecords.length + 1}`,
99+
];
100+
}
79101
}

test-app/app/styles/app.css

+36
Original file line numberDiff line numberDiff line change
@@ -295,3 +295,39 @@
295295
.word-break {
296296
word-wrap: break-word;
297297
}
298+
299+
.flex {
300+
display: flex;
301+
}
302+
303+
.flex-1 {
304+
flex: 1;
305+
}
306+
307+
.inline-flex {
308+
display: inline-flex;
309+
}
310+
311+
.align-items-center {
312+
align-items: center;
313+
}
314+
315+
.space-between {
316+
justify-content: space-between;
317+
}
318+
319+
.flex-column {
320+
flex-direction: column;
321+
}
322+
323+
.flex-row {
324+
flex-direction: row;
325+
}
326+
327+
.full-width {
328+
width: 100%;
329+
}
330+
331+
.mr-5 {
332+
margin-right: 5px;
333+
}

0 commit comments

Comments
 (0)