Skip to content

Commit

Permalink
[Backport 2.x] Fix broken build and failing tests (#574)
Browse files Browse the repository at this point in the history
* Fix broken build and CI

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Change browser to electron

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Increase timeout

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Add Changelog entry

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

---------

Signed-off-by: Ryan Bogan <rbogan@amazon.com>
  • Loading branch information
ryanbogan authored Jan 24, 2024
1 parent 1c65a7f commit a21d2a4
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/cypress-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
- name: Run OpenSearch Dashboards server
run: |
cd OpenSearch-Dashboards
yarn start --no-base-path --no-watch &
yarn start --no-base-path --no-watch --server.host="0.0.0.0" &
shell: bash

- name: Sleep until OSD server starts - windows
Expand Down Expand Up @@ -155,8 +155,9 @@ jobs:
uses: cypress-io/github-action@v5
with:
working-directory: OpenSearch-Dashboards/plugins/dashboards-maps
command: yarn run cypress run --browser chrome
command: yarn run cypress run --browser electron
wait-on: 'http://localhost:5601'
wait-on-timeout: 300
env:
CYPRESS_CACHE_FOLDER: ${{ matrix.cypress_cache_folder }}

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Infrastructure
### Documentation
### Maintenance
* Fix broken build and failing tests [#572](https://github.com/opensearch-project/dashboards-maps/pull/572)
### Refactoring
4 changes: 2 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ module.exports = {
require('@babel/preset-typescript'),
],
plugins: [
require('@babel/plugin-proposal-class-properties'),
require('@babel/plugin-proposal-object-rest-spread'),
require('@babel/plugin-transform-class-properties'),
require('@babel/plugin-transform-object-rest-spread'),
['@babel/plugin-transform-modules-commonjs', { allowTopLevelThis: true }],
[require('@babel/plugin-transform-runtime'), { regenerator: true }],
],
Expand Down
1 change: 1 addition & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const { defineConfig } = require('cypress')

module.exports = defineConfig({
video: true,
defaultCommandTimeout: 120000,
env: {
opensearch_url: 'localhost:9200',
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/documentsLayer.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ describe('Documents layer', () => {
);
cy.get('[data-test-subj="geoFieldSelect"]').should('contain', 'DestLocation');
cy.get(`button[testSubj="styleTab"]`).click();
cy.contains('Fill color').click();
cy.wait(1000).contains('Fill color').click();
cy.get(`button[aria-label="Select #E7664C as the color"]`).click();
cy.contains('Border color').click();
cy.wait(1000).contains('Border color').click();
cy.get(`button[aria-label="Select #DA8B45 as the color"]`).click();
cy.get(`button[testSubj="settingsTab"]`).click();
cy.get('[name="layerName"]').clear().type('Documents layer 1');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ Object {
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
/>
>
<path
d="M5.277 10.088c.02.014.04.03.057.047.582.55 1.134.812 1.666.812.586 0 1.84-.293 3.713-.88L9 6.212V2H7v4.212l-1.723 3.876Zm-.438.987L3.539 14h8.922l-1.32-2.969C9.096 11.677 7.733 12 7 12c-.74 0-1.463-.315-2.161-.925ZM6 2H5V1h6v1h-1v4l3.375 7.594A1 1 0 0 1 12.461 15H3.54a1 1 0 0 1-.914-1.406L6 6V2Z"
/>
</svg>
<div
class="euiFilePicker__promptText"
>
Expand Down Expand Up @@ -294,7 +298,11 @@ Object {
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
/>
>
<path
d="M5.277 10.088c.02.014.04.03.057.047.582.55 1.134.812 1.666.812.586 0 1.84-.293 3.713-.88L9 6.212V2H7v4.212l-1.723 3.876Zm-.438.987L3.539 14h8.922l-1.32-2.969C9.096 11.677 7.733 12 7 12c-.74 0-1.463-.315-2.161-.925ZM6 2H5V1h6v1h-1v4l3.375 7.594A1 1 0 0 1 12.461 15H3.54a1 1 0 0 1-.914-1.406L6 6V2Z"
/>
</svg>
<div
class="euiFilePicker__promptText"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ exports[`render polygon renders filter by polygon option 1`] = `
viewBox="0 0 16 16"
width={16}
xmlns="http://www.w3.org/2000/svg"
/>
>
<path
d="M5.277 10.088c.02.014.04.03.057.047.582.55 1.134.812 1.666.812.586 0 1.84-.293 3.713-.88L9 6.212V2H7v4.212l-1.723 3.876Zm-.438.987L3.539 14h8.922l-1.32-2.969C9.096 11.677 7.733 12 7 12c-.74 0-1.463-.315-2.161-.925ZM6 2H5V1h6v1h-1v4l3.375 7.594A1 1 0 0 1 12.461 15H3.54a1 1 0 0 1-.914-1.406L6 6V2Z"
/>
</svg>
</button>
</div>
</div>
Expand Down

0 comments on commit a21d2a4

Please sign in to comment.