Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
469afbd4
Unverified
Commit
469afbd4
authored
1 year ago
by
Martin Schoeler
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
test(Omnichannel): fix flaky units test (#32050)
parent
475c0417
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/meteor/tests/e2e/omnichannel/omnichannel-units.spec.ts
+7
-14
7 additions, 14 deletions
apps/meteor/tests/e2e/omnichannel/omnichannel-units.spec.ts
with
7 additions
and
14 deletions
apps/meteor/tests/e2e/omnichannel/omnichannel-units.spec.ts
+
7
−
14
View file @
469afbd4
...
...
@@ -106,9 +106,6 @@ test.describe('OC - Manage Units', () => {
test
(
'
OC - Manage Units - Edit unit
'
,
async
({
api
,
page
})
=>
{
const
editedUnitName
=
faker
.
string
.
uuid
();
await
page
.
goto
(
'
/omnichannel
'
);
await
poOmnichannelUnits
.
sidenav
.
linkUnits
.
click
();
const
unit
=
await
test
.
step
(
'
expect to create new unit
'
,
async
()
=>
{
const
{
data
:
unit
}
=
await
createOrUpdateUnit
(
api
,
{
name
:
faker
.
string
.
uuid
(),
...
...
@@ -120,6 +117,9 @@ test.describe('OC - Manage Units', () => {
return
unit
;
});
await
page
.
goto
(
'
/omnichannel
'
);
await
poOmnichannelUnits
.
sidenav
.
linkUnits
.
click
();
await
test
.
step
(
'
expect to edit unit
'
,
async
()
=>
{
await
poOmnichannelUnits
.
search
(
unit
.
name
);
await
poOmnichannelUnits
.
findRowByName
(
unit
.
name
).
click
();
...
...
@@ -129,8 +129,7 @@ test.describe('OC - Manage Units', () => {
});
await
test
.
step
(
'
expect unit to have been edited
'
,
async
()
=>
{
await
poOmnichannelUnits
.
sidenav
.
linkPriorities
.
click
();
await
poOmnichannelUnits
.
sidenav
.
linkUnits
.
click
();
// refresh the page
await
expect
(
poOmnichannelUnits
.
inputSearch
).
toBeVisible
();
await
poOmnichannelUnits
.
search
(
editedUnitName
);
await
expect
(
poOmnichannelUnits
.
findRowByName
(
editedUnitName
)).
toBeVisible
();
});
...
...
@@ -158,15 +157,9 @@ test.describe('OC - Manage Units', () => {
});
await
test
.
step
(
'
expect to have been deleted
'
,
async
()
=>
{
await
poOmnichannelUnits
.
sidenav
.
linkPriorities
.
click
();
await
poOmnichannelUnits
.
sidenav
.
linkUnits
.
click
();
// refresh the page
if
(
await
poOmnichannelUnits
.
inputSearch
.
isVisible
())
{
await
poOmnichannelUnits
.
search
(
editedUnitName
);
await
expect
(
poOmnichannelUnits
.
findRowByName
(
editedUnitName
)).
not
.
toBeVisible
();
}
else
{
await
expect
(
page
.
locator
(
'
h3 >> text="No units yet"
'
)).
toBeVisible
();
}
await
expect
(
poOmnichannelUnits
.
inputSearch
).
toBeVisible
();
await
poOmnichannelUnits
.
inputSearch
.
clear
();
await
expect
(
page
.
locator
(
'
h3 >> text="No units yet"
'
)).
toBeVisible
();
});
});
});
...
...
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