Skip to content

Commit

Permalink
Merge pull request #291 from nginformatica/test/node-and-tree
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksjm authored Dec 12, 2022
2 parents 7f6208e + 246b1ce commit 7b8d057
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cypress/integration/Node.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Feature: Node

I want to use Node

# @focus
@focus
Scenario: I should render
Given I render Node
When I expand all nodes
Expand Down
3 changes: 1 addition & 2 deletions cypress/integration/Tree.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ Feature: Tree

I want to use Tree

# FIXME: Test is inconsistent, new test will be made after component refactor
# @focus
@focus
Scenario: I should render
Given I render Tree
When I expand all nodes
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/common/When.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ When('I expand all nodes', () => {
cy.scrollTo('bottom', { ensureScrollable: false })

cy.get('ul').then(size => {
if (size.length > initial + 1) {
if (size.length > initial) {
initial = size.length
clickMultiple()
}
Expand Down
6 changes: 3 additions & 3 deletions cypress/support/utils/generators/fakes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,15 @@ export const generateTreeWithNodes = () => {
}

export const generateFakeNodeTree = () => {
const depth = generateNumber(1, 3)
const depth = generateNumber(1, 2)
let level = 0
const namesToMock: string[] = []

const generateNode = (): JSX.Element[] | JSX.Element[][] => {
if (level <= depth) {
level++

const size = generateNumber(1, 3)
const size = generateNumber(1, 2)
const elements: JSX.Element[] = []

for (let i = 0; i < size; i++) {
Expand All @@ -182,7 +182,7 @@ export const generateFakeNodeTree = () => {

return elements
} else {
const size = generateNumber(1, 3)
const size = generateNumber(1, 2)
const elements: JSX.Element[] = []

for (let i = 0; i < size; i++) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flipper-ui",
"version": "0.26.5",
"version": "0.26.6",
"description": "",
"main": "dist/index.js",
"homepage": "https://flipper-ui.ngi.com.br/",
Expand Down

0 comments on commit 7b8d057

Please sign in to comment.