-
Notifications
You must be signed in to change notification settings - Fork 13
Feat(size/XXL) - Request page UI Revamp #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sachin-bruno
wants to merge
54
commits into
opencollection-dev:main
Choose a base branch
from
sachin-bruno:request-page-changes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
e3b2496
COnflicts resolved
085fba1
BRU-2571 Overview revamp changes
3eb91b6
BRU-2571 Theme color changes
2a38ca5
BRU-2571 Theme color changes
2008212
BRU-2571 E2E test case fix
10663ee
BRU-2571 Overview revamp changes
4742909
BRU-3571 Removed the border bottom line
d6cd48b
BRU-3571 Overview test-id revamp changes
c9c75b7
BRU-3571 mobile responsive changes
54ec45e
BRU-3571 Comments addressed
c8b22db
BRU-3571 Comments addressed
14d489a
E2E test folder changes
e8ad453
E2E test folder changes
4707200
BRU-3571 E2E playwright test cases changes
704993e
feat:Overview E2E test case updation
2b15833
feat:Overview code refactoring
520afa2
feat:Overview code refactoring
d070f28
Comments addressed
a2fbaf8
Comments addressed
69468c5
Comments addressed
a0a8859
Comments addressed
58a3dc7
Comments addressed
4d614fb
Comments addressed
6dc8525
Comments addressed
d8ee950
Request page redesign changes
97d4374
Execution context UI changes
725e31d
feat: UI changes for variables, tests, and asserts
f73c46a
Comments addressed
58b7622
Feat: Added scripts page
3140af4
Feat: BRU-3569 Request page changes
dd06621
Feat: BRU-3569 Request page changes
c0acc36
Feat: BRU-3569 Request page code refactoring
b0a00b4
Feat: BRU-3569 Request page code refactoring
6805070
Feat: BRU-3569 Request page code refactoring
b0bbd89
Feat: BRU-3569 Request page code refactoring
f946a72
Feat: BRU-3569 Request page E2E refactoring
ba1cbf7
Feat: BRU-3569 Request page E2E refactoring
6ecf598
Feat: BRU-3569 Request page E2E refactoring
c5b75e3
Feat: BRU-3569 Added unsupported request type page
dfd1b9e
Conflicts resolved
d3f3636
Feat: BRU-3569 Code refactoring
64da4a9
Feat: BRU-3569 Code refactoring
002afdb
Feat: BRU-3569 Code refactoring
78bd3fc
Feat: BRU-3569 Code refactoring
547f28a
Feat: BRU-3569 Code refactoring
3bfb707
Feat: BRU-3569 Code refactoring
5250bed
Feat: BRU-3569 Code refactoring
68010d5
Feat: BRU-3569 Code refactoring
0cdf60b
Conflicts resolved
e56dd6d
Conflicts resolved
22f18d1
Code refactoring
6e70b37
Code refactoring
13d189e
Code refactoring
aa03ead
Code refactoring
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import type { Locator, Page } from '@playwright/test'; | ||
| import { BaseComponent } from './base.component'; | ||
|
|
||
| export class BreadcrumbComponent extends BaseComponent { | ||
| readonly current: Locator; | ||
| readonly segments: Locator; | ||
|
|
||
| constructor(page: Page, testId: string) { | ||
| super(page, page.getByTestId(testId)); | ||
| this.current = page.getByTestId(`${testId}-current`); | ||
| this.segments = page.getByTestId(`${testId}-segment`); | ||
| } | ||
|
|
||
| segment(name: string): Locator { | ||
| return this.segments.filter({ hasText: name }); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
packages/oc-docs/e2e/components/request/code-snippet.component.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import type { Locator } from '@playwright/test'; | ||
| import { BaseComponent } from '../base.component'; | ||
|
|
||
| export class CodeSnippetComponent extends BaseComponent { | ||
| readonly root = this.page.getByTestId('request-code-snippet'); | ||
|
|
||
| readonly code = this.root.locator('code'); | ||
|
|
||
| languageTab(language: string): Locator { | ||
| return this.root.getByTestId(`code-snippet-tab-${language}`); | ||
| } | ||
|
|
||
| async selectLanguage(language: string): Promise<void> { | ||
| await this.languageTab(language).click(); | ||
| } | ||
| } |
36 changes: 36 additions & 0 deletions
36
packages/oc-docs/e2e/components/request/examples.component.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import type { Locator } from '@playwright/test'; | ||
| import { BaseComponent } from '../base.component'; | ||
|
|
||
| export class ExamplesComponent extends BaseComponent { | ||
| readonly root = this.page.getByTestId('request-examples'); | ||
|
|
||
| readonly items = this.root.getByTestId('example-card'); | ||
|
|
||
| example(name: string): Locator { | ||
| return this.items.filter({ hasText: name }); | ||
| } | ||
|
|
||
| statusCode(name: string): Locator { | ||
| return this.example(name).getByTestId('example-status'); | ||
| } | ||
|
|
||
| requestBody(name: string): Locator { | ||
| return this.example(name).getByTestId('example-request-pane-body'); | ||
| } | ||
|
|
||
| responseBody(name: string): Locator { | ||
| return this.example(name).getByTestId('example-response-pane-body'); | ||
| } | ||
|
|
||
| async open(name: string): Promise<void> { | ||
| await this.example(name).getByTestId('example-toggle').click(); | ||
| } | ||
|
|
||
| async selectRequestTab(name: string, tab: string): Promise<void> { | ||
| await this.example(name).getByTestId(`example-request-pane-tab-${tab}`).click(); | ||
| } | ||
|
|
||
| async selectResponseTab(name: string, tab: string): Promise<void> { | ||
| await this.example(name).getByTestId(`example-response-pane-tab-${tab}`).click(); | ||
| } | ||
| } |
27 changes: 27 additions & 0 deletions
27
packages/oc-docs/e2e/components/request/execution-context.component.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import type { Locator } from '@playwright/test'; | ||
| import { BaseComponent } from '../base.component'; | ||
|
|
||
| export class ExecutionContextComponent extends BaseComponent { | ||
| readonly root = this.page.getByTestId('execution-context'); | ||
|
|
||
| readonly scripts = this.root.getByTestId('execution-context-scripts'); | ||
| readonly variables = this.root.getByTestId('execution-context-variables'); | ||
| readonly asserts = this.root.getByTestId('execution-context-asserts'); | ||
| readonly tests = this.root.getByTestId('execution-context-tests'); | ||
|
|
||
| script(label: string): Locator { | ||
| return this.scripts.getByText(label); | ||
| } | ||
|
|
||
| variable(name: string): Locator { | ||
| return this.variables.getByText(name, { exact: true }); | ||
| } | ||
|
|
||
| assertion(text: string): Locator { | ||
| return this.asserts.getByText(text); | ||
| } | ||
|
|
||
| testCase(name: string): Locator { | ||
| return this.tests.getByText(name); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { BaseComponent } from '../base.component'; | ||
|
|
||
| export class RequestUrlBarComponent extends BaseComponent { | ||
| readonly root = this.page.getByTestId('request-url-bar'); | ||
|
|
||
| readonly method = this.root.getByTestId('request-method'); | ||
| readonly url = this.root.getByTestId('request-url'); | ||
| readonly tryButton = this.root.getByTestId('request-try-button'); | ||
| } |
9 changes: 9 additions & 0 deletions
9
packages/oc-docs/e2e/components/script/script-content.component.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { BaseComponent } from '../base.component'; | ||
|
|
||
| export class ScriptContentComponent extends BaseComponent { | ||
| readonly root = this.page.getByTestId('script-code'); | ||
|
|
||
| readonly code = this.root.locator('code'); | ||
|
|
||
| readonly copyButton = this.root.getByTestId('script-code-copy'); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import type { Locator } from '@playwright/test'; | ||
| import { BaseComponent } from './base.component'; | ||
|
|
||
| export class SidebarComponent extends BaseComponent { | ||
| readonly items = this.page.getByTestId('sidebar-item'); | ||
|
|
||
| item(name: string): Locator { | ||
| return this.items.filter({ hasText: name }); | ||
| } | ||
|
|
||
| async open(trail: string[]): Promise<void> { | ||
| for (const name of trail) { | ||
| await this.item(name).first().click(); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import type { Locator } from '@playwright/test'; | ||
| import { BasePage } from './base.page'; | ||
| import { SidebarComponent } from '../components/sidebar.component'; | ||
| import { BreadcrumbComponent } from '../components/breadcrumb.component'; | ||
| import { RequestUrlBarComponent } from '../components/request/url-bar.component'; | ||
| import { CodeSnippetComponent } from '../components/request/code-snippet.component'; | ||
| import { ExamplesComponent } from '../components/request/examples.component'; | ||
| import { ExecutionContextComponent } from '../components/request/execution-context.component'; | ||
|
|
||
| export class RequestPage extends BasePage { | ||
| readonly root = this.page.getByTestId('request-page'); | ||
|
|
||
| readonly sidebar = new SidebarComponent(this.page); | ||
| readonly breadcrumb = new BreadcrumbComponent(this.page, 'request-breadcrumb'); | ||
| readonly title = this.page.getByTestId('request-title'); | ||
| readonly urlBar = new RequestUrlBarComponent(this.page); | ||
| readonly description = this.page.getByTestId('request-description'); | ||
| readonly codeSnippet = new CodeSnippetComponent(this.page); | ||
| readonly examples = new ExamplesComponent(this.page); | ||
| readonly executionContext = new ExecutionContextComponent(this.page); | ||
|
|
||
| async open(trail: string[]): Promise<void> { | ||
| await this.navigate('/'); | ||
| await this.sidebar.open(trail); | ||
| await this.root.waitFor({ state: 'visible' }); | ||
| } | ||
|
|
||
| section(label: string): Locator { | ||
| const slug = label.toLowerCase().replace(/\s+/g, '-'); | ||
| return this.page.getByTestId(`request-section-${slug}`); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import { BasePage } from './base.page'; | ||
| import { SidebarComponent } from '../components/sidebar.component'; | ||
| import { BreadcrumbComponent } from '../components/breadcrumb.component'; | ||
| import { ScriptContentComponent } from '../components/script/script-content.component'; | ||
|
|
||
| export class ScriptPage extends BasePage { | ||
| readonly root = this.page.getByTestId('script-page'); | ||
|
|
||
| readonly sidebar = new SidebarComponent(this.page); | ||
| readonly breadcrumb = new BreadcrumbComponent(this.page, 'script-breadcrumb'); | ||
| readonly title = this.page.getByTestId('script-title'); | ||
| readonly content = new ScriptContentComponent(this.page); | ||
|
|
||
| async open(trail: string[]): Promise<void> { | ||
| await this.navigate('/'); | ||
| await this.sidebar.open(trail); | ||
| await this.root.waitFor({ state: 'visible' }); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import { BasePage } from './base.page'; | ||
| import { SidebarComponent } from '../components/sidebar.component'; | ||
| import { BreadcrumbComponent } from '../components/breadcrumb.component'; | ||
|
|
||
| export class UnsupportedRequestPage extends BasePage { | ||
| readonly root = this.page.getByTestId('unsupported-request'); | ||
|
|
||
| readonly sidebar = new SidebarComponent(this.page); | ||
| readonly breadcrumb = new BreadcrumbComponent(this.page, 'unsupported-request-breadcrumb'); | ||
| readonly title = this.page.getByTestId('unsupported-request-title'); | ||
| readonly message = this.page.getByTestId('unsupported-request-empty'); | ||
|
|
||
| async open(trail: string[]): Promise<void> { | ||
| await this.navigate('/'); | ||
| await this.sidebar.open(trail); | ||
| await this.root.waitFor({ state: 'visible' }); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
packages/oc-docs/e2e/tests/overview/overview-documentation.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.