Skip to content

Commit 6238bca

Browse files
committed
test(policy): cover decoupled create scope from rule filter
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 337cf2d commit 6238bca

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/tests/views/Settings/SettingsPolicyWorkbench.spec.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,16 @@ describe('RealPolicyWorkbench.vue', () => {
6161
})
6262
})
6363

64-
it('requires selecting a specific scope before allowing create rule', async () => {
64+
it('shows a dedicated create scope selector independent from the filter', async () => {
6565
const wrapper = mountWorkbench()
6666

6767
const openPolicyButton = wrapper.findAll('button').find((button) => button.text().includes('Open policy'))
6868
expect(openPolicyButton).toBeTruthy()
6969
await openPolicyButton?.trigger('click')
7070

71-
expect(wrapper.text()).toContain('Select Instance, Group, or User in the scope filter before creating a rule')
72-
expect(wrapper.text()).toContain('Select the scope filter to choose where the next rule will be created')
71+
expect(wrapper.text()).toContain('Create in')
72+
expect(wrapper.text()).toContain('Create rule')
73+
expect(wrapper.text()).not.toContain('Select Instance, Group, or User in the scope filter before creating a rule')
7374
})
7475

7576
it('shows callout when there is no persisted global default rule', async () => {

0 commit comments

Comments
 (0)