Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3c0eef90
Commit
3c0eef90
authored
Jun 03, 2020
by
Himanshu Kapoor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix flaky spec in repo_editor_spec.js
parent
b7fc4b31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
spec/frontend/ide/components/repo_editor_spec.js
spec/frontend/ide/components/repo_editor_spec.js
+12
-1
No files found.
spec/frontend/ide/components/repo_editor_spec.js
View file @
3c0eef90
...
...
@@ -525,6 +525,14 @@ describe('RepoEditor', () => {
);
};
const
watchState
=
watched
=>
new
Promise
(
resolve
=>
{
const
unwatch
=
vm
.
$store
.
watch
(
watched
,
()
=>
{
unwatch
();
resolve
();
});
});
beforeEach
(()
=>
{
setFileName
(
'
bar.md
'
);
...
...
@@ -562,7 +570,10 @@ describe('RepoEditor', () => {
it
(
"
adds a markdown image tag to the file's contents
"
,
()
=>
{
pasteImage
();
return
waitForPromises
().
then
(()
=>
{
// Pasting an image does a lot of things like using the FileReader API,
// so, waitForPromises isn't very reliable (and causes a flaky spec)
// Read more about state.watch: https://vuex.vuejs.org/api/#watch
return
watchState
(
s
=>
s
.
entries
[
'
foo/bar.md
'
].
content
).
then
(()
=>
{
expect
(
vm
.
file
.
content
).
toBe
(
'
hello world
\n
![foo.png](./foo.png)
'
);
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment