Skip to content

Commit

Permalink
tests: fix failed store test and integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
dmijatovic committed Apr 24, 2024
1 parent fc68d8c commit 3a8df4a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 3 additions & 5 deletions apps/haddock3-download/integration-tests/topoaamol.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ test.describe('given 1 molecule and a topoaa node', () => {
await page.locator('input[type="text"]').fill('x')
// Upload e2a-hpr_1GGR.pdb
const file1 = await readFile('./integration-tests/data/e2a-hpr_1GGR.pdb')

// Click text=Input MoleculesThe input molecules that will be used for docking. >> button
await page.locator('text=Input MoleculesThe input molecules that will be used for docking. >> button').click()
await page.locator('text=1* >> input[type="file"]')
.setInputFiles({ name: 'e2a-hpr_1GGR.pdb', mimeType: 'chemical/x-pdb', buffer: file1 })

// Click text=Save
// await page.locator('button:has-text("Save")').click()
// Click text=Cancel
// await page.locator('button:has-text("Cancel")').click()

// add topoaa step to workflow
await page.locator('button:has-text("topoaa")').click()
// select topoaa step
Expand Down
6 changes: 4 additions & 2 deletions packages/core/src/store.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ describe('useSelectNodeIndex()', () => {

describe('useText()', () => {
describe('given empty catalog, no nodes and no global parameters', () => {
it('should return empty string', () => {
it('should return default state with empty molecules array', () => {
const { result } = renderHook(useText, {
wrapper: RecoilRoot
})
expect(result.current).toEqual('')
// clean text from returns (\n)
const text = result.current.replaceAll('\n', '')
expect(text).toEqual('molecules = []')
})
})

Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ const selectedNodeState = selector<IWorkflowNode | undefined>({
const index = get(selectedNodeIndexState)
const nodes = get(workflowNodesState)

console.group('selectedNodeState')
console.log('index...', index)
console.groupEnd()
// console.group('selectedNodeState')
// console.log('index...', index)
// console.groupEnd()

if (index in nodes) {
return nodes[index]
Expand Down

0 comments on commit 3a8df4a

Please sign in to comment.