Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
1d1d76a1
Unverified
Commit
1d1d76a1
authored
2 years ago
by
Nemanja Glumac
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Repro #23689: Sandboxed group managers can't see other users in the People tab #23689 (#23710)
parent
94f78eb6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/test/metabase/scenarios/admin/people/reproductions/23689-sandboxed-group-manager.cy.spec.js
+77
-0
77 additions, 0 deletions
...le/reproductions/23689-sandboxed-group-manager.cy.spec.js
with
77 additions
and
0 deletions
frontend/test/metabase/scenarios/admin/people/reproductions/23689-sandboxed-group-manager.cy.spec.js
0 → 100644
+
77
−
0
View file @
1d1d76a1
import
{
restore
,
describeEE
}
from
"
__support__/e2e/helpers
"
;
import
{
USERS
,
USER_GROUPS
}
from
"
__support__/e2e/cypress_data
"
;
import
{
SAMPLE_DATABASE
}
from
"
__support__/e2e/cypress_sample_database
"
;
const
{
COLLECTION_GROUP
}
=
USER_GROUPS
;
const
{
sandboxed
,
normal
,
nodata
,
nocollection
}
=
USERS
;
const
{
ORDERS
,
ORDERS_ID
}
=
SAMPLE_DATABASE
;
const
totalUsers
=
Object
.
keys
(
USERS
).
length
;
describeEE
(
"
issue 23689
"
,
()
=>
{
beforeEach
(()
=>
{
// TODO: remove the next line when this issue gets fixed
cy
.
skipOn
(
true
);
cy
.
intercept
(
"
GET
"
,
"
/api/permissions/membership
"
).
as
(
"
membership
"
);
restore
();
cy
.
signInAsAdmin
();
visitGroupPermissionsPage
(
COLLECTION_GROUP
);
cy
.
findByText
(
"
3 members
"
);
findUserByFullName
(
normal
);
findUserByFullName
(
nodata
);
// Make sandboxed user a group manager
findUserByFullName
(
sandboxed
)
.
closest
(
"
tr
"
)
.
findByTestId
(
"
user-type-toggle
"
)
.
click
({
force
:
true
});
// Sanity check instead of waiting for the PUT request
cy
.
findByText
(
"
Manager
"
);
cy
.
sandboxTable
({
table_id
:
ORDERS_ID
,
attribute_remappings
:
{
attr_uid
:
[
"
dimension
"
,
[
"
field
"
,
ORDERS
.
USER_ID
,
null
]],
},
});
cy
.
signOut
();
cy
.
signInAsSandboxedUser
();
});
it
(
"
sandboxed group manager should see all other members (metabase#23689)
"
,
()
=>
{
visitGroupPermissionsPage
(
COLLECTION_GROUP
);
cy
.
findByText
(
"
3 members
"
);
findUserByFullName
(
sandboxed
);
findUserByFullName
(
normal
);
findUserByFullName
(
nodata
);
cy
.
visit
(
"
/admin/people
"
);
cy
.
wait
(
"
@membership
"
);
cy
.
findByText
(
`
${
totalUsers
}
people found`
);
findUserByFullName
(
sandboxed
);
findUserByFullName
(
normal
);
findUserByFullName
(
nodata
);
findUserByFullName
(
nocollection
);
});
});
function
findUserByFullName
(
user
)
{
const
{
first_name
,
last_name
}
=
user
;
return
cy
.
findByText
(
`
${
first_name
}
${
last_name
}
`
);
}
function
visitGroupPermissionsPage
(
groupId
)
{
cy
.
visit
(
`/admin/people/groups/
${
groupId
}
`
);
cy
.
wait
(
"
@membership
"
);
}
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