Refactor driver for E2E (#843)

This is basically the content of #841 with the code review changes and
relevant fixes to tests/driver code to pass the tests.
CC: @ShellyDCMS

After this we should lint the project and add the lint to the CI to make
sure it doesn't break.

---------

Co-authored-by: ShellyDCMS <60476837+ShellyDCMS@users.noreply.github.com>
Co-authored-by: shelly_goldblit <shelly_goldblit@dell.com>
This commit is contained in:
Harel M
2023-12-20 16:34:46 +02:00
committed by GitHub
parent f219ff1e17
commit 4d1e2e6893
19 changed files with 3386 additions and 4278 deletions

View File

@@ -682,7 +682,7 @@ export default class App extends React.Component {
elementStyle.filter = `url('#${filterName}')`;
}
return <div style={elementStyle} className="maputnik-map__container">
return <div style={elementStyle} className="maputnik-map__container" data-wd-key="maplibre:container">
{mapElement}
</div>
}

View File

@@ -244,12 +244,13 @@ export default class AppToolbar extends React.Component {
<label>View
<select
className="maputnik-select"
data-wd-key="maputnik-select"
onChange={(e) => this.handleSelection(e.target.value)}
value={currentView.id}
>
{views.filter(v => v.group === "general").map((item) => {
return (
<option key={item.id} value={item.id} disabled={item.disabled}>
<option key={item.id} value={item.id} disabled={item.disabled} data-wd-key={item.id}>
{item.title}
</option>
);

View File

@@ -305,7 +305,7 @@ export default class LayerEditor extends React.Component {
onSelection={handleSelection}
closeOnSelection={false}
>
<Button id="skip-target-layer-editor" className='more-menu__button' title="Layer options">
<Button id="skip-target-layer-editor" data-wd-key="skip-target-layer-editor" className='more-menu__button' title="Layer options">
<MdMoreVert className="more-menu__button__svg" />
</Button>
<Menu>

View File

@@ -286,6 +286,7 @@ class LayerListContainer extends React.Component {
<div className="maputnik-multibutton">
<button
id="skip-target-layer-list"
data-wd-key="skip-target-layer-list"
onClick={this.toggleLayers}
className="maputnik-button">
{this.state.areAllGroupsExpanded === true ? "Collapse" : "Expand"}

View File

@@ -230,6 +230,7 @@ export default class MapMaplibreGl extends React.Component {
role="region"
aria-label="Map view"
ref={x => this.container = x}
data-wd-key="maplibre:map"
></div>
}
else {