File tree Expand file tree Collapse file tree 5 files changed +456
-2
lines changed
apps/studio/components/interfaces/Auth/Policies Expand file tree Collapse file tree 5 files changed +456
-2
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,12 @@ export const Policies = ({
154154 { tables . map ( ( table ) => {
155155 const isVisible = visibleTableIds . has ( table . id )
156156 return (
157- < section key = { table . id } hidden = { ! isVisible } aria-hidden = { ! isVisible } >
157+ < section
158+ key = { table . id }
159+ hidden = { ! isVisible }
160+ aria-hidden = { ! isVisible }
161+ data-testid = { `policy-table-${ table . name } ` }
162+ >
158163 < PolicyTableRow
159164 table = { table }
160165 isLocked = { schema === 'realtime' ? true : isLocked }
Original file line number Diff line number Diff line change @@ -111,7 +111,12 @@ export const PolicyRow = ({
111111 { ! isLocked && (
112112 < DropdownMenu >
113113 < DropdownMenuTrigger asChild >
114- < Button type = "default" className = "px-1.5" icon = { < MoreVertical /> } />
114+ < Button
115+ type = "default"
116+ className = "px-1.5"
117+ icon = { < MoreVertical /> }
118+ data-testid = { `policy-${ policy . name } -actions-button` }
119+ />
115120 </ DropdownMenuTrigger >
116121 < DropdownMenuContent side = "bottom" align = "end" className = "w-52" >
117122 < DropdownMenuItem className = "gap-x-2" onClick = { ( ) => onSelectEditPolicy ( policy ) } >
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ export const PolicyTableRowHeader = ({
7474 type = "default"
7575 disabled = { ! canToggleRLS }
7676 onClick = { ( ) => onSelectToggleRLS ( table ) }
77+ data-testid = { `${ table . name } -toggle-rls` }
7778 tooltip = { {
7879 content : {
7980 side : 'bottom' ,
@@ -90,6 +91,7 @@ export const PolicyTableRowHeader = ({
9091 type = "default"
9192 disabled = { ! canToggleRLS || ! canCreatePolicies }
9293 onClick = { ( ) => onSelectCreatePolicy ( table ) }
94+ data-testid = { `${ table . name } -create-policy` }
9395 tooltip = { {
9496 content : {
9597 side : 'bottom' ,
You can’t perform that action at this time.
0 commit comments