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

feat(spec): Create visual error for widget layout tests #3530

Merged
merged 1 commit into from
Dec 21, 2021

Conversation

sclu1034
Copy link
Contributor

@sclu1034 sclu1034 commented Dec 21, 2021

The assert for widget:layout now visualizes the expected and actual
widget structure for comparison.

The "Widget" line is a placeholder. If at a later point utils.widget_stub and calls to it are changed to take an optional widget name, that should be assigned to widget._name and it will show up instead of "Widget".

Example:
image

@codecov
Copy link

codecov bot commented Dec 21, 2021

Codecov Report

Merging #3530 (ea47e4a) into master (70524e7) will decrease coverage by 0.09%.
The diff coverage is 15.25%.

@@            Coverage Diff             @@
##           master    #3530      +/-   ##
==========================================
- Coverage   90.66%   90.57%   -0.10%     
==========================================
  Files         852      852              
  Lines       54440    54490      +50     
==========================================
- Hits        49358    49354       -4     
- Misses       5082     5136      +54     
Flag Coverage Δ
gcov 90.57% <15.25%> (-0.10%) ⬇️
luacov 93.40% <15.25%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
spec/wibox/test_utils.lua 51.96% <15.25%> (-27.78%) ⬇️
spawn.c 82.51% <0.00%> (-3.59%) ⬇️
tests/examples/screen/template.lua 96.52% <0.00%> (-0.22%) ⬇️
lib/awful/widget/tasklist.lua 90.87% <0.00%> (+0.06%) ⬆️

The assert for `widget:layout` now visualizes the expected and actual
widget structure for comparison.

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
@Elv13 Elv13 merged commit 1ab0f89 into awesomeWM:master Dec 21, 2021
@Elv13
Copy link
Member

Elv13 commented Dec 21, 2021

Thanks!

actionless pushed a commit to actionless/awesome that referenced this pull request Jun 29, 2022
The assert for `widget:layout` now visualizes the expected and actual
widget structure for comparison.

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
actionless pushed a commit to actionless/awesome that referenced this pull request May 6, 2023
The assert for `widget:layout` now visualizes the expected and actual
widget structure for comparison.

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants