Skip to content

Commit

Permalink
Uncomment test to see if it works on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
guergana committed Dec 1, 2024
1 parent b85e5b5 commit 1382599
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions test/specs/test.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ import { $, expect } from '@wdio/globals'
import path from 'node:path'

describe('ODE basic workflow', () => {

beforeEach(async () => {
// ODE has a Loading window and a main Window. We need to switch to the main one.
const handles = await browser.getWindowHandles()
await browser.switchToWindow(handles[0])
})

it('displays welcoming screen and FocusTrap exist until user clicks Get Started', async () => {
// ODE has a Loading window and a main Window. We need to switch to the main one.
const handles = await browser.getWindowHandles()
await browser.switchToWindow(handles[0])

// Calling browser.react$(...) will fail to find the root element. So we find it explicitly.
// https://github.com/baruchvlz/resq/issues/31#issuecomment-493760156
Expand All @@ -22,16 +26,18 @@ describe('ODE basic workflow', () => {
simpleButton.click()
await expect(focusTrap).not.toExist()
await expect(uploadYourDataButton).toBeClickable()
browser.closeWindow()
}),
// TODO: re-enable when we find out why this is failing
it.skip('uploads a csv file, file navigator adds an node, and the file content gets display', async() => {
it('uploads a csv file, file navigator adds an node, and the file content gets display', async() => {
const filePath = path.join(__dirname, '../data/valid.csv')
const remoteFilePath = await browser.uploadFile(filePath)
const root = await $('#root')

await root.$('.sidebar .MuiButton-outlined').click()
await root.$('button#simple-tab-1').click()
const uploadYourDataButton = await root.$('.sidebar .MuiButton-outlined')
uploadYourDataButton.click()

const addExternalDataTab = await root.$('button#simple-tab-1')
addExternalDataTab.click()

// Adding the file to the hidden input[type=file] will trigger a server upload
await $('input.MuiOutlinedInput-input').addValue(remoteFilePath)

Expand Down

0 comments on commit 1382599

Please sign in to comment.