Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(mv3): Redirection Tests (#1236)
* feat(mv3): ✨ Patching countly-sdk-web Signed-off-by: Nishant Arora <[email protected]> * feat(mv3): ✨ Implementing Custom Async Store. Signed-off-by: Nishant Arora <[email protected]> * chore(mv3): 🩹 Hooking everything up together. Signed-off-by: Nishant Arora <[email protected]> * fix(mv3): Countly Patching + [email protected] Signed-off-by: Nishant Arora <[email protected]> * fix(mv3): 🩹 Patching the Patch Signed-off-by: Nishant Arora <[email protected]> * fix: tests Signed-off-by: Nishant Arora <[email protected]> * fix: lint Signed-off-by: Nishant Arora <[email protected]> * fix(mv3): ♻️ Refactoring `supportsBlock` Checks. Signed-off-by: Nishant Arora <[email protected]> * fix(mv3): Regex Bug Signed-off-by: Nishant Arora <[email protected]> * feat: Migrating blocking redirection test to observing redirection test Signed-off-by: Nishant Arora <[email protected]> * fix(mv3): 🔧 Fixing the mocha-setup. Signed-off-by: Nishant Arora <[email protected]> * fix(mv3): ♻️ Moving Setup Files. Signed-off-by: Nishant Arora <[email protected]> * fix(mv3): gateway-redirect tests now fixed. Signed-off-by: Nishant Arora <[email protected]> * fix: 🩹 Patching error messages Signed-off-by: Nishant Arora <[email protected]> * fix(patch): countly-web-sdk * fix(patch): :pin: Pinning countly-web-sdk to 23.2.2 * fix(mv3): 💄 Fixing Lint Signed-off-by: Nishant Arora <[email protected]> * feat: protocol-handler-redirection-tests Signed-off-by: Nishant Arora <[email protected]> * feat: more tests fixed Signed-off-by: Nishant Arora <[email protected]> * fix: More tests Signed-off-by: Nishant Arora <[email protected]> * fix: lint fix Signed-off-by: Nishant Arora <[email protected]> * test: merge mocha-setup files (#1246) * test: merge mocha-setup files * test(helper): add mv3-test-enabled helper * test(setup): remove duplicate setup for mv3/mv2 * test(mv3): merge mv3 tests into mv2 test files (#1247) * test(mv3): merge mv3 tests into mv2 test files * chore(lint): fix lint failures * test(supportsBlock): cleanup test * test: migrating some tests * test(redirect): mv3 tests use same code as mv2 * test(redirect): mv3 test cleanup * test(protohandler): mv3 tests use same code as mv2 * test(helper): make isMv3 flag a boolean * test: fix after merge * test: fix after merge * fix: typerrors for localstorage Signed-off-by: Nishant Arora <[email protected]> * fix: Updating test:functional_MV3 command. Signed-off-by: Nishant Arora <[email protected]> * fix: setup Signed-off-by: Nishant Arora <[email protected]> * fix(test): Fixing tests Signed-off-by: Nishant Arora <[email protected]> * fix(lint): Becuase Ofcourse * feat(test): scaffolding mv3 + mv2 calls in a single check. Signed-off-by: Nishant Arora <[email protected]> * feat(test): unskipping and upgrading dnslink tests to mv3 Signed-off-by: Nishant Arora <[email protected]> * feat(test): Upgrading workaround tests to MV3 Signed-off-by: Nishant Arora <[email protected]> * fix(test): removing all skips with better checks. Signed-off-by: Nishant Arora <[email protected]> * fix(test): ♻️ Refactoring tests and removing redundant calls. Signed-off-by: Nishant Arora <[email protected]> * fix(test): More Dryer Signed-off-by: Nishant Arora <[email protected]> * fix(test): one more Signed-off-by: Nishant Arora <[email protected]> * fix(test): ✏️ Renaming isMv3TestingEnabled -> isManifestV3 Signed-off-by: Nishant Arora <[email protected]> * fix(test): refactor expectNoRedirect Signed-off-by: Nishant Arora <[email protected]> * fix(test): ♻️ Refactoring more. Signed-off-by: Nishant Arora <[email protected]> * fix: replacing checks to undefined Signed-off-by: Nishant Arora <[email protected]> * fix: renaming expectNoRedirect -> ensureNoRedirect Signed-off-by: Nishant Arora <[email protected]> * fix(test): Adding missing JSDoc Signed-off-by: Nishant Arora <[email protected]> * fix(test): 🤷 how did this get removed. Signed-off-by: Nishant Arora <[email protected]> * fix(test): 🗑️ removed. Signed-off-by: Nishant Arora <[email protected]> * fix(test): Suggestion * fix(test): 🩹 Bad Merge Signed-off-by: Nishant Arora <[email protected]> * fix(test): sequential expectNoRedirect * Update add-on/src/lib/redirect-handler/blockOrObserve.ts Co-authored-by: Marcin Rataj <[email protected]> * fix(rules): Better Redirect Rules (#1256) * fix(mv3): 🔧 Modifying the default local redirect behaviour. Signed-off-by: Nishant Arora <[email protected]> * fix(mv3): 🔧 Modifying the default local redirect behaviour. Signed-off-by: Nishant Arora <[email protected]> * fix(mv3): 🐛 Making rules less greedy Signed-off-by: Nishant Arora <[email protected]> * fix(mv3): ✨ Dynamic Rules for subdomain gateways. Signed-off-by: Nishant Arora <[email protected]> * fix(types): Adding ambient types for is-ipfs. Signed-off-by: Nishant Arora <[email protected]> * fix(test): Signed-off-by: Nishant Arora <[email protected]> * fix(test): helper Signed-off-by: Nishant Arora <[email protected]> * feat(mv3): less greedy rules Signed-off-by: Nishant Arora <[email protected]> * feat: Adding simpler regex for redirects from similar namespaces. Signed-off-by: Nishant Arora <[email protected]> * fix(lint): 🚨 Warnings Signed-off-by: Nishant Arora <[email protected]> * feat(mv3): Better Default Rules (#1260) * refactor(mv3): blockOrRequest code Signed-off-by: Nishant Arora <[email protected]> * refactor(mv3): Port Logic for Default Rules is more robust. Signed-off-by: Nishant Arora <[email protected]> * feat(test): Adding tests for default rule logic. Signed-off-by: Nishant Arora <[email protected]> --------- Signed-off-by: Nishant Arora <[email protected]> * Update add-on/src/lib/redirect-handler/blockOrObserve.ts * fix(docs): ✏️ Adding comments Signed-off-by: Nishant Arora <[email protected]> * refactor(regexfilters): Better Structure and Readability (#1261) * refactor(regexFilters): ✨ Adding a base class for regexFilters. Signed-off-by: Nishant Arora <[email protected]> * refactor(regexFilters): ♻️ Moving subdomain filter to a subclass Signed-off-by: Nishant Arora <[email protected]> * refactor(regexFilters): ♻️ Moving namespace filter to a subclass Signed-off-by: Nishant Arora <[email protected]> * refactor(regexFilters): ♻️ Moving common filter to a subclass Signed-off-by: Nishant Arora <[email protected]> * feat(regexFilters): ✨ Hooking Up All together Signed-off-by: Nishant Arora <[email protected]> * fix(lint): ✏️ Lint Signed-off-by: Nishant Arora <[email protected]> * fix(regexFilters): ✏️ Updating message. Signed-off-by: Nishant Arora <[email protected]> * fix(rename): ✏️ CommonPatterRedirectRegexFilter -> CommonPatternRedirectRegexFilter Signed-off-by: Nishant Arora <[email protected]> * fix(regexFilters): ♻️ Refactor to remove call to super Signed-off-by: Nishant Arora <[email protected]> * fix: make _canHandle private Signed-off-by: Nishant Arora <[email protected]> * fix: ⚡ Fix math.min on every loop. Signed-off-by: Nishant Arora <[email protected]> --------- Signed-off-by: Nishant Arora <[email protected]> * fix(mv3): no blanket redirect for subdomains without namespaces. Signed-off-by: Nishant Arora <[email protected]> * fix(lint): unused import Signed-off-by: Nishant Arora <[email protected]> --------- Signed-off-by: Nishant Arora <[email protected]> --------- Signed-off-by: Nishant Arora <[email protected]> Co-authored-by: Russell Dempsey <[email protected]> Co-authored-by: Marcin Rataj <[email protected]>
- Loading branch information