diff --git a/browser-extension/chrome-extension-test/tests/testcase.spec.ts b/browser-extension/chrome-extension-test/tests/testcase.spec.ts index e62a97c..2f3db0d 100644 --- a/browser-extension/chrome-extension-test/tests/testcase.spec.ts +++ b/browser-extension/chrome-extension-test/tests/testcase.spec.ts @@ -130,3 +130,11 @@ test.describe('A dialog should be displayed if the test cases size is too big', await expect(page.locator('#task-statement').locator('div.part')).toHaveCount(58, {timeout: 60 * 1000}); }); }); + +test.describe('Do not show the download test cases button on a page that is not a problem statement page', () => { + test('Do not show in the editorial page', async () => { + await page.goto('https://atcoder.jp/contests/dp/tasks/dp_a/editorial'); + const button = page.locator('text=/^Download all test cases.*/'); + await expect(button).toHaveCount(0); + }); +}); diff --git a/browser-extension/chrome-extension/firefox_manifest.json b/browser-extension/chrome-extension/firefox_manifest.json index 6466eda..c3a5114 100644 --- a/browser-extension/chrome-extension/firefox_manifest.json +++ b/browser-extension/chrome-extension/firefox_manifest.json @@ -37,10 +37,15 @@ }, { "js": [ + "scripts/shared/testcase_mapping.js", "scripts/testcase/main.js" ], "matches": [ - "*://atcoder.jp/contests/*/tasks/a*" + "*://atcoder.jp/contests/*/tasks/*" + ], + "exclude_matches": [ + "*://atcoder.jp/contests/*/tasks/", + "*://atcoder.jp/contests/*/tasks/*/*" ] }, { @@ -56,6 +61,7 @@ }, { "js": [ + "scripts/shared/testcase_mapping.js", "scripts/submission-details/problem-info.js", "scripts/submission-details/testcase-downloader.js", "scripts/submission-details/dom.js", diff --git a/browser-extension/chrome-extension/manifest.json b/browser-extension/chrome-extension/manifest.json index c08f206..df35d18 100644 --- a/browser-extension/chrome-extension/manifest.json +++ b/browser-extension/chrome-extension/manifest.json @@ -48,7 +48,8 @@ "*://atcoder.jp/contests/*/tasks/*" ], "exclude_matches": [ - "*://atcoder.jp/contests/*/tasks/" + "*://atcoder.jp/contests/*/tasks/", + "*://atcoder.jp/contests/*/tasks/*/*" ] }, {