kazurayam / TestClosure

Proof of Concept "TestClosure". This enables executing multiple Groovy Closures simultaneously in a Test Case in Katalon Studio.
https://forum.katalon.com/t/testclosure-executing-groovy-closures-in-test-cases-simultaneously/52436
0 stars 0 forks source link

number of tile columns should be parameterized #12

Closed kazurayam closed 11 months ago

kazurayam commented 11 months ago

v0.1.0, TilingWindowLayoutMetrics

    @Override
    public Dimension getWindowDimension(final int windowIndex) {
        if (windowIndex < 0 || windowIndex >= this.size) {
            throw new IllegalArgumentException("windowIndex=" + String.valueOf(windowIndex) + " must not be <0 and >=size");
        }

        if (size == 1) {
            return virtualScreenSize;
        } else {
            // Tiles in 2 columns
            int width = (int) Math.floor(virtualScreenSize.getWidth() / 2);
            int rows = (int) Math.ceil(this.size / 2);
            int height = (int) Math.floor(virtualScreenSize.getHeight() / rows);
            return new Dimension(width, height);
        }
    }

If the size is greater than 1, then the tiles will always be layouted in 2 columns. Fixed.

I want 4 tiles arranged in a single column like this:

kazurayam commented 11 months ago

done at v0.2.0 of the browserwindowlayout libary.

The TestClosure project should use it.

kazurayam commented 11 months ago

done at v0.23.3