Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add alternative light designs and introduce unit and integration tests #1

Merged
merged 14 commits into from
Mar 1, 2024

Conversation

jackw
Copy link
Owner

@jackw jackw commented Feb 20, 2024

  • Add a new option to select different traffic light styles (default, rounded, side-lights)
    image
  • Add some basic tests for utils
  • Add plugin-e2e package with playwright for e2e tests
  • Fixes bugs with calculateRowsAndColumns where itemcount and containerWidth weren't being considered causing potential layout breakages
  • Fixes the following layout bug with calculateRowsAndColumns using data.series.length causing broken layouts due to returning a different length to useData's values (which we should consider the source of truth).
Before After
Screenshot 2024-03-04 at 09 30 29 Screenshot 2024-03-04 at 09 30 58

@jackw jackw added the enhancement New feature or request label Feb 20, 2024
@jackw jackw self-assigned this Feb 20, 2024
@jackw jackw changed the title Tests: Introduce unit and integration tests Feature: Add alternative light designs and introduce unit and integration tests Feb 20, 2024
Copy link

@sunker sunker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks cool! Added a few comments on the playwright tests.

await panelEditPage.getQueryEditorRow('A').getByText('Scenario').click();
await page.keyboard.insertText('CSV Content');
await page.keyboard.press('Enter');
await page.waitForFunction(() => (window as any).monaco);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't think you need this cast - plugin-e2e already defines monaco as global.

tests/traffic-light.spec.ts Outdated Show resolved Hide resolved
tests/traffic-light.spec.ts Outdated Show resolved Hide resolved
tests/traffic-light.spec.ts Show resolved Hide resolved
tests/unsupported-state.spec.ts Outdated Show resolved Hide resolved
tests/unsupported-state.spec.ts Outdated Show resolved Hide resolved
tests/unsupported-state.spec.ts Outdated Show resolved Hide resolved
@jackw jackw merged commit 7cf2cb6 into main Mar 1, 2024
1 check passed
@jackw jackw deleted the jackw/add-tests branch March 1, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants