Commit Graph

650 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee b23a2e81c5 tests: Stop using the legacy layoutbox constructor.
(done in a commit so the CI can test some commits with the old
constructor)
2019-10-05 22:57:05 -04:00
Emmanuel Lepage Vallee cbb90d8bd1 root: Turn `root.keys()` into a property. 2019-10-05 18:06:51 -04:00
Emmanuel Lepage Vallee 296ad18922 client: Move the `c:keys()` method to a property. 2019-10-05 18:06:51 -04:00
Emmanuel Lepage Vallee 29e804a4f8 drawin: Turn `:buttons()` into a property. 2019-10-05 18:06:51 -04:00
Emmanuel Lepage Vallee d5dd3fc794 tests: Test root.buttons
Try both legacy and standardized code paths. Also try invalid mixes of
them in case some modules abuse of rc.lua and ingest the wrong format
by accident.
2019-10-05 18:06:51 -04:00
Emmanuel Lepage Vallee 141aca2432 root.buttons: Move to Lua.
This is the groundwork commit to support using `awful.button` objects in
`root.buttons`.
2019-10-05 18:06:51 -04:00
Emmanuel Lepage Vallee b1c81c4258 awful: Set a miss handler for capi.root
There is no better place to put it and need to always be required
for backward compatibility. Given Awesome no longer works properly
without `awful`, I put the code there.
2019-10-05 18:06:50 -04:00
Emmanuel Lepage Vallee 95500ea71c root: Add support for setting a miss handler.
This will allow to port some functions from C to Lua, such as supporting
`awful.key` directly when setting the buttons.
2019-10-05 18:06:50 -04:00
Emmanuel Lepage Vallee 3aafa64ea7 tests: Import the backward compatibility API for all the tests.
This isn't very nice and pulls all sort of almost useless code into
the shims, making them less atomic. However the next few commits
will start another round of API standardization and the compatibility
layer wont be optional anymore.
2019-10-05 18:06:50 -04:00
Aire-One dd69936bed Add a `gen_vertical_space` function to keep spacing from missalignment. 2019-10-05 17:16:22 -04:00
Aire-One 4abb05c590 Align timeline dots and text. 2019-10-05 17:16:22 -04:00
Emmanuel Lepage Vallée ffe7c4d1cc Apply suggestions from code review
Thanks to @Aire-one for those fixes!

Co-Authored-By: Aire-One <Aire-One@users.noreply.github.com>
2019-10-05 17:16:22 -04:00
Emmanuel Lepage Vallee c2a2c789e6 doc: Add example sequences for the tags. 2019-10-05 17:16:22 -04:00
Emmanuel Lepage Vallee fa2433192a doc: Add some screen example sequences. 2019-10-05 17:16:22 -04:00
Emmanuel Lepage Vallee 271e2822a7 build: Allow Awesome to be built with luarock LGI. 2019-10-05 17:16:22 -04:00
Emmanuel Lepage Vallee 9c0e16e623 doc: Add examples for the various maximization. 2019-10-05 17:16:22 -04:00
Emmanuel Lepage Vallee 12f28305a0 tests: Add a sequence template.
This template allows to display a sequence of events for the clients,
tags and screens. Currently, it is hard to display images where the
state of an object is more complex than "here how it was before" and
"here how it is now". With this template, it is possible to have a
timeline of events from the initial states to the final states.

Now, as the line count shows, this isn't small. It is in fact an
enormous template. Worst still, this commit is the first *half* of
it. The second half adds the ability to `print()`, display
inline code and support mouse and keyboard events. The code also isn't
world class. Maintaining this template might be non-trivial in the
long run. I am fully aware of those issues. On the other hand, there
is ~100 places where this will be used once the entire
"new rule library" project is completed. This will bring the ~1.2k
line of code to ~12 lines per consumer. From that point of view,
it makes a lot more sense to merge this given how useful it is
at explaining changes within the "core objects".

It is also important to keep in mind that there is currently very
little or no documentation (beside the mandatory one-liner summary)
for these concepts. Those are the most important aspects of AwesomeWM
API and they are the least documented. This is just wrong.
2019-10-05 17:16:22 -04:00
Emmanuel Lepage Vallee 6b4b09adc5 doc: Fix the UML template svg generation.
It was mixing the actual HTML relative path with the build directory
path. This doesn't work universally. It didn't work on `awesome-www`
builder.
2019-10-01 02:07:05 -04:00
Emmanuel Lepage Vallée 85c8d5e205
Merge pull request #2854 from Elv13/uml_magic
Add some navigation helpers to the doc (in the form of UML tables)
2019-10-01 00:56:20 -04:00
Emmanuel Lepage Vallee 0419de2a60 tests: Test the screen name. 2019-09-30 00:49:40 -04:00
Emmanuel Lepage Vallee 994034934e tests: Test `s:split()`. 2019-09-29 19:07:24 -04:00
Emmanuel Lepage Vallee 3a12e6d274 tests: Test Lua side screen management. 2019-09-29 19:07:24 -04:00
Emmanuel Lepage Vallee 68488f6218 tests: Test screen.automatic_factory 2019-09-29 18:56:06 -04:00
Emmanuel Lepage Vallee 553cafccde tests: Test the error notifications when no screens are present.
This happens in early initialization when AwesomeWM is started with
`--screen manual`.
2019-09-29 18:56:06 -04:00
Emmanuel Lepage Vallee 067f8f4ebf tests: Use --screen manual for both code coverage jobs. 2019-09-29 18:56:06 -04:00
Emmanuel Lepage Vallee 53fc364ede shims: Update to handle Lua-side screen managment. 2019-09-29 18:20:15 -04:00
Emmanuel Lepage Vallee fa7f1d689e tests: Change only_on_screen to create fake screens "in sight".
Previously, it would create screens outside of a visible output area. In
the following commit, this will be tracked and a warning is printed when
it happens. This makes the test fail.
2019-09-29 18:20:15 -04:00
Uli Schlachter 0bc22aea85 client shims: Remove some duplicate code
Both commit 44e6b2d24e and 4eda67ce54 added the same function to this
file (and by the commit message, the later was intended to do so, while
the former has an unrelated commit message (but does not contain any
other changes)).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-09-21 13:44:38 +02:00
Daniel Hahler dc98eade3b
naughty: fix extra newline with only title/message (#2870)
* tests/test-naughty-legacy.lua: s/counter/added_counter

* naughty: fix extra newline with only title/message

With only title or message it should not have an extra newline.

Fixes: https://github.com/awesomeWM/awesome/commit/423aeebe8#commitcomment-35062951
2019-09-19 02:11:18 +02:00
Daniel Hahler caf9a26660
tests: runner.run_steps: add fname/lnum for failed steps (#2877) 2019-09-14 14:35:20 +02:00
Daniel Hahler 13ea02eeeb
tests/run.sh: do not export XDG_CONFIG_HOME (#2876)
Only set it for the "awesome" process invocation.
2019-09-13 17:55:27 +02:00
Daniel Hahler 9b86a03b66
tests: do not export build_dir (#2875)
If really necessary this should be an uppercased var, but it is only
used with test-gravity.lua, where we can just rely on `$PWD` being the
build dir.
2019-09-13 17:55:06 +02:00
Daniel Hahler 4c31a0f745
tests: improve test-selection-transfer: use "wait_per_step" option (#2874)
* test-selection-transfer: clarify comment / condense

Noticed this via flaky coverage for the check after the "wait_a_bit"
block.

Ref: https://codecov.io/gh/awesomeWM/awesome/pull/2872/changes#L193

* tests/_runner.lua: add support for wait_per_step
2019-09-13 16:39:40 +02:00
Daniel Hahler a7674f2359
tests/run.sh: output "awesome --version" (#2872)
Might be good to have a short version of it (single line), but extra
lines are indented, so this seems to be OK.

This helps / shows when the built version is not up-to-date (e.g. after
git-bisect), and serves as a basic check that it can be run in the first
place.
2019-09-13 16:02:22 +02:00
Daniel Hahler 0cbf536269
test-naughty-legacy.lua: harden/cleanup (#2873) 2019-09-13 16:00:51 +02:00
Emmanuel Lepage Vallée f1335be21a
Merge pull request #2855 from Elv13/screen_geo_template
doc: Add some images to represent the various area of a screen.
2019-08-25 15:48:18 -04:00
Aire-One d97dccfa1f doc: Improve the screen padding image.
It now shows the padding instead of the tiling area.
2019-08-25 15:35:17 -04:00
Emmanuel Lepage Vallee 602d6ded07 doc: Add some images to represent the various area of a screen. 2019-08-19 01:48:00 -04:00
Emmanuel Lepage Vallee f0bf0df6f0 doc: Add an UML class diagram like table of cardinalities.
It will help users find how to get some objects from other objects.
2019-08-19 01:19:32 -04:00
Emmanuel Lepage Vallee c48b03ca9c doc: Help the examples with text but no images get generated more often.
In case of error, well, make an error, but update the content anyway.
This will be enough for the CI but makes development less painful.

Also update the cmake targets to re-generate them more often.
2019-08-19 00:24:14 -04:00
Emmanuel Lepage Vallee 6cb54db6c1 tests: Fix tag:clients() in the shims 2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee 84a0ca56a2 tests: Implement dynamic properties for the client shims.
This way enough signal are sent to display clients modified by the
rules.
2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee 9283719bfb tests: Implement the fake_* screen methods 2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee f0b6e36ac1 tests: Implement mouse.screen properly 2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee e8c1463ce3 tests: Compute root.size() cxorrectly 2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee 4eda67ce54 tests: Add the struts to the shims 2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee 44e6b2d24e shims: Always return something for c:tags() 2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee 48f973f2eb tests: Add awesome.xrdb_get_value to the shims 2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee ef508462b8 shims: Add a better error message when mouse.screen is called too early. 2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee d3a0dcffcd tests: Add client:kill() to the shims. 2019-08-18 02:44:34 -04:00