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

refactor: 🔧 Update dancelight smoketests #867

Open
wants to merge 32 commits into
base: master
Choose a base branch
from

Conversation

timbrinded
Copy link
Contributor

@timbrinded timbrinded commented Feb 10, 2025

Updates to the dancelight smoke tests to make more robust.

  • Importing the generated interfaces so tests are type safe
  • Reworked some state consistency checks so they don't halt on first failure
  • Fixed type annotations to remove any, so future inconsistencies get flagged in IDE

image

@timbrinded timbrinded added B0-silent Changes should not be mentioned in any release notes D2-notlive PR doesn't change runtime/client code labels Feb 10, 2025
const sessionIndex = (await api.query.session.currentIndex()).toNumber();
const assignmentCollatorKey = (
await api.query.tanssiAuthorityAssignment.collatorContainerChain(sessionIndex)
).toJSON();
Copy link
Contributor

Choose a reason for hiding this comment

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

We abuse toJSON because it makes it easier to see the diff when an expect fails. Can you verify that expect(assignmentCollatorKey).toBeNull() shows a nice error message with the assignmentCollatorKey?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will check. Problem about using toJSON() is that it casts it to any. What we currently have is that it will show you an error without even having to run the tests

Copy link
Contributor

Choose a reason for hiding this comment

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

@timbrinded please check this expect thing

Copy link
Contributor

github-actions bot commented Feb 10, 2025

WASM runtime size check:

Compared to target branch

dancebox runtime: 1416 KB (no changes) ✅

flashbox runtime: 824 KB (no changes) ✅

dancelight runtime: 2172 KB (+2172 KB) ⚠️

container chain template simple runtime: 1116 KB (-4304 KB) ✅

container chain template frontier runtime: 1404 KB (-5156 KB) ✅

Copy link
Contributor

github-actions bot commented Feb 10, 2025

Coverage Report

(master)

@@                        Coverage Diff                        @@
##           master   feat/add-relay-types-interface     +/-   ##
=================================================================
  Coverage   65.97%                           65.97%   0.00%     
  Files         339                              339             
  Lines       59084                            59084             
=================================================================
  Hits        38978                            38978             
  Misses      20106                            20106             
Files Changed Coverage

Coverage generated Wed Feb 12 10:33:26 UTC 2025

Base automatically changed from refactor/switch-biome to master February 11, 2025 18:43
@girazoki
Copy link
Contributor

@timbrinded can you merge master back to see the actual changes?

@timbrinded timbrinded marked this pull request as ready for review February 13, 2025 20:22
@timbrinded timbrinded requested review from a team February 13, 2025 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B0-silent Changes should not be mentioned in any release notes D2-notlive PR doesn't change runtime/client code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants