Skip to content

Commit

Permalink
fix: Add aria lable to custom editor and adjust e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Müller committed Apr 19, 2024
1 parent 690499b commit 6581fdd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions cypress/integration/editPanel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,13 @@ describe('Open test dashboard with geomap panel and enter edit mode', () => {
ariaLabelsSelectors.baseLayerField().contains('div', baseLayerName).should('be.visible');

e2e.components.PanelEditor.OptionsPane.content().
within(() => {
ariaLabelsSelectors.urlField().should('be.visible').within((subject) => {
e2e().get('input', {withinSubject: subject}).type(wmsUrl, {force: true}).
within(() => {
ariaLabelsSelectors.urlField().should('be.visible').type(wmsUrl, {force: true}).
trigger("keyup", { keyCode: 13, which: 13 }).
should('have.value', wmsUrl);
});
}
);
);

e2e.components.PanelEditor.applyButton().click({force: true});

Expand Down
2 changes: 1 addition & 1 deletion src/e2eTestIds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export const testIds = {

export const ariaLabels = {
baseLayerField: 'Base layer Base layer field property editor',
urlField: 'Layer config URL * field property editor',
urlField: 'URL input',
};
2 changes: 1 addition & 1 deletion src/editor/CustomWMSBasemapEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const CustomWMSBasemapEditor = ({ item, value, onChange, context }: Props
{/* <Label description={'URL to WMS endpoint (required)'}>
URL
</Label> */}
<Input value={url}
<Input value={url} aria-label="URL input"
onChange={e => {
setURL(e.currentTarget.value);
setOptions([]);
Expand Down

0 comments on commit 6581fdd

Please sign in to comment.