pull/5370/head
bunsenstraat 11 months ago
parent b7025d22e1
commit 42a554df4e
  1. 29
      apps/remix-ide-e2e/src/tests/file_explorer_context_menu.test.ts
  2. 2
      apps/remix-ide-e2e/src/tests/file_explorer_dragdrop.test.ts

@ -8,7 +8,7 @@ module.exports = {
init(browser, done) init(browser, done)
}, },
// file copy file name tests // file copy file name tests
'Should copy file name and paste in root with new file button and it will contain a new file #group1 #flaky': function (browser: NightwatchBrowser) { 'Should copy file name and paste in root with new file button and it will contain a new file #group1 ': function (browser: NightwatchBrowser) {
browser browser
.clickLaunchIcon('filePanel') .clickLaunchIcon('filePanel')
.waitForElementVisible('li[data-id="treeViewLitreeViewItemREADME.txt"]') .waitForElementVisible('li[data-id="treeViewLitreeViewItemREADME.txt"]')
@ -23,7 +23,7 @@ module.exports = {
.sendKeys('*[data-id$="/blank"] .remixui_items', browser.Keys.ENTER) .sendKeys('*[data-id$="/blank"] .remixui_items', browser.Keys.ENTER)
.waitForElementVisible('*[data-id="treeViewLitreeViewItemREADME1.txt"]', 7000) .waitForElementVisible('*[data-id="treeViewLitreeViewItemREADME1.txt"]', 7000)
}, },
'Should copy file name and paste in another folder with new file button and it will contain a new file #group1 #flaky': function (browser: NightwatchBrowser) { 'Should copy file name and paste in another folder with new file button and it will contain a new file #group1 ': function (browser: NightwatchBrowser) {
browser browser
.waitForElementVisible('li[data-id="treeViewLitreeViewItemREADME.txt"]') .waitForElementVisible('li[data-id="treeViewLitreeViewItemREADME.txt"]')
.rightClick('li[data-id="treeViewLitreeViewItemREADME.txt"]') .rightClick('li[data-id="treeViewLitreeViewItemREADME.txt"]')
@ -38,7 +38,7 @@ module.exports = {
.sendKeys('*[data-id$="/blank"] .remixui_items', browser.Keys.ENTER) .sendKeys('*[data-id$="/blank"] .remixui_items', browser.Keys.ENTER)
.waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts/README.txt"]', 7000) .waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts/README.txt"]', 7000)
}, },
'Should copy file name and paste in another folder that has the same filename with new file button and it will contain a new file #group1 #flaky': function (browser: NightwatchBrowser) { 'Should copy file name and paste in another folder that has the same filename with new file button and it will contain a new file #group1 ': function (browser: NightwatchBrowser) {
browser browser
.waitForElementVisible('li[data-id="treeViewLitreeViewItemREADME.txt"]') .waitForElementVisible('li[data-id="treeViewLitreeViewItemREADME.txt"]')
.rightClick('li[data-id="treeViewLitreeViewItemREADME.txt"]') .rightClick('li[data-id="treeViewLitreeViewItemREADME.txt"]')
@ -53,7 +53,7 @@ module.exports = {
.sendKeys('*[data-id$="/blank"] .remixui_items', browser.Keys.ENTER) .sendKeys('*[data-id$="/blank"] .remixui_items', browser.Keys.ENTER)
.waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts/README1.txt"]', 7000) .waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts/README1.txt"]', 7000)
}, },
'Should copy file name and paste in root with right click and it will contain a new file #group1 #flaky': function (browser: NightwatchBrowser) { 'Should copy file name and paste in root with right click and it will contain a new file #group1 ': function (browser: NightwatchBrowser) {
browser browser
.waitForElementVisible('li[data-id="treeViewLitreeViewItemREADME.txt"]') .waitForElementVisible('li[data-id="treeViewLitreeViewItemREADME.txt"]')
.rightClick('li[data-id="treeViewLitreeViewItemREADME.txt"]') .rightClick('li[data-id="treeViewLitreeViewItemREADME.txt"]')
@ -68,7 +68,7 @@ module.exports = {
.sendKeys('*[data-id$="/blank"] .remixui_items', browser.Keys.ENTER) .sendKeys('*[data-id$="/blank"] .remixui_items', browser.Keys.ENTER)
.waitForElementVisible('*[data-id="treeViewLitreeViewItemREADME2.txt"]', 7000) .waitForElementVisible('*[data-id="treeViewLitreeViewItemREADME2.txt"]', 7000)
}, },
'Should copy file name and paste in contracts with right click and it will contain a new file #group1 #flaky': function (browser: NightwatchBrowser) { 'Should copy file name and paste in contracts with right click and it will contain a new file #group1 ': function (browser: NightwatchBrowser) {
browser browser
.waitForElementVisible('li[data-id="treeViewLitreeViewItemREADME.txt"]') .waitForElementVisible('li[data-id="treeViewLitreeViewItemREADME.txt"]')
.rightClick('li[data-id="treeViewLitreeViewItemREADME.txt"]') .rightClick('li[data-id="treeViewLitreeViewItemREADME.txt"]')
@ -84,7 +84,18 @@ module.exports = {
.waitForElementVisible('*[data-id="treeViewLitreeViewItemREADME2.txt"]', 7000) .waitForElementVisible('*[data-id="treeViewLitreeViewItemREADME2.txt"]', 7000)
}, },
// file copy paste tests // file copy paste tests
'Should copy file and paste in contracts with right click and it will contain a new file #group1 #flaky': function (browser: NightwatchBrowser) { 'Should copy file and paste in root with right click and it will contain a new file #flaky #group1 ': function (browser: NightwatchBrowser) {
browser
.waitForElementVisible('li[data-id="treeViewLitreeViewItemREADME.txt"]')
.rightClick('li[data-id="treeViewLitreeViewItemREADME.txt"]')
.waitForElementPresent('[data-id="contextMenuItemcopy')
.click('[data-id="contextMenuItemcopy"]')
.rightClick('*[data-id="treeViewLiMenu"]')
.saveScreenshot('./reports/screenshot/file_explorer_context_menu.png')
.click('*[data-id="contextMenuItempaste"]')
.waitForElementVisible('*[data-id="treeViewLitreeViewItemCopy_README.txt"]', 7000)
},
'Should copy file and paste in contracts with right click and it will contain a new file #group1 ': function (browser: NightwatchBrowser) {
browser browser
.waitForElementVisible('li[data-id="treeViewLitreeViewItemREADME.txt"]') .waitForElementVisible('li[data-id="treeViewLitreeViewItemREADME.txt"]')
.rightClick('li[data-id="treeViewLitreeViewItemREADME.txt"]') .rightClick('li[data-id="treeViewLitreeViewItemREADME.txt"]')
@ -95,16 +106,16 @@ module.exports = {
.waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts/Copy_README.txt"]', 7000) .waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts/Copy_README.txt"]', 7000)
}, },
// folder copy paste tests // folder copy paste tests
'Should copy folder and paste in root with right click and it will contain a copied folder #group1 #flaky': function (browser: NightwatchBrowser) { 'Should copy folder and paste in root with right click and it will contain a copied folder #group1 ': function (browser: NightwatchBrowser) {
browser browser
.rightClick('li[data-id="treeViewLitreeViewItemcontracts"]') .rightClick('li[data-id="treeViewLitreeViewItemcontracts"]')
.waitForElementPresent('[data-id="contextMenuItemcopy') .waitForElementPresent('[data-id="contextMenuItemcopy')
.click('[data-id="contextMenuItemcopy"]') .click('[data-id="contextMenuItemcopy"]')
.rightClick('*[data-id="treeViewUltreeViewMenu"]') .rightClick('*[data-id="treeViewLiMenu"]')
.click('*[data-id="contextMenuItempaste"]') .click('*[data-id="contextMenuItempaste"]')
.waitForElementVisible('*[data-id="treeViewLitreeViewItemCopy_contracts"]', 7000) .waitForElementVisible('*[data-id="treeViewLitreeViewItemCopy_contracts"]', 7000)
}, },
'Should copy folder and paste in contracts with right click and it will contain a copied folder #group1 #flaky': function (browser: NightwatchBrowser) { 'Should copy folder and paste in contracts with right click and it will contain a copied folder #group1 ': function (browser: NightwatchBrowser) {
browser browser
.pause(1000) .pause(1000)
.waitForElementVisible('li[data-id="treeViewLitreeViewItemscripts"]') .waitForElementVisible('li[data-id="treeViewLitreeViewItemscripts"]')

@ -12,7 +12,7 @@ module.exports = {
before: function (browser: NightwatchBrowser, done: VoidFunction) { before: function (browser: NightwatchBrowser, done: VoidFunction) {
init(browser, done) init(browser, done)
}, },
'drag and drop file from root to contracts #group1 #flaky': function (browser: NightwatchBrowser) { 'drag and drop file from root to contracts #group1 ': function (browser: NightwatchBrowser) {
if (checkBrowserIsChrome(browser)) { if (checkBrowserIsChrome(browser)) {
browser browser
.clickLaunchIcon('filePanel') .clickLaunchIcon('filePanel')

Loading…
Cancel
Save