PromucFlow_constructor/app/client/cypress/e2e/Regression/ClientSide
Shrikant Sharat Kandula 55b6e6d8d8
test: Extract pageId with regex to cover more cases (#34521)
There's a few places in Cypress tests that are trying to extract the
page ID using `.split`, especially with just the path information,
instead of the whole URL. So this PR changes the extraction
implementation to use a regex, to support all three cases we need:

1. Full absolute application+page URL.
2. Just the path of an application+page URL.
3. Just the path of an application with a custom slug.
4. Full absolute application with a custom slug. (Supported, but we
don't need this today).

We've also fixed the URL parsing for the (very) old application URLs
that didn't use slugs in the URL at all. This was making
`FocusEntity.test.ts` fail.

Fixed that test as well as improved it's error reporting.

Before this PR:

![shot-2024-06-27-05-02-16](https://github.com/appsmithorg/appsmith/assets/120119/f3363376-a74d-4f3e-8196-5e72a9e758de)


After this PR:

![shot-2024-06-27-05-03-15](https://github.com/appsmithorg/appsmith/assets/120119/8dc1be04-c60f-4251-acf0-e4fd962f4f00)

No conflicts to EE.

/test all

<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9713573983>
> Commit: 49edbce5ae85ee7fe9f4d2df05e2933347ddb3f4
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9713573983&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: ``

<!-- end of auto-generated comment: Cypress test results  -->












<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Improved URL handling by centralizing page ID extraction logic across
various tests and components.
- Updated deprecated path constants to include ID extraction patterns
for better consistency.
- Enhanced code readability and maintainability by moving page ID
extraction to a helper method.

- **Tests**
- Modified test cases to dynamically set `applicationId` and `pageId`
instead of hardcoding values, ensuring more flexible and maintainable
test scenarios.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-07-02 06:31:59 +05:30
..
ActionExecution feat: added modal name, lint warning for string, action selector modal (#32893) 2024-05-02 17:48:53 +05:30
AdminSettings chore: Make edit launch buttons as links & add upgrade ramps for session timeout setting (#31862) 2024-03-21 15:37:13 +05:30
Anvil chore: add snapshots for input type widgets (#34436) 2024-06-27 10:51:28 +05:30
AppNavigation test:PartialExport_Widgets spec file updated and import app method updated with validations (#33343) 2024-05-10 19:20:40 +05:30
AuditLogs chore: Make edit launch buttons as links & add upgrade ramps for session timeout setting (#31862) 2024-03-21 15:37:13 +05:30
Autocomplete fix: slash menu command show all available queries and datasources fixed (#33076) 2024-05-08 11:43:09 +05:30
Binding test: replace togglebarDisable with CheckUncheck (#34069) 2024-06-10 19:55:17 +05:30
Branding test: Updating the locator for upgrade button on admin settings (#33872) 2024-05-31 21:07:28 +05:30
BugTests chore: unified way of writing messages in cypress (#33659) 2024-05-27 15:34:45 +02:00
CodeComment test: Cypress - added tag - @tag.AutoHeight, @tag.IDE (#29670) 2023-12-18 12:45:44 +05:30
CommunityTemplate fix: default port numbers for the datasources (#32901) 2024-04-30 13:15:11 +05:30
Debugger fix: property navigation spec (#32782) 2024-04-19 13:09:20 +05:30
DynamicHeight fix: Statbox widget min-height inconsistency (#28677) (#32386) 2024-05-31 12:53:04 +05:30
Editor test: Cypress - separated exclude airgap cases and tagged them (#30588) 2024-01-24 16:47:58 +05:30
EmbedSettings test: Cypress | Added Dynamic checks for Flaky fix + Cypress upgrade (#30840) 2024-02-02 16:01:59 +05:30
ExplorerTests test:replace assertPageSave with AssertAutoSave (#33972) 2024-06-06 13:11:03 +05:30
Fork test: Use deep.eq for comparing DSLs (#34523) 2024-06-27 13:17:49 +05:30
FormLogin chore: Make edit launch buttons as links & add upgrade ramps for session timeout setting (#31862) 2024-03-21 15:37:13 +05:30
FormNativeToRawTests fix: commands title changed to command for each datasource query editor forms (#32526) 2024-04-10 17:05:01 +05:30
Git test: updated js methods to refer ts locators for Git Tests (#34577) 2024-06-28 16:34:07 +05:30
Github chore: Updating the login and signup page for cloud hosting as per new design (#32641) 2024-04-17 21:46:44 +05:30
Google chore: Updating the login and signup page for cloud hosting as per new design (#32641) 2024-04-17 21:46:44 +05:30
Homepage feat: Homepage experience v2 changes (#29282) 2024-01-25 19:11:48 +05:30
IDE feat: Overflow tabs list view (#34150) 2024-06-25 16:00:41 +05:30
JSLibrary feat: enabled editor pane sidebar (#29882) 2024-01-12 20:13:58 +05:30
JSObject test: fix JsObjectMutation flaky test (#32936) 2024-04-26 18:19:22 +05:30
Linting fix: show linting errors on browser API added (#32732) 2024-04-18 18:49:15 +05:30
MobileResponsiveTests test: updated tests with aghelper table methods (#33737) 2024-05-31 14:01:06 +05:30
Onboarding chore: Remove unnecessary flag ab_show_templates_instead_of_blank_canvas_enabled (#33313) 2024-05-13 09:32:00 +05:30
OneClickBinding fix: turned on learnability flags on by default (#33283) 2024-05-13 15:48:11 +05:30
OtherUIFeatures test: Extract pageId with regex to cover more cases (#34521) 2024-07-02 06:31:59 +05:30
PartialImportExport test: PartialExport_Widgets_spec - updated test validation logic (#33371) 2024-05-21 18:40:02 +05:30
PeekOverlay feat: enabled editor pane sidebar (#29882) 2024-01-12 20:13:58 +05:30
Performance feat: enabled editor pane sidebar (#29882) 2024-01-12 20:13:58 +05:30
ProductRamps test: replace LogintoApp with LoginFromAPI (#34040) 2024-06-14 20:52:49 +05:30
PropertyPane test: Cypress - added tags - @tag.JS, @tag.Perf, @tag.Settings, @tag.PropertyPane, @tag.Theme (#29682) 2023-12-18 17:18:23 +05:30
PublishedApps test: Cypress - added tags - @tag.JS, @tag.Perf, @tag.Settings, @tag.PropertyPane, @tag.Theme (#29682) 2023-12-18 17:18:23 +05:30
Refactoring feat: enabled editor pane sidebar (#29882) 2024-01-12 20:13:58 +05:30
SetProperty chore: Add evalTreeWithDiff to evalWorkerAction (#34403) 2024-06-27 12:08:53 +05:30
SettingsPane test: Fix page name test (#32825) 2024-04-19 17:59:03 +05:30
Templates chore: Remove empty canvas prompts and improve widget editor header (#33993) 2024-06-06 14:29:41 +05:30
ThemingTests test:replace assertPageSave with AssertAutoSave (#33972) 2024-06-06 13:11:03 +05:30
UserProfile feat: Homepage experience v2 changes (#29282) 2024-01-25 19:11:48 +05:30
VisualTests test: Failing cypress tests due to removal of empty canvas prompts (#34037) 2024-06-07 15:24:07 +05:30
Widgets feat: Add dynamic property path for sourceData in SelectWidget (#34574) 2024-07-01 12:02:21 +05:30
Workspace test: replace LogintoApp with LoginFromAPI (#34040) 2024-06-14 20:52:49 +05:30