kazurayam / inspectus

The Inspectus library enables automated UI tests in Java/Groovy to perform "Visual Inspection" on top of the "materialstore"
Apache License 2.0
0 stars 0 forks source link

com.kazurayam.inspectus.materialize.discovery.Sitemap and related classes don't work well #104

Closed kazurayam closed 11 months ago

kazurayam commented 11 months ago

derived from

https://github.com/kazurayam/ks_comparingElementScreenshots_using_Inspectus/issues/2

I should start with reviewing the design of com.kazurayam.inspectus.materialize.discovery.Sitemap class.

kazurayam commented 11 months ago

See the source of Sitemap class:

https://github.com/kazurayam/inspectus/blob/0.10.2/src/main/java/com/kazurayam/inspectus/materialize/discovery/Sitemap.java

Sitemap implements methods

This method makes the design of Sitemap class very complicated.

But, is this method really used by someone?

I am afraid not.

kazurayam commented 11 months ago

See

https://github.com/kazurayam/inspectus4katalon-sample-project/blob/0.5.2/Scripts/MyAdmin/materialize/Script1667687365090.groovy

This code is the only code that uses the Sitemap class. You can see that this code does NOT use the deriveTwinTarget(Target base) method.

So, I think that the Sitemap class can be much more simplified.

kazurayam commented 11 months ago

SitempaLoader supports string interpolation "${URL_PREFIX}" => "http://hostname", which simplifies many things

kazurayam commented 11 months ago

I will remove the existing 2 classes

and will rename

kazurayam commented 11 months ago

done at v0.11.0