• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mendersoftware / gui / 897326496

pending completion
897326496

Pull #3752

gitlab-ci

mzedel
chore(e2e): made use of shared timeout & login checking values to remove code duplication

Signed-off-by: Manuel Zedel <manuel.zedel@northern.tech>
Pull Request #3752: chore(e2e-tests): slightly simplified log in test + separated log out test

4395 of 6392 branches covered (68.76%)

8060 of 9780 relevant lines covered (82.41%)

126.17 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

69.23
/src/js/components/common/dialogs/createartifactdialog.js
1
// Copyright 2020 Northern.tech AS
2
//
3
//    Licensed under the Apache License, Version 2.0 (the "License");
4
//    you may not use this file except in compliance with the License.
5
//    You may obtain a copy of the License at
6
//
7
//        http://www.apache.org/licenses/LICENSE-2.0
8
//
9
//    Unless required by applicable law or agreed to in writing, software
10
//    distributed under the License is distributed on an "AS IS" BASIS,
11
//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
//    See the License for the specific language governing permissions and
13
//    limitations under the License.
14
import React from 'react';
15
import { connect } from 'react-redux';
16
import { useNavigate } from 'react-router-dom';
17

18
import { Button, Dialog, DialogActions, DialogContent, DialogTitle } from '@mui/material';
19

20
import { advanceOnboarding, setShowCreateArtifactDialog } from '../../../actions/onboardingActions';
21
import { onboardingSteps } from '../../../constants/onboardingConstants';
22
import CopyCode from '../copy-code';
23

24
const file_modification = `cat >index.html <<EOF
190✔
25
Hello World!
26
EOF
27
`;
28

29
export const CreateArtifactDialog = ({ advanceOnboarding, setShowCreateArtifactDialog, showCreateArtifactDialog = true }) => {
190✔
30
  const navigate = useNavigate();
1✔
31

32
  const onClose = () => {
1✔
33
    navigate('/releases');
×
34
    setShowCreateArtifactDialog(false);
×
35
    advanceOnboarding(onboardingSteps.ARTIFACT_CREATION_DIALOG);
×
36
  };
37

38
  return (
1✔
39
    <Dialog open={showCreateArtifactDialog} fullWidth={true} maxWidth="sm">
40
      <DialogTitle>Creating a new Release</DialogTitle>
41
      <DialogContent className="onboard-dialog dialog-content">
42
        <>
43
          Now we&apos;ll make an update to the webserver demo running on your device, using a new Release that you will create yourself.
44
          <p>
45
            On your workstation, create a new <i>index.html</i> file with the simple contents &apos;Hello world&apos;. This will be the new web page after you
46
            update the application, so you&apos;ll be able to easily see when your device has received the update. Copy and run the command to create the file:
47
          </p>
48
          <CopyCode code={file_modification} withDescription={true} />
49
          <p>When you have done that, click &apos;Next&apos;</p>
50
        </>
51
      </DialogContent>
52
      <DialogActions>
53
        <Button onClick={() => setShowCreateArtifactDialog(false)}>Cancel</Button>
×
54
        <div style={{ flexGrow: 1 }} />
55
        <Button variant="contained" onClick={onClose}>
56
          Next
57
        </Button>
58
      </DialogActions>
59
    </Dialog>
60
  );
61
};
62

63
const actionCreators = { advanceOnboarding, setShowCreateArtifactDialog };
190✔
64

65
const mapStateToProps = state => {
190✔
66
  return {
1✔
67
    showCreateArtifactDialog: state.onboarding.showCreateArtifactDialog
68
  };
69
};
70

71
export default connect(mapStateToProps, actionCreators)(CreateArtifactDialog);
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc