-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OWASP ZAP] レイアウトの削除 #5311
[OWASP ZAP] レイアウトの削除 #5311
Conversation
Codecov Report
@@ Coverage Diff @@
## 4.1 #5311 +/- ##
=========================================
Coverage 68.42% 68.43%
Complexity 6159 6159
=========================================
Files 463 463
Lines 25280 25280
=========================================
+ Hits 17298 17300 +2
+ Misses 7982 7980 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
1d1f5c8
to
c3890c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
いくつかコメント入れましたのでご確認お願いします
await page.fill('#admin_layout_name', layoutNmae) | ||
await Promise.all([ | ||
page.waitForNavigation(), | ||
page.click('.c-conversionArea .btn-ec-conversion') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
以下の方が視認性が良いと思います
page.click('.c-conversionArea .btn-ec-conversion') | |
page.click('.c-conversionArea >> text=登録') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ありがとうございます、 >>
の記法知りませんでした!
@@ -0,0 +1,72 @@ | |||
import { test, expect, chromium, Page } from '@playwright/test'; | |||
import { intervalRepeater } from '../../utils/Progress'; | |||
import { ZapClient, Mode, ContextType, Risk, HttpMessage } from '../../utils/ZapClient'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleteButton
の型をインポートします
import { ZapClient, Mode, ContextType, Risk, HttpMessage } from '../../utils/ZapClient'; | |
import { ZapClient, Mode, ContextType, Risk, HttpMessage, Locator } from '../../utils/ZapClient'; |
|
||
test.describe.serial('レイアウト管理>削除のテスト', () => { | ||
let page: Page; | ||
let deleteButton = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
型指定した方がよさそうです
let deleteButton = null | |
let deleteButton: Locator; |
let message: HttpMessage; | ||
|
||
test('HttpMessage を取得します', async () => { | ||
const messages = await zapClient.getMessages(url, await zapClient.getNumberOfMessages(url), 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await zapClient.getLastMessage(url)
で良さそうです
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こちら、最後に一覧ベージにGETアクセスしていたので getLastMessage()
では取得できないようで、いったんこのままにしています
@nanasess コメントありがとうございます、ご指摘反映しました |
@matsuoshi |
概要(Overview・Refs Issue)
Owasp ZAP 自動化: 管理画面 コンテンツ管理 → レイアウト管理 → レイアウト削除
についてのテストを追加
方針(Policy)
実装に関する補足(Appendix)
削除が実際に行われないようにするため、パッチを作成しています
テスト(Test)
相談(Discussion)
まず削除用レイアウトの作成と、削除用URL(作成したレイアウトIDを含むもの)の確定の必要があったため、
beforeAll() 内にてレイアウトの作成を行っています。このあたり良いやり方があればご指摘ください。
マイナーバージョン互換性保持のための制限事項チェックリスト
レビュワー確認項目