Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
experience_builder
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
experience_builder
Merge requests
!242
#3471154
: Handled delete component with delete button
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
#3471154
: Handled delete component with delete button
issue/experience_builder-3471154:3471154-error-on-backspace
into
0.x
Overview
6
Commits
12
Pipelines
15
Changes
3
Merged
fazilitehreem
requested to merge
issue/experience_builder-3471154:3471154-error-on-backspace
into
0.x
5 months ago
Overview
6
Commits
12
Pipelines
15
Changes
3
Expand
Closes
#3471154
0
0
Merge request reports
Compare
0.x
version 14
978e0aee
5 months ago
version 13
018f5917
5 months ago
version 12
74b559ac
5 months ago
version 11
af3220dc
5 months ago
version 10
773f2619
5 months ago
version 9
e1045b43
5 months ago
version 8
a4674317
5 months ago
version 7
3a8e0b5d
5 months ago
version 6
47e388fe
5 months ago
version 5
7c9f49bd
5 months ago
version 4
a8972815
5 months ago
version 3
1fb3d3fb
5 months ago
version 2
e4f90049
5 months ago
version 1
4897548c
5 months ago
0.x (base)
and
latest version
latest version
2d233567
12 commits,
5 months ago
version 14
978e0aee
12 commits,
5 months ago
version 13
018f5917
11 commits,
5 months ago
version 12
74b559ac
10 commits,
5 months ago
version 11
af3220dc
9 commits,
5 months ago
version 10
773f2619
8 commits,
5 months ago
version 9
e1045b43
7 commits,
5 months ago
version 8
a4674317
6 commits,
5 months ago
version 7
3a8e0b5d
5 commits,
5 months ago
version 6
47e388fe
4 commits,
5 months ago
version 5
7c9f49bd
5 commits,
5 months ago
version 4
a8972815
4 commits,
5 months ago
version 3
1fb3d3fb
3 commits,
5 months ago
version 2
e4f90049
2 commits,
5 months ago
version 1
4897548c
1 commit,
5 months ago
3 files
+
58
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
tests/src/Cypress/cypress/e2e/xb-general.cy.js
+
45
−
0
Options
@@ -521,4 +521,49 @@ describe('General Experience Builder', { testIsolation: false }, () => {
// Assert that only one request was sent
cy
.
get
(
'
@getPreview.all
'
).
should
(
'
have.length
'
,
1
);
});
it
(
'
Can delete component with delete button
'
,
()
=>
{
cy
.
drupalLogin
(
'
xbUser
'
,
'
xbUser
'
);
cy
.
loadURLandWaitForXBLoaded
();
// Check there are three heroes initially.
cy
.
testInIframe
(
'
[data-xb-component-id="experience_builder:my-hero"]
'
,
(
myHeroComponent
)
=>
{
expect
(
myHeroComponent
.
length
).
to
.
equal
(
3
);
},
);
// Select the component and ensure it's focused
cy
.
getIframeBody
()
.
find
(
`[data-xb-component-id="experience_builder:my-hero"]`
)
.
first
()
.
click
();
cy
.
getIframeBody
().
realPress
(
'
{del}
'
);
// Check there are two heroes after deleting
cy
.
testInIframe
(
'
[data-xb-component-id="experience_builder:my-hero"]
'
,
(
myHeroComponent
)
=>
{
expect
(
myHeroComponent
.
length
).
to
.
equal
(
2
);
},
);
cy
.
getIframeBody
()
.
find
(
`[data-xb-component-id="experience_builder:my-hero"]`
)
.
first
()
.
click
();
cy
.
get
(
'
[data-xb-uuid="root"]
'
).
click
();
cy
.
realPress
(
'
{del}
'
);
cy
.
getIframeBody
().
find
(
'
[data-component-id="experience_builder:two_column"] .column-one
'
).
should
(
'
have.length
'
,
1
);
// Deleting from the content menu.
cy
.
get
(
'
[data-xb-uuid="root"]
'
).
findByText
(
'
Two Column
'
).
click
();
cy
.
realPress
(
'
{del}
'
);
cy
.
get
(
'
[data-xb-uuid="root"]
'
).
findByText
(
'
Two Column
'
).
should
(
'
not.exist
'
);
});
});
Loading