Skip to content
代码片段 群组 项目
未验证 提交 26404579 编辑于 作者: Artur Fedorov's avatar Artur Fedorov
浏览文件

This MR removes direct data manipulation

As part of Vue 3 migration
overriding method behavior and
direct data manipulation
should be avoided
上级 6d774664
No related branches found
No related tags found
无相关合并请求
......@@ -275,7 +275,7 @@ describe('EditorComponent', () => {
expect(findAddRuleButton().exists()).toBe(false);
});
it('updates an existing rule', () => {
it('updates an existing rule', async () => {
const newValue = {
type: 'scan_finding',
branches: [],
......@@ -286,9 +286,8 @@ describe('EditorComponent', () => {
};
factory();
findAllRuleSections().at(0).vm.$emit('changed', newValue);
expect(wrapper.vm.policy.rules[0]).toEqual(newValue);
await findAllRuleSections().at(0).vm.$emit('changed', newValue);
expect(findAllRuleSections().at(0).props('initRule')).toEqual(newValue);
expect(findPolicyEditorLayout().props('policy').rules[0].vulnerabilities_allowed).toBe(1);
});
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册