e2e, buttons style fix

fixinganerror
lianahus 1 year ago
parent 962159e095
commit 0acfc5269e
  1. 9
      apps/remix-ide-e2e/src/tests/homeTab.test.ts
  2. 2
      apps/remix-ide/src/app/panels/file-panel.js
  3. 24
      libs/remix-ui/home-tab/src/lib/components/homeTabFile.tsx

@ -10,11 +10,8 @@ module.exports = {
'Should create new file': function (browser: NightwatchBrowser) {
browser
.waitForElementVisible('*[data-id="homeTabNewFile"]')
.click('*[data-id="homeTabNewFile"]')
.waitForElementContainsText('*[data-id$="/blank"]', '', 60000)
.sendKeys('*[data-id$="/blank"] .remixui_items', 'newTestFile')
.sendKeys('*[data-id$="/blank"] .remixui_items', browser.Keys.ENTER)
.waitForElementVisible('li[data-id="treeViewLitreeViewItemnewTestFile.sol"]')
.waitForElementVisible('*[data-id="homeTabStartCoding"]')
.click('*[data-id="homeTabStartCoding"]')
.waitForElementVisible('li[data-path="contracts/helloWorld.sol"]')
}
}

@ -104,7 +104,7 @@ module.exports = class Filepanel extends ViewPlugin {
}
getAvailableWorkspaceName (name) {
if(!this.workspaces) return name
if (!this.workspaces) return name
let index = 1
let workspace = this.workspaces.find(workspace => workspace.name === name + ' - ' + index)
while (workspace) {

@ -173,12 +173,7 @@ function HomeTabFile({plugin}: HomeTabFileProps) {
const handleSwichToRecentWorkspace = async (e, workspaceName) => {
e.preventDefault();
<<<<<<< HEAD
await plugin.call('filePanel', 'switchToWorkspace', { name: workspaceName, isLocalhost: false })
console.log('The link was clicked.');
=======
await plugin.call('filePanel', 'switchToWorkspace', { name: workspaceName, isLocalhost: false })
>>>>>>> e9b2848c5... cleanup fix undefined workspaces. Creating default Workspace
}
const examples = state.modalInfo.examples.map((urlEl, key) => (
@ -208,26 +203,15 @@ function HomeTabFile({plugin}: HomeTabFileProps) {
{state.modalInfo.prefix && <span className="text-nowrap align-self-center mr-2">ipfs://</span>}
<input
ref={inputValue}
<<<<<<< HEAD
type="text"
name="prompt_text"
id="inputPrompt_text"
=======
type='text'
name='prompt_text'
id='inputPrompt_text'
>>>>>>> e9b2848c5... cleanup fix undefined workspaces. Creating default Workspace
className="w-100 mt-1 form-control"
data-id="homeTabModalDialogCustomPromptText"
value={state.importSource}
onInput={(e) => {
<<<<<<< HEAD
setState((prevState) => {
return {...prevState, importSource: inputValue.current.value}
=======
setState(prevState => {
return { ...prevState, importSource: inputValue.current.value }
>>>>>>> e9b2848c5... cleanup fix undefined workspaces. Creating default Workspace
})
}}
/>
@ -240,6 +224,12 @@ function HomeTabFile({plugin}: HomeTabFileProps) {
<div className="d-flex flex-column">
<div className='d-flex flex-row'>
<button className="btn btn-primary p-2 mr-2 border my-1" data-id="homeTabStartCoding" style={{width: 'fit-content'}} onClick={() => startCoding()}><FormattedMessage id='home.startCoding' /></button>
<label className="btn text-nowrap p-2 mr-2 border my-1" style={{width: 'fit-content', cursor: 'pointer'}} htmlFor="openFileInput"><FormattedMessage id='home.openFile' /></label>
<input title="open file" type="file" id="openFileInput" onChange={(event) => {
event.stopPropagation()
plugin.verticalIcons.select('filePanel')
uploadFile(event.target)
}} multiple />
<CustomTooltip
placement={'top'}
tooltipId="overlay-tooltip"
@ -273,7 +263,7 @@ function HomeTabFile({plugin}: HomeTabFileProps) {
tooltipText={<FormattedMessage id="home.connectToLocalhost" />}
tooltipTextClasses="border bg-light text-dark p-1 pr-3"
>
<button className="btn p-2 border my-1" style={{width: 'fit-content'}} onClick={() => connectToLocalhost()}>
<button className="btn text-nowrap p-2 border my-1" style={{width: 'fit-content'}} onClick={() => connectToLocalhost()}>
<FormattedMessage id="home.accessFileSystem" />
</button>
</CustomTooltip>

Loading…
Cancel
Save