Skip to content
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

Utilize source maps for error improvements #4041

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
44be8aa
add source map utility
chrisbreiding Apr 24, 2019
7f15da2
capture and store invocation stack on commands
chrisbreiding Apr 24, 2019
b0faac6
Merge branch 'develop' into issue-3966-source-for-command-failures
chrisbreiding Apr 24, 2019
13fd293
Merge branch 'jen/reporter-error-templates-fix' into issue-3966-sourc…
chrisbreiding Apr 24, 2019
e4ab7fa
embed source map into spec file in a way that the driver can access it
chrisbreiding Apr 26, 2019
8824834
wip: wire up source maps with driver errors
chrisbreiding Apr 26, 2019
f4457b1
Merge branch 'jen/reporter-error-templates-fix' into issue-3966-sourc…
jennifer-shehane Apr 29, 2019
babd608
Add existential checks for stack code, don't get props from undefined
jennifer-shehane Apr 29, 2019
094d318
call it generated instead of artifact
chrisbreiding May 1, 2019
09030d8
handle lack of code frame properly
chrisbreiding May 1, 2019
812a982
add more language support to code frame
chrisbreiding May 1, 2019
f46ea7c
dry up adding prism transform
chrisbreiding May 2, 2019
18fb4a6
clean up / refactor / update and add tests
chrisbreiding May 2, 2019
dbdd35a
Merge branch 'jen/reporter-error-templates-fix' into issue-3966-sourc…
chrisbreiding Aug 7, 2019
7737939
Merge branch 'jen/reporter-error-templates-fix' into issue-3966-sourc…
chrisbreiding Aug 9, 2019
7624d85
get wasm served properly with webpack
chrisbreiding Aug 9, 2019
80434fb
get spec frame stack for command failures
chrisbreiding Aug 9, 2019
fcd9ef3
use specWindow.Error instead of calling into spec iframe
chrisbreiding Aug 13, 2019
ce65507
capture stack and set code frame for assertion failures
chrisbreiding Aug 13, 2019
f47c77b
fix wrong line being highlighted when at top of file
chrisbreiding Aug 13, 2019
299e263
use webpack for driver cypress tests
chrisbreiding Aug 14, 2019
af5241c
handle assertion error source mapping
chrisbreiding Aug 14, 2019
7a249b1
Merge branch 'jen/reporter-error-templates-fix' into issue-3966-sourc…
chrisbreiding Sep 16, 2019
53f0a76
wip - extract source map in driver
chrisbreiding Sep 17, 2019
6f709ab
wip - get tests passing
chrisbreiding Sep 17, 2019
aed6bf4
wip
chrisbreiding Sep 18, 2019
0a4aefe
wip
chrisbreiding Sep 18, 2019
72765f5
refactor, add/update tests
chrisbreiding Sep 19, 2019
038b1ff
remove obselete file
chrisbreiding Sep 20, 2019
0a03755
small fixes
chrisbreiding Sep 20, 2019
93d7b90
fix old reference
chrisbreiding Sep 20, 2019
24da4f7
Merge branch 'jen/reporter-error-templates-fix' into issue-3966-sourc…
chrisbreiding Sep 20, 2019
1b71b0d
fix issue with support file not being eval’d
chrisbreiding Sep 20, 2019
7dce76c
add webpack to driver for preprocessor
chrisbreiding Sep 20, 2019
d73fb6b
update integration test fixtures
chrisbreiding Sep 20, 2019
cfc1bc9
don’t use local paths derp
chrisbreiding Sep 20, 2019
a23abe5
fix driver tests
chrisbreiding Sep 20, 2019
2728d40
fix driver tests
chrisbreiding Sep 20, 2019
8acf657
fix driver tests
chrisbreiding Sep 23, 2019
ccd8963
Merge branch 'jen/reporter-error-templates-fix' into issue-3966-sourc…
chrisbreiding Sep 23, 2019
e9a4ada
Merge branch 'jen/reporter-error-templates-fix' into issue-3966-sourc…
chrisbreiding Sep 24, 2019
7d1d94f
Merge branch 'jen/reporter-error-templates-fix' into issue-3966-sourc…
chrisbreiding Sep 25, 2019
ac47225
add tests and iron out issues
chrisbreiding Sep 30, 2019
3ac0d01
update integration test fixtures
chrisbreiding Oct 1, 2019
bc5529c
fix server integration tests
chrisbreiding Oct 2, 2019
c73479c
Merge branch 'jen/reporter-error-templates-fix' into issue-3966-sourc…
chrisbreiding Oct 2, 2019
d377f12
fix issue with not passing in invocationStack
chrisbreiding Oct 2, 2019
56e20bd
match whitespace to stack lines and add back ats when details can’t b…
chrisbreiding Oct 7, 2019
6b1bf04
add/improve tests
chrisbreiding Oct 7, 2019
61e741d
fix not passing config through suites
chrisbreiding Oct 8, 2019
edb6a1e
linkify stack traces
chrisbreiding Oct 8, 2019
1afbf28
Merge branch 'jen/reporter-error-templates-fix' into issue-3966-sourc…
chrisbreiding Oct 10, 2019
74dde92
Merge branch 'jen/reporter-error-templates-fix' into issue-3966-sourc…
chrisbreiding Oct 10, 2019
d3f9400
attach invocation stack to errors when it’s more relevant to user
chrisbreiding Oct 17, 2019
0e1986f
Merge branch 'jen/reporter-error-templates-fix' into issue-3966-sourc…
chrisbreiding Oct 21, 2019
c456b27
attach parsed stack lines to error
chrisbreiding Oct 23, 2019
2df6179
Merge branch 'jen/reporter-error-templates-fix' into issue-3966-sourc…
chrisbreiding Nov 1, 2019
3fa0408
fix lint error
chrisbreiding Nov 1, 2019
ec8eb92
fix reporter tests
chrisbreiding Nov 1, 2019
d04ae92
fix e2e test
chrisbreiding Nov 4, 2019
d9f736e
update snapshots
chrisbreiding Nov 6, 2019
9e37286
refactor/fix issues with error utils
chrisbreiding Nov 6, 2019
9bbea8e
fix unit tests
chrisbreiding Nov 7, 2019
6a9289d
update snapshots
chrisbreiding Nov 7, 2019
fb3567e
update another snapshot
chrisbreiding Nov 7, 2019
a43f4aa
fix snapshot
chrisbreiding Nov 7, 2019
b221a46
attach correct absolute path to stack line
chrisbreiding Nov 12, 2019
5a73476
make codeFrame singular instead of an array
chrisbreiding Nov 12, 2019
061434b
refactor, simplify, and add tests
chrisbreiding Nov 13, 2019
fd7be06
fix stack line in reporter
chrisbreiding Nov 13, 2019
3c2f0e1
re-arrange e2e test
chrisbreiding Nov 13, 2019
41ba75c
handle edge case
chrisbreiding Nov 13, 2019
abe12f7
fix stack utils spec
chrisbreiding Nov 13, 2019
0d8bf16
remove unused imports
chrisbreiding Nov 14, 2019
de40803
fix assumption that errors always originate in support or spec file
chrisbreiding Nov 14, 2019
b50c71e
fix source map utils spec
chrisbreiding Nov 14, 2019
914590f
catch file not found in source map errors
chrisbreiding Nov 14, 2019
3b7c9a7
add tooltip to stack and code frame file paths to open on computer or…
chrisbreiding Nov 15, 2019
61169ef
refactor
chrisbreiding Nov 18, 2019
303f1c1
decaffeinate: Rename saved_state.coffee from .coffee to .js
chrisbreiding Nov 19, 2019
720a630
decaffeinate: Convert saved_state.coffee to JS
chrisbreiding Nov 19, 2019
4a97c91
decaffeinate: Run post-processing cleanups on saved_state.coffee
chrisbreiding Nov 19, 2019
a8cd916
clean up decaffeinated saved_state.js a bit
chrisbreiding Nov 19, 2019
d85aaca
move saved state util into saved state lib
chrisbreiding Nov 19, 2019
654c248
upgrade react and mobx in reporter and runner
chrisbreiding Nov 21, 2019
478ac20
add ui-components package and extract dropdown into it
chrisbreiding Nov 21, 2019
abd1ed6
add scripts to ui-components package.json
chrisbreiding Nov 21, 2019
7333554
have ui-components require build
chrisbreiding Nov 22, 2019
19e774b
allow more flexibility with arrow body style in reporter
chrisbreiding Nov 22, 2019
dabcb6c
nest ui components in src directory
chrisbreiding Nov 22, 2019
c732fa5
set up ui-components package to record
chrisbreiding Nov 22, 2019
97b1ba5
use the right project id
chrisbreiding Nov 22, 2019
36ca2b4
fix scss path
chrisbreiding Nov 22, 2019
977e00f
add eslint react to ui-components cypress tests
chrisbreiding Nov 22, 2019
026348a
fix react deprecations/warnings
chrisbreiding Nov 22, 2019
cd5a3dc
switch method of testing ui-components
chrisbreiding Nov 26, 2019
f022378
create editor picker component
chrisbreiding Nov 26, 2019
bd32134
enable tests to define component to be rendered
andrew-codes Dec 2, 2019
eff5f72
RadioGroup set of components- RadioGroup is a set of selectable items…
andrew-codes Dec 2, 2019
f9d3367
additional styling tests to showcase common examples
andrew-codes Dec 2, 2019
ec848e1
revisit implementationradio is a form of single selection. Much of th…
andrew-codes Dec 3, 2019
4176bfa
use new select component in editor picker
chrisbreiding Dec 3, 2019
aa5340b
rename spec
chrisbreiding Dec 3, 2019
15dc266
satisfy typescript
chrisbreiding Dec 3, 2019
ee26eb9
fix dropdown test
chrisbreiding Dec 4, 2019
b700f74
ignore cypress screenshots and videos
chrisbreiding Dec 4, 2019
119c575
clean up webpack config
chrisbreiding Dec 4, 2019
499ae41
use lodash instead of lodash/fp
chrisbreiding Dec 4, 2019
456ea83
initial implementation of editor picker workflow
chrisbreiding Dec 4, 2019
3c06e0b
refactor select and editor-picker components
chrisbreiding Dec 13, 2019
4575cd8
improve saved_state api
chrisbreiding Dec 13, 2019
b04a186
create editors util
chrisbreiding Dec 13, 2019
21351de
wire up ui and server side
chrisbreiding Dec 13, 2019
7e33bf0
fix tests
chrisbreiding Dec 13, 2019
4123784
refactor editor picker modal
chrisbreiding Dec 17, 2019
b166bbf
validate editor picker
chrisbreiding Dec 17, 2019
5083cf2
trim other editor path
chrisbreiding Dec 17, 2019
8b2531e
add special handling if no user editors found
chrisbreiding Dec 17, 2019
e8230d0
improve editor picker styles
chrisbreiding Dec 19, 2019
5c52dc6
fix modal button flickering issue
chrisbreiding Dec 19, 2019
c7c36e3
add global settings with editor picker to desktop-gaui
chrisbreiding Dec 27, 2019
be31369
include font-awesome as ui-components dep
chrisbreiding Dec 30, 2019
e84688f
change order of desktop-gui scss imports
chrisbreiding Dec 30, 2019
01ebc76
Merge branch 'jen/reporter-error-templates-fix' into issue-3966-sourc…
chrisbreiding Jan 3, 2020
98111cc
temp fix for desktop-gui build issue
chrisbreiding Jan 6, 2020
2948570
fix temp fix
chrisbreiding Jan 6, 2020
c02b440
one more
chrisbreiding Jan 6, 2020
3d803b3
oops
chrisbreiding Jan 6, 2020
f3ec02c
update snapshots
chrisbreiding Jan 6, 2020
6438085
move getting invocation stack to right place
chrisbreiding Jan 7, 2020
eae8f1b
fix class name
chrisbreiding Jan 7, 2020
4762f5e
fix editors types and tests
chrisbreiding Jan 7, 2020
ddff5ea
uncomment scss and hope it was just a CI cache issue
chrisbreiding Jan 7, 2020
443f0bf
nevermind :(
chrisbreiding Jan 7, 2020
7a89429
fix isCustom forwarding
chrisbreiding Jan 8, 2020
c8e0526
rename select to select-group
chrisbreiding Jan 8, 2020
ffee0bc
uncomment scss
chrisbreiding Jan 8, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ commands:
packageName: static
- save-cache:
packageName: ts
- save-cache:
packageName: ui-components
- save-cache:
packageName: web-config

Expand Down Expand Up @@ -217,6 +219,9 @@ commands:
- restore-cache:
packageName: ts
packagePath: packages/ts/package.json
- restore-cache:
packageName: ui-components
packagePath: packages/ui-components/package.json
- restore-cache:
packageName: web-config
packagePath: packages/web-config/package.json
Expand Down Expand Up @@ -573,6 +578,26 @@ jobs:
path: /tmp/artifacts
- store-npm-logs

"ui-components-integration-tests":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
command: npm run build
working_directory: packages/ui-components
- run:
command: |
CYPRESS_KONFIG_ENV=production \
CYPRESS_RECORD_KEY=$PACKAGES_RECORD_KEY \
npm run cypress:run -- --record --parallel --group ui-components
working_directory: packages/ui-components
- store_test_results:
path: /tmp/cypress
- store_artifacts:
path: /tmp/artifacts
- store-npm-logs

"run-launcher":
<<: *defaults
steps:
Expand Down Expand Up @@ -1050,6 +1075,9 @@ linux-workflow: &linux-workflow
- reporter-integration-tests:
requires:
- build
- ui-components-integration-tests:
requires:
- build
- run-launcher:
requires:
- build
Expand Down
69 changes: 68 additions & 1 deletion packages/desktop-gui/cypress/integration/settings_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ describe('Settings', () => {
})

it('opens ci guide when learn more is clicked', () => {
cy.get('.settings-record-key').contains('Learn More').click().then(function () {
cy.get('.settings-record-key').contains('Learn more').click().then(function () {
expect(this.ipc.externalOpen).to.be.calledWith('https://on.cypress.io/what-is-a-record-key')
})
})
Expand Down Expand Up @@ -420,6 +420,73 @@ describe('Settings', () => {
cy.shouldBeOnProjectSpecs()
})
})

describe('when global settings panel is opened', () => {
const availableEditors = [
{ id: 'atom', name: 'Atom', isOther: false, openerId: 'atom' },
{ id: 'vim', name: 'Vim', isOther: false, openerId: 'vim' },
{ id: 'sublime', name: 'Sublime Text', isOther: false, openerId: 'sublime' },
{ id: 'vscode', name: 'Visual Studio Code', isOther: false, openerId: 'vscode' },
{ id: 'other', name: 'Other', isOther: true, openerId: '' },
]

beforeEach(function () {
this.getUserEditor = this.util.deferred()
cy.stub(this.ipc, 'getUserEditor').returns(this.getUserEditor.promise)
cy.stub(this.ipc, 'setUserEditor').resolves()

cy.contains('Global Settings').click()
})

it('displays global settings section', () => {
cy.contains('Global settings take effect')
})

it('opens global setttings guide when learn more is clicked', () => {
cy.get('.global-settings').contains('Learn more').click().then(function () {
expect(this.ipc.externalOpen).to.be.calledWith('https://on.cypress.io/global-settings')
})
})

it('loads preferred editor and available editors', function () {
expect(this.ipc.getUserEditor).to.be.called
})

it('shows spinner', () => {
cy.get('.loading-editors')
})

describe('when editors load with preferred editor', () => {
beforeEach(function () {
this.getUserEditor.resolve({ availableEditors, preferredEditor: availableEditors[3] })
})

it('displays available editors with preferred one selected', () => {
cy.get('.loading-editors').should('not.exist')
cy.contains('Atom')
cy.contains('Other')
cy.contains('Visual Studio Code').closest('li').should('have.class', 'is-selected')
})

it('sets editor through ipc when a different editor is selected', function () {
cy.contains('Atom').click()
.closest('li').should('have.class', 'is-selected')

cy.wrap(this.ipc.setUserEditor).should('be.calledWith', availableEditors[0])
})
})

describe('when editors load without preferred editor', () => {
beforeEach(function () {
this.getUserEditor.resolve({ availableEditors })
})

it('does not select an editor', () => {
cy.get('.loading-editors').should('not.exist')
cy.get('.editor-picker li').should('not.have.class', 'is-selected')
})
})
})
})

context('on config changes', () => {
Expand Down
6 changes: 3 additions & 3 deletions packages/desktop-gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"human-interval": "0.1.6",
"lodash": "4.17.15",
"markdown-it": "8.4.2",
"mobx": "5.11.0",
"mobx-react": "5.4.3",
"mobx": "5.15.1",
"mobx-react": "6.1.4",
"mobx-react-devtools": "6.1.1",
"moment": "2.24.0",
"prop-types": "15.7.2",
Expand All @@ -42,7 +42,7 @@
"react-bootstrap-modal": "4.2.0",
"react-dom": "16.8.6",
"react-inspector": "4.0.0",
"react-loader": "2.4.5",
"react-loader": "2.4.6",
"react-select": "3.0.8",
"webpack": "4.35.3",
"webpack-cli": "3.3.2"
Expand Down
3 changes: 1 addition & 2 deletions packages/desktop-gui/src/app/nav.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { observer } from 'mobx-react'
import React, { Component } from 'react'
import { Dropdown } from '@packages/ui-components'

import appStore from '../lib/app-store'
import authApi from '../auth/auth-api'
Expand All @@ -9,8 +10,6 @@ import ipc from '../lib/ipc'
import { gravatarUrl } from '../lib/utils'
import { Link, routes } from '../lib/routing'

import Dropdown from '../dropdown/dropdown'

@observer
export default class Nav extends Component {
render () {
Expand Down
2 changes: 2 additions & 0 deletions packages/desktop-gui/src/lib/ipc.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ register('get:project:statuses')
register('get:project:status')
register('get:record:keys')
register('get:specs', false)
register('get:user:editor')
register('set:user:editor')
register('launch:browser', false)
register('log:out')
register('on:focus:tests', false)
Expand Down
2 changes: 2 additions & 0 deletions packages/desktop-gui/src/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
@import 'styles/vendor';
@import 'styles/components/*';
@import '!(styles)*/**/*';
@import '../../ui-components/src/dropdown';
@import '../../ui-components/src/editor-picker';
2 changes: 1 addition & 1 deletion packages/desktop-gui/src/project-nav/browsers.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
import { observer } from 'mobx-react'
import Tooltip from '@cypress/react-tooltip'
import Dropdown from '../dropdown/dropdown'
import { Dropdown } from '@packages/ui-components'
import MarkdownRenderer from '../lib/markdown-renderer'

import projectsApi from '../projects/projects-api'
Expand Down
55 changes: 23 additions & 32 deletions packages/desktop-gui/src/settings/configuration.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import _ from 'lodash'
import { defaultTo, get, flow, isEmpty, join, map, reduce, take, toPairs, toPath } from 'lodash/fp'
import cn from 'classnames'
import { observer } from 'mobx-react'
import React from 'react'
Expand All @@ -8,23 +7,22 @@ import { ObjectInspector, ObjectName } from 'react-inspector'
import { configFileFormatted } from '../lib/config-file-formatted'
import ipc from '../lib/ipc'

const joinWithCommas = join(', ')
const objToString = (v) => flow([
defaultTo(v.name),
defaultTo(_.isObject(v) ? joinWithCommas(Object.keys(v)) : undefined),
defaultTo(String(v)),
])(v.displayName)
const valueToString = (value) => {
return (
value.displayName ||
value.name ||
(_.isObject(value) && _.keys(value).join(', ')) ||
String(value)
)
}

const formatValue = (value) => {
if (Array.isArray(value)) {
return flow([
map(objToString),
joinWithCommas,
])(value)
return _.map(value, valueToString).join(', ')
}

if (_.isObject(value)) {
return objToString(value)
return valueToString(value)
}

const excludedFromQuotations = ['null', 'undefined']
Expand All @@ -36,20 +34,18 @@ const formatValue = (value) => {
return String(value)
}

const normalizeWithoutMeta = flow([
defaultTo({}),
toPairs,
reduce((acc, [key, value]) => _.merge({}, acc, {
const normalizeWithoutMeta = (value = {}) => {
const pairs = _.toPairs(value)
const values = _.reduce(pairs, (acc, [key, value]) => _.merge({}, acc, {
[key]: value ? value.value : {},
}), {}),
(v) => {
if (isEmpty(v)) {
return null
}
}), {})

return v
},
])
if (_.isEmpty(values)) {
return null
}

return values
}

const ObjectLabel = ({ name, data, expanded, from, isNonenumerable }) => {
const formattedData = formatValue(data)
Expand Down Expand Up @@ -87,17 +83,12 @@ ObjectLabel.defaultProps = {

const computeFromValue = (obj, name, path) => {
const normalizedPath = path.replace('$.', '').replace(name, `['${name}']`)
const getValueForPath = flow([
toPath,
_.partialRight(get, obj),
])

let value = getValueForPath(normalizedPath)
let value = _.get(obj, normalizedPath)

if (!value) {
const onlyFirstKeyInPath = flow([toPath, take(1)])
const firstKeyInPath = _.toPath(normalizedPath)[0]

value = getValueForPath(onlyFirstKeyInPath(normalizedPath))
value = _.get(obj, firstKeyInPath)
}

if (!value) {
Expand Down
74 changes: 74 additions & 0 deletions packages/desktop-gui/src/settings/global-settings.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import _ from 'lodash'
import { action } from 'mobx'
import { EditorPicker } from '@packages/ui-components'
import { observer, useLocalStore } from 'mobx-react'
import React, { useEffect } from 'react'

import ipc from '../lib/ipc'

const openHelp = (e) => {
e.preventDefault()
ipc.externalOpen('https://on.cypress.io/global-settings')
}

const save = _.debounce((editor) => {
ipc.setUserEditor(editor)
.catch(() => {}) // ignore errors
}, 500)

const GlobalSettings = observer(() => {
const state = useLocalStore(() => ({
editors: [],
isLoadingEditor: true,
chosenEditor: {},
setEditors: action((editors) => {
state.editors = editors
state.isLoadingEditor = false
}),
setChosenEditor: action((editor) => {
state.chosenEditor = editor
save(editor)
}),
setOtherPath: action((otherPath) => {
const otherOption = _.find(state.editors, { isOther: true })

otherOption.openerId = otherPath
save(otherOption)
}),
}))

useEffect(() => {
ipc.getUserEditor().then(({ preferredEditor, availableEditors }) => {
if (preferredEditor) {
state.setChosenEditor(preferredEditor)
}

state.setEditors(availableEditors)
})
}, [true])

return (
<div className="global-settings">
<a href='#' className='learn-more' onClick={openHelp}>
<i className='fas fa-info-circle'></i> Learn more
</a>

<p className='text-muted'>Global settings take effect for every project on your system. Changing them here will change them for other projects as well.</p>
<h3>Preferred Editor</h3>
<p>Your preferred editor is used to open files from the test runner (e.g. when clicking links in error stack traces)</p>
{state.isLoadingEditor ?
<p className='loading-editors'>
<i className='fas fa-spinner fa-spin'></i> Loading Editors...
</p> :
<EditorPicker
chosen={state.chosenEditor}
editors={state.editors}
onSelect={state.setChosenEditor}
onUpdateOtherPath={state.setOtherPath}
/>
}
</div>
)
})

export default GlobalSettings
3 changes: 1 addition & 2 deletions packages/desktop-gui/src/settings/record-key.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ class RecordKey extends Component {
return (
<div>
<a href='#' className='learn-more' onClick={openRecordKeyGuide}>
<i className='fas fa-info-circle'></i>{' '}
Learn More
<i className='fas fa-info-circle'></i> Learn more
</a>
<p className='text-muted'>
A Record Key sends your failing tests, screenshots, and videos to your{' '}
Expand Down
4 changes: 4 additions & 0 deletions packages/desktop-gui/src/settings/settings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import ProjectId from './project-id'
import RecordKey from './record-key'
import ProxySettings from './proxy-settings'
import NodeVersion from './node-version'
import GlobalSettings from './global-settings'

const Settings = observer(({ project, app }) => {
const { resolvedNodeVersion } = project
Expand All @@ -34,6 +35,9 @@ const Settings = observer(({ project, app }) => {
<Panel header='Proxy Settings' key='proxy-settings' className='form-horizontal settings-proxy'>
<ProxySettings app={app} />
</Panel>
Comment on lines 35 to 37
Copy link
Contributor

@flotwig flotwig Jan 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Proxy Settings" is technically a "Global Setting", at some point, we should move the preferred editor + proxy settings to their own "Global Settings" section that is distinct from project-level settings.

So we don't overly inflate the UI changes from this PR, maybe the "Proxy Settings" should just be moved into the new "Global Settings" section for now?

<Panel header='Global Settings' key='global-settings' className='form-horizontal settings-global'>
<GlobalSettings />
</Panel>
</Collapse>
</div>
</div>
Expand Down
Loading