-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix: allowing bottom tabs to be selectable as text #33263
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
a49c9ef
fix: allowing bottom tabs to be selectable as text
a6fb06e
fix: allowing bottom tabs to be selectable as text
7199042
Merge branch 'release' of github.com:appsmithorg/appsmith into fix/32…
cbe5907
fix: added tag debugger in tags.js
fbc599a
fix: jest test cases for debugger views
369190a
Merge branch 'release' of github.com:appsmithorg/appsmith into fix/32…
6143bd8
fix: jest test cases
091adb5
fix: jest test cases
5b21f68
Merge branch 'release' of github.com:appsmithorg/appsmith into fix/32…
d41a9c3
Merge branch 'release' of github.com:appsmithorg/appsmith into fix/32…
98313f2
fix: jest test cases
7092a21
Merge branch 'release' of github.com:appsmithorg/appsmith into fix/32…
aae482b
Merge branch 'release' of github.com:appsmithorg/appsmith into fix/32…
76a06a0
Merge branch 'release' of github.com:appsmithorg/appsmith into fix/32…
1403786
fix: removed debugger tag from tags.json
9aeb5f4
Merge branch 'release' of github.com:appsmithorg/appsmith into fix/32…
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,5 +68,6 @@ module.exports = { | |
| "@tag.Visual", | ||
| "@tag.Module", | ||
| "@tag.Workflows", | ||
| "@tag.Debugger", | ||
| ], | ||
| }; | ||
76 changes: 76 additions & 0 deletions
76
app/client/src/components/editorComponents/ApiResponseView.test.tsx
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,76 @@ | ||
| import React from "react"; | ||
| import { render } from "@testing-library/react"; | ||
| import ApiResponseView from "./ApiResponseView"; | ||
| import configureStore from "redux-mock-store"; | ||
| import { Provider } from "react-redux"; | ||
| import { ThemeProvider } from "styled-components"; | ||
| import { unitTestBaseMockStore } from "layoutSystems/common/dropTarget/unitTestUtils"; | ||
| import { lightTheme } from "selectors/themeSelectors"; | ||
| import { BrowserRouter as Router } from "react-router-dom"; | ||
| import { EditorViewMode } from "@appsmith/entities/IDE/constants"; | ||
| import "@testing-library/jest-dom/extend-expect"; | ||
|
|
||
| const mockStore = configureStore([]); | ||
|
|
||
| const storeState = { | ||
| ...unitTestBaseMockStore, | ||
| evaluations: { | ||
| tree: {}, | ||
| }, | ||
| ui: { | ||
| ...unitTestBaseMockStore.ui, | ||
| users: { | ||
| featureFlag: { | ||
| data: {}, | ||
| overriddenFlags: {}, | ||
| }, | ||
| }, | ||
| ide: { | ||
| view: EditorViewMode.FullScreen, | ||
| }, | ||
| debugger: { | ||
| context: { | ||
| errorCount: 0, | ||
| }, | ||
| }, | ||
| apiPane: { | ||
| debugger: { | ||
| open: true, | ||
| responseTabHeight: 200, | ||
| selectedTab: "response", | ||
| }, | ||
| }, | ||
| }, | ||
| }; | ||
|
|
||
| describe("ApiResponseView", () => { | ||
| let store: any; | ||
|
|
||
| beforeEach(() => { | ||
| store = mockStore(storeState); | ||
| }); | ||
|
|
||
| it("the container should have class select-text to enable the selection of text for user", () => { | ||
| const { container } = render( | ||
| <Provider store={store}> | ||
| <ThemeProvider theme={lightTheme}> | ||
| <Router> | ||
| <ApiResponseView | ||
| apiName="Api1" | ||
| isRunning={false} | ||
| onRunClick={() => {}} | ||
| responseDataTypes={[]} | ||
| responseDisplayFormat={{ title: "JSON", value: "JSON" }} | ||
| /> | ||
| </Router> | ||
| </ThemeProvider> | ||
| </Provider>, | ||
| ); | ||
|
|
||
| expect( | ||
| container | ||
| .querySelector(".t--api-bottom-pane-container") | ||
| ?.classList.contains("select-text"), | ||
| ).toBe(true); | ||
| }); | ||
| }); |
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
77 changes: 77 additions & 0 deletions
77
app/client/src/pages/Editor/DataSourceEditor/Debugger.test.tsx
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,77 @@ | ||
| import React from "react"; | ||
| import { render } from "@testing-library/react"; | ||
| import configureStore from "redux-mock-store"; | ||
| import { Provider } from "react-redux"; | ||
| import { ThemeProvider } from "styled-components"; | ||
| import { unitTestBaseMockStore } from "layoutSystems/common/dropTarget/unitTestUtils"; | ||
| import { lightTheme } from "selectors/themeSelectors"; | ||
| import { BrowserRouter as Router } from "react-router-dom"; | ||
| import { EditorViewMode } from "@appsmith/entities/IDE/constants"; | ||
| import "@testing-library/jest-dom/extend-expect"; | ||
| import Debugger from "./Debugger"; | ||
|
|
||
| jest.mock("components/editorComponents/Debugger/ErrorLogs/ErrorLog", () => ({ | ||
| __esModule: true, | ||
| default: () => <div />, | ||
| })); | ||
|
|
||
| const mockStore = configureStore([]); | ||
|
|
||
| const storeState = { | ||
| ...unitTestBaseMockStore, | ||
| evaluations: { | ||
| tree: {}, | ||
| }, | ||
| ui: { | ||
| ...unitTestBaseMockStore.ui, | ||
| users: { | ||
| featureFlag: { | ||
| data: {}, | ||
| overriddenFlags: {}, | ||
| }, | ||
| }, | ||
| ide: { | ||
| view: EditorViewMode.FullScreen, | ||
| }, | ||
| debugger: { | ||
| isOpen: true, | ||
| errors: {}, | ||
| expandId: "", | ||
| hideErrors: false, | ||
| context: { | ||
| scrollPosition: 0, | ||
| selectedDebuggerTab: "ERROR", | ||
| responseTabHeight: 252.1953125, | ||
| errorCount: 0, | ||
| selectedDebuggerFilter: "error", | ||
| }, | ||
| logs: [], | ||
| }, | ||
| }, | ||
| }; | ||
|
|
||
| describe("ApiResponseView", () => { | ||
| let store: any; | ||
|
|
||
| beforeEach(() => { | ||
| store = mockStore(storeState); | ||
| }); | ||
|
|
||
| it("the container should have class select-text to enable the selection of text for user", () => { | ||
| const { container } = render( | ||
| <Provider store={store}> | ||
| <ThemeProvider theme={lightTheme}> | ||
| <Router> | ||
| <Debugger /> | ||
| </Router> | ||
| </ThemeProvider> | ||
| </Provider>, | ||
| ); | ||
|
|
||
| expect( | ||
| container | ||
| .querySelector(".t--datasource-bottom-pane-container") | ||
| ?.classList.contains("select-text"), | ||
| ).toBe(true); | ||
| }); | ||
| }); |
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
88 changes: 88 additions & 0 deletions
88
app/client/src/pages/Editor/QueryEditor/QueryDebuggerTabs.test.tsx
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,88 @@ | ||
| import React from "react"; | ||
| import { render } from "@testing-library/react"; | ||
| import configureStore from "redux-mock-store"; | ||
| import { Provider } from "react-redux"; | ||
| import { ThemeProvider } from "styled-components"; | ||
| import { unitTestBaseMockStore } from "layoutSystems/common/dropTarget/unitTestUtils"; | ||
| import { lightTheme } from "selectors/themeSelectors"; | ||
| import { BrowserRouter as Router } from "react-router-dom"; | ||
| import { EditorViewMode } from "@appsmith/entities/IDE/constants"; | ||
| import "@testing-library/jest-dom/extend-expect"; | ||
| import QueryDebuggerTabs from "./QueryDebuggerTabs"; | ||
| import { ENTITY_TYPE } from "@appsmith/entities/AppsmithConsole/utils"; | ||
|
|
||
| const mockStore = configureStore([]); | ||
|
|
||
| const storeState = { | ||
| ...unitTestBaseMockStore, | ||
| evaluations: { | ||
| tree: {}, | ||
| }, | ||
| entities: { | ||
| plugins: { | ||
| list: [], | ||
| }, | ||
| datasources: { | ||
| structure: {}, | ||
| }, | ||
| }, | ||
| ui: { | ||
| ...unitTestBaseMockStore.ui, | ||
| users: { | ||
| featureFlag: { | ||
| data: {}, | ||
| overriddenFlags: {}, | ||
| }, | ||
| }, | ||
| ide: { | ||
| view: EditorViewMode.FullScreen, | ||
| }, | ||
| debugger: { | ||
| context: { | ||
| errorCount: 0, | ||
| }, | ||
| }, | ||
| queryPane: { | ||
| debugger: { | ||
| open: true, | ||
| responseTabHeight: 200, | ||
| selectedTab: "response", | ||
| }, | ||
| }, | ||
| }, | ||
| }; | ||
|
|
||
| describe("ApiResponseView", () => { | ||
| let store: any; | ||
|
|
||
| beforeEach(() => { | ||
| store = mockStore(storeState); | ||
| }); | ||
|
|
||
| it("the container should have class select-text to enable the selection of text for user", () => { | ||
| const { container } = render( | ||
| <Provider store={store}> | ||
| <ThemeProvider theme={lightTheme}> | ||
| <Router> | ||
| <QueryDebuggerTabs | ||
| actionName="Query1" | ||
| actionSource={{ | ||
| id: "ID1", | ||
| name: "Query1", | ||
| type: ENTITY_TYPE.ACTION, | ||
| }} | ||
| isRunning={false} | ||
| onRunClick={() => {}} | ||
| /> | ||
| </Router> | ||
| </ThemeProvider> | ||
| </Provider>, | ||
| ); | ||
|
|
||
| expect( | ||
| container | ||
| .querySelector(".t--query-bottom-pane-container") | ||
| ?.classList.contains("select-text"), | ||
| ).toBe(true); | ||
| }); | ||
| }); |
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
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.