Change gistid to valid gist ids in e2e

pull/5370/head
ioedeveloper 3 years ago
parent 90d0534806
commit 4046b352ff
  1. 10
      apps/remix-ide-e2e/src/tests/gist.spec.ts
  2. 6
      libs/remix-ui/settings/src/lib/remix-ui-settings.tsx
  3. 2
      libs/remix-ui/settings/src/lib/settingsAction.ts

@ -3,7 +3,7 @@ import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
const testData = {
validGistId: '1859c97c6e1efc91047d725d5225888e',
validGistId: '02a847917a6a7ecaf4a7e0d4e68715bf',
invalidGistId: '6368b389f9302v32902msk2402'
}
// 99266d6da54cc12f37f11586e8171546c7700d67
@ -20,7 +20,7 @@ module.exports = {
- switch to a file in the new gist
*/
console.log('token', process.env.gist_token)
const gistid = 'c15ed7c182a7991ea0a4dea1544fa254'
const gistid = '17ac9315bc065a3d95cf8dc1b28d71f8'
browser
.refresh()
.pause(10000)
@ -125,9 +125,9 @@ module.exports = {
.waitForElementVisible('*[data-id="modalDialogCustomPromptText"]')
.setValue('*[data-id="modalDialogCustomPromptText"]', testData.validGistId)
.modalFooterOKClick()
.openFile(`gist-${testData.validGistId}/ApplicationRegistry`)
.waitForElementVisible(`div[title='default_workspace/gist-${testData.validGistId}/ApplicationRegistry']`)
.assert.containsText(`div[title='default_workspace/gist-${testData.validGistId}/ApplicationRegistry'] > span`, 'ApplicationRegistry')
.openFile(`gist-${testData.validGistId}/README.txt`)
.waitForElementVisible(`div[title='default_workspace/gist-${testData.validGistId}/README.txt']`)
.assert.containsText(`div[title='default_workspace/gist-${testData.validGistId}/README.txt'] > span`, 'README.txt')
.end()
}
}

@ -4,7 +4,7 @@ import { CopyToClipboard } from '@remix-ui/clipboard' // eslint-disable-line
import { enablePersonalModeText, ethereunVMText, generateContractMetadataText, gitAccessTokenLink, gitAccessTokenText, gitAccessTokenText2, gitAccessTokenTitle, matomoAnalytics, textDark, textSecondary, warnText, wordWrapText } from './constants'
import './remix-ui-settings.css'
import { etherumVM, generateContractMetadat, personal, textWrapEventAction, useMatomoAnalytics, saveTokenToast, removeTokenToast } from './settingsAction'
import { ethereumVM, generateContractMetadat, personal, textWrapEventAction, useMatomoAnalytics, saveTokenToast, removeTokenToast } from './settingsAction'
import { initialState, toastInitialState, toastReducer, settingReducer } from './settingsReducer'
import { Toaster } from '@remix-ui/toaster'// eslint-disable-line
@ -41,7 +41,7 @@ export const RemixUiSettings = (props: RemixUiSettingsProps) => {
useEffect(() => {
const javascriptVM = props.config.get('settings/always-use-vm')
if ((javascriptVM === null) || (javascriptVM === undefined)) etherumVM(props.config, true, dispatch)
if ((javascriptVM === null) || (javascriptVM === undefined)) ethereumVM(props.config, true, dispatch)
}, [props.config])
const onchangeGenerateContractMetadata = (event) => {
@ -49,7 +49,7 @@ export const RemixUiSettings = (props: RemixUiSettingsProps) => {
}
const onchangeOption = (event) => {
etherumVM(props.config, event.target.checked, dispatch)
ethereumVM(props.config, event.target.checked, dispatch)
}
const textWrapEvent = (event) => {

@ -13,7 +13,7 @@ export const generateContractMetadat = (config, checked, dispatch) => {
dispatch({ type: 'contractMetadata', payload: { isChecked: checked, textClass: checked ? textDark : textSecondary } })
}
export const etherumVM = (config, checked: boolean, dispatch) => {
export const ethereumVM = (config, checked: boolean, dispatch) => {
config.set('settings/always-use-vm', checked)
dispatch({ type: 'ethereumVM', payload: { isChecked: checked, textClass: checked ? textDark : textSecondary } })
}

Loading…
Cancel
Save