Skip to content

Commit

Permalink
AG-37643 fix tests
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit 892b88b
Author: jellizaveta <[email protected]>
Date:   Thu Dec 19 10:12:36 2024 +0300

    fix changelog

commit bebd2de
Author: jellizaveta <[email protected]>
Date:   Wed Dec 18 22:49:16 2024 +0300

    update tests

commit c8a9b0c
Author: jellizaveta <[email protected]>
Date:   Wed Dec 18 20:47:21 2024 +0300

    AG-37643 fix tests
  • Loading branch information
jellizaveta committed Dec 19, 2024
1 parent 45c8052 commit 18e0b99
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 18 deletions.
2 changes: 1 addition & 1 deletion packages/agtree/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The format is based on [Keep a Changelog][keepachangelog], and this project adhe
[keepachangelog]: https://keepachangelog.com/en/1.0.0/
[semver]: https://semver.org/spec/v2.0.0.html

## [2.3.0] - 2024-12-18
## [2.3.0] - 2024-12-19

### Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,21 +177,6 @@ describe('Test cosmetic engine', () => {
expect(result.CSS.genericExtCss[0].getContent()).toContain(extCssCssRuleText);
});

it('checks css styles in cosmetic rules', () => {
const ruleText = 'example.org##body { background: red!important; }';
const rulesLocal = [
ruleText,
];
const processedLocal = FilterListPreprocessor.preprocess(rulesLocal.join('\n'));
const cosmeticEngine = new CosmeticEngine(createTestRuleStorage(1, processedLocal));

const result = cosmeticEngine.match(createRequest('https://example.org'), CosmeticOption.CosmeticOptionAll);
expect(result.elementHiding.generic).toHaveLength(0);
expect(result.elementHiding.specific).toHaveLength(0);
expect(result.CSS.generic).toHaveLength(0);
expect(result.CSS.specific).toHaveLength(0);
});

it('finds wildcard hiding rules', () => {
const rulesLocal = [
`example.*##${specificRuleContent}`,
Expand Down
2 changes: 0 additions & 2 deletions packages/tsurlfilter/test/resources/adguard_base_filter.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20005,8 +20005,6 @@ xda-developers.com#$#body.twig-body { margin-top: 0!important; }
ifbbpro.com#$#body.td-background-link { background-image: none!important; cursor: auto !important; }
! https://github.com/AdguardTeam/AdguardFilters/issues/46955
moddingway.com#$#.ezoic-ad { position: absolute!important; left: -3000px!important; }
! https://github.com/AdguardTeam/AdguardFilters/issues/46429
2conv.com,flvto.biz,flv2mp3.by#?#div[class*="ads"] {visibility: hidden !important; display: block !important; height: 0 !important; }
! https://github.com/AdguardTeam/AdguardFilters/issues/46545
rule34.xxx#$#body { background: #aae5a3!important; }
! https://github.com/AdguardTeam/AdguardFilters/issues/46183
Expand Down

0 comments on commit 18e0b99

Please sign in to comment.