Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
gitlab-vscode-extension
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
gitlab-vscode-extension
Commits
dc81c934
Commit
dc81c934
authored
9 months ago
by
Désirée Chevalier
Browse files
Options
Downloads
Patches
Plain Diff
fix(e2e): wait for tab in e2e code suggestions spec
parent
625148f2
No related branches found
No related tags found
2 merge requests
!1795
chore: rebase sast-ide dev branch
,
!1568
fix(e2e): wait for tab in e2e code suggestions spec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/e2e/helpers/generalHelpers.js
+14
-1
14 additions, 1 deletion
test/e2e/helpers/generalHelpers.js
test/e2e/specs/code_suggestions.e2e.js
+7
-1
7 additions, 1 deletion
test/e2e/specs/code_suggestions.e2e.js
with
21 additions
and
2 deletions
test/e2e/helpers/generalHelpers.js
+
14
−
1
View file @
dc81c934
import
{
browser
}
from
'
@wdio/globals
'
;
import
{
v4
as
uuidv4
}
from
'
uuid
'
;
import
{
v4
as
uuidv4
}
from
'
uuid
'
;
/**
/**
...
@@ -13,4 +14,16 @@ const generateRandomString = length => {
...
@@ -13,4 +14,16 @@ const generateRandomString = length => {
return
randomString
.
slice
(
0
,
Number
(
length
));
return
randomString
.
slice
(
0
,
Number
(
length
));
};
};
export
{
generateRandomString
};
const
waitForEditorTab
=
async
(
editorView
,
filename
)
=>
{
await
browser
.
waitUntil
(
async
()
=>
{
const
openTabs
=
await
editorView
.
getOpenEditorTitles
();
return
openTabs
.
includes
(
filename
);
},
{
timeoutMsg
:
`Tab for
${
filename
}
did not appear.`
,
},
);
};
export
{
generateRandomString
,
waitForEditorTab
};
This diff is collapsed.
Click to expand it.
test/e2e/specs/code_suggestions.e2e.js
+
7
−
1
View file @
dc81c934
import
{
browser
}
from
'
@wdio/globals
'
;
import
{
browser
}
from
'
@wdio/globals
'
;
import
{
completeAuth
,
generateRandomString
,
verifyCodeSuggestion
}
from
'
../helpers/index.js
'
;
import
{
completeAuth
,
generateRandomString
,
verifyCodeSuggestion
,
waitForEditorTab
,
}
from
'
../helpers/index.js
'
;
describe
(
'
GitLab Workflow Extension Code Suggestions
'
,
async
()
=>
{
describe
(
'
GitLab Workflow Extension Code Suggestions
'
,
async
()
=>
{
let
workbench
;
let
workbench
;
...
@@ -21,6 +26,7 @@ describe('GitLab Workflow Extension Code Suggestions', async () => {
...
@@ -21,6 +26,7 @@ describe('GitLab Workflow Extension Code Suggestions', async () => {
await
prompt
.
confirm
();
await
prompt
.
confirm
();
const
editorView
=
await
workbench
.
getEditorView
();
const
editorView
=
await
workbench
.
getEditorView
();
await
waitForEditorTab
(
editorView
,
filename
);
tab
=
await
editorView
.
openEditor
(
filename
);
tab
=
await
editorView
.
openEditor
(
filename
);
});
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment