Skip to content

Commit

Permalink
FIX-2385 Run desktop tests on windows (#2392)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasbruvik authored Apr 29, 2024
1 parent 31a00b9 commit 4ad4b1b
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 26 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci_desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ permissions: {}
jobs:
desktop:
name: Package and Test
runs-on: ubuntu-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: '20'
- name: Install dependencies
run: yarn
run: yarn --network-timeout 100000
working-directory: ./Src/WitsmlExplorer.Desktop
- name: Package
run: yarn electron:pack
working-directory: ./Src/WitsmlExplorer.Desktop
- name: Test
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn test:pack
run: yarn test:pack
working-directory: ./Src/WitsmlExplorer.Desktop
1 change: 1 addition & 0 deletions Src/WitsmlExplorer.Desktop/electron.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ test.beforeAll(async () => {
});

test.afterAll(async () => {
electronApp.windows()?.forEach((window) => window.close());
await electronApp.close();
});

Expand Down
14 changes: 7 additions & 7 deletions Src/WitsmlExplorer.Frontend/components/Alerts.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Close } from "@mui/icons-material";
import { Alert, AlertTitle, Collapse, IconButton } from "@mui/material";
import { Icon } from "@equinor/eds-core-react";
import { Alert, AlertTitle, Collapse } from "@mui/material";
import { Button } from "components/StyledComponents/Button";
import { useConnectedServer } from "contexts/connectedServerContext";
import OperationContext from "contexts/operationContext";
import { capitalize } from "lodash";
Expand Down Expand Up @@ -101,16 +102,15 @@ const Alerts = (): React.ReactElement => {
<Alert
severity={alert?.severity ?? "error"}
action={
<IconButton
<Button
variant="ghost_icon"
aria-label="close"
color="inherit"
size="small"
onClick={() => {
setAlert(null);
}}
>
<Close fontSize="inherit" />
</IconButton>
<Icon name="clear" />
</Button>
}
>
<AlertTitle>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Accordion, List } from "@equinor/eds-core-react";
import { CloudUpload } from "@mui/icons-material";
import { Accordion, Icon, List } from "@equinor/eds-core-react";
import { Button, Tooltip, Typography } from "@mui/material";
import { StyledAccordionHeader } from "components/Modals/LogComparisonModal";
import ModalDialog from "components/Modals/ModalDialog";
Expand Down Expand Up @@ -113,7 +112,7 @@ const LogDataImportModal = (
variant="contained"
color={"primary"}
component="label"
startIcon={<CloudUpload />}
startIcon={<Icon name="cloudUpload" />}
>
<Typography noWrap>Upload File</Typography>
<input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
Icon,
Typography
} from "@equinor/eds-core-react";
import { CloudUpload } from "@mui/icons-material";
import { StyledAccordionHeader } from "components/Modals/LogComparisonModal";
import {
objectToProperties,
Expand Down Expand Up @@ -318,11 +317,11 @@ const MissingDataAgentModal = (
}}
>
<Button onClick={onClear} variant="outlined">
<Typography>Clear</Typography>
Clear
</Button>
<Button onClick={onImport} variant="outlined">
<CloudUpload />
<Typography noWrap>Import</Typography>
<Icon name="cloudUpload" />
Import
<input
ref={inputFileRef}
type="file"
Expand All @@ -332,7 +331,7 @@ const MissingDataAgentModal = (
/>
</Button>
<Button onClick={onExport} variant="outlined">
<Typography>Export</Typography>
Export
</Button>
</div>
</ModalContentLayout>
Expand Down
1 change: 0 additions & 1 deletion Src/WitsmlExplorer.Frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"@equinor/eds-core-react": "^0.34.0",
"@equinor/eds-tokens": "^0.9.2",
"@microsoft/signalr": "^7.0.0",
"@mui/icons-material": "^5.15.14",
"@mui/lab": "^5.0.0-alpha.169",
"@mui/material": "^5.15.14",
"@mui/styles": "^5.15.14",
Expand Down
2 changes: 2 additions & 0 deletions Src/WitsmlExplorer.Frontend/styles/Icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
clear,
cloud_download as cloudDownload,
cloud_off as cloudOff,
cloud_upload as cloudUpload,
code,
collapse,
compare,
Expand Down Expand Up @@ -68,6 +69,7 @@ const icons = {
clear,
cloudDownload,
cloudOff,
cloudUpload,
code,
collapse,
compare,
Expand Down
7 changes: 0 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -916,13 +916,6 @@
resolved "https://registry.yarnpkg.com/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.15.tgz#2bc2bda50db66c12f10aefec907c48c8f669ef59"
integrity sha512-aXnw29OWQ6I5A47iuWEI6qSSUfH6G/aCsW9KmW3LiFqr7uXZBK4Ks+z8G+qeIub8k0T5CMqlT2q0L+ZJTMrqpg==

"@mui/icons-material@^5.15.14":
version "5.15.15"
resolved "https://registry.yarnpkg.com/@mui/icons-material/-/icons-material-5.15.15.tgz#84ce08225a531d9f5dc5132009d91164b456a0ae"
integrity sha512-kkeU/pe+hABcYDH6Uqy8RmIsr2S/y5bP2rp+Gat4CcRjCcVne6KudS1NrZQhUCRysrTDCAhcbcf9gt+/+pGO2g==
dependencies:
"@babel/runtime" "^7.23.9"

"@mui/lab@^5.0.0-alpha.169":
version "5.0.0-alpha.170"
resolved "https://registry.yarnpkg.com/@mui/lab/-/lab-5.0.0-alpha.170.tgz#4519dfc8d1c51ca54fb9d8b91b95a3733d07be16"
Expand Down

0 comments on commit 4ad4b1b

Please sign in to comment.