Skip to content

Commit

Permalink
fix bug the download test cases button on editorial page
Browse files Browse the repository at this point in the history
  • Loading branch information
conlacda committed Dec 11, 2024
1 parent b33ff38 commit 9f58a99
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
8 changes: 7 additions & 1 deletion browser-extension/chrome-extension/firefox_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/*/*"
]
},
{
Expand All @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion browser-extension/chrome-extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"*://atcoder.jp/contests/*/tasks/*"
],
"exclude_matches": [
"*://atcoder.jp/contests/*/tasks/"
"*://atcoder.jp/contests/*/tasks/",
"*://atcoder.jp/contests/*/tasks/*/*"
]
},
{
Expand Down

0 comments on commit 9f58a99

Please sign in to comment.