Skip to content

Commit

Permalink
chore: fix tests and change minifier
Browse files Browse the repository at this point in the history
  • Loading branch information
Kabir-Ivan committed Jul 15, 2024
1 parent ed45f7c commit 45a7100
Show file tree
Hide file tree
Showing 16 changed files with 17 additions and 92 deletions.
1 change: 1 addition & 0 deletions lib/static/components/controls/browser-list/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
flex 1 1 auto

.action-button
width 60px
opacity 0

.g-select-list__option:hover
Expand Down
26 changes: 9 additions & 17 deletions lib/static/components/header/summary/dbSummary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import {Dropdown} from 'semantic-ui-react';
import PropTypes from 'prop-types';

import DbBtn from './dbBtn';
import Popup from '../../popup';
import { Popover } from '@gravity-ui/uikit';
import {Popover} from '@gravity-ui/uikit';

export default class DbSummaryKey extends Component {
/*
Expand Down Expand Up @@ -36,25 +35,18 @@ export default class DbSummaryKey extends Component {
<span className={success ? 'db-info__row_success' : 'db-info__row_fail'}>{' ' + status}</span>
</Dropdown.Item>
));
// const additionalInfo = fetchDbDetails.map(({url, status, success}) => (
// <Menu.Item key={url}>
// {' '}
// {url} responded with
// <span className={success ? 'db-info__row_success' : 'db-info__row_fail'}>{' ' + status}</span>
// </Menu.Item>
// ));

return (
<div className='db-info-container'>
<Popover
disablePortal
placement={'bottom'}
content={
additionalInfo
<Popover
disablePortal
placement={'bottom'}
content={
additionalInfo
}
>
<DbBtn fetchDbDetails={fetchDbDetails} />
</Popover>
>
<DbBtn fetchDbDetails={fetchDbDetails} />
</Popover>
</div>
);
}
Expand Down
9 changes: 5 additions & 4 deletions lib/static/components/retry-switcher/item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
hasUnrelatedToScreenshotsErrors,
isFailStatus
} from '../../../common-utils';
import { Button } from '@gravity-ui/uikit';
import {Button} from '@gravity-ui/uikit';

class RetrySwitcherItem extends Component {
static propTypes = {
Expand All @@ -30,9 +30,10 @@ class RetrySwitcherItem extends Component {
updated: 'flat-success',
error: 'flat-danger',
fail: 'flat-utility',
// eslint-disable-next-line camelcase
fail_error: 'flat-utility',
skipped: 'normal',
}
skipped: 'normal'
};

const className = classNames(
'tab-switcher__button',
Expand All @@ -41,7 +42,7 @@ class RetrySwitcherItem extends Component {
{'tab-switcher__button_non-matched': keyToGroupTestsBy && !matchedSelectedGroup}
);

return <Button view={statusToView[status]} selected title={title} className={className} onClick={onClick} qa='retry-switcher'>{attempt + 1}</Button>
return <Button view={statusToView[status]} selected={status !== 'skipped'} title={title} className={className} onClick={onClick} qa='retry-switcher'>{attempt + 1}</Button>;
}
}

Expand Down
66 changes: 1 addition & 65 deletions lib/static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ main.container {
flex-shrink: 0;
}

.section_collapsed .section__title .bullet_type-simple,
.tests-group_collapsed .tests-group__title .tests-group__bullet:before,
.state-title_collapsed.state-title:after {
transform: rotate(180deg);
Expand Down Expand Up @@ -565,74 +566,20 @@ main.container {
opacity: 0.5;
}

.tab-switcher__button_status_success,
.tab-switcher__button_status_updated {
background-color: rgba(123, 204, 123, 1);
border-color: rgba(123, 204, 123, 1);
}

.tab-switcher__button_status_success.tab-switcher__button_non-matched,
.tab-switcher__button_status_updated.tab-switcher__button_non-matched {
background-color: rgba(123, 204, 123, .25);
border-color: rgba(123, 204, 123, .25);
}

.tab-switcher__button_status_error {
background-color: rgba(255, 154, 154, 1);
border-color: rgba(255, 154, 154, 1);
}

.tab-switcher__button_status_error.tab-switcher__button_non-matched {
background-color: rgba(255, 154, 154, .25);
border-color: rgba(255, 154, 154, .25);
}

.tab-switcher__button_status_fail {
--g-button-background-color: #fce0ff;
--g-button-text-color: #bd1993;
--g-button-border-color: #bd1993;
}

.tab-switcher__button_status_fail.tab-switcher__button_non-matched {
background-color: rgba(255, 197, 224, .25);
border-color: rgba(255, 197, 224, .25);
}

.tab-switcher__button_status_fail_error {
--g-button-background-color: #fce0ff;
--g-button-text-color: #bd1993;
--g-button-border-color: #bd1993;
}

.tab-switcher__button_status_fail_error.tab-switcher__button_non-matched {
background: linear-gradient(135deg, rgba(255, 197, 224, .25) 50%, rgba(255, 154, 154, .25) 50%);
border-left-color: rgba(255, 197, 224, .25);
border-top-color: rgba(255, 197, 224, .25);
border-right-color: rgba(255, 154, 154, .25);
border-bottom-color: rgba(255, 154, 154, .25);
}

.tab-switcher__button_status_skipped {
background-color: rgba(204, 204, 204, 1);
border-color: rgba(204, 204, 204, 1);
}

.tab-switcher__button_status_skipped.tab-switcher__button_non-matched {
background-color: rgba(204, 204, 204, .25);
border-color: rgba(204, 204, 204, .25);
}

.tab-switcher__button_non-matched {
color: rgba(0, 0, 0, .25);
}

.tab-switcher .tab-switcher__button:hover {
border-color: #888;
}

.tab-switcher__button.tab-switcher__button_active {
--g-button-border-width: 1px;
border-color: #000;
}

.collapsed,
Expand Down Expand Up @@ -717,10 +664,6 @@ a:active {
margin-top: 5px;
}

/* .details_type_text {
margin-bottom: 10px;
} */

.image-box .details_type_text:last-child {
margin-bottom: 0;
}
Expand All @@ -734,13 +677,6 @@ a:active {
padding: 10px;
}

/* .details_type_text .details__content {
margin: 5px 0;
background-color: #f0f2f5;
padding: 10px;
border-radius: 5px;
} */

.details_type_image .details__content {
margin-top: 10px;
}
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@
"ts-node": "^10.9.1",
"type-fest": "^3.13.1",
"typescript": "^5.0.4",
"uglify-js": "^3.17.4",
"web-vitals": "^1.1.2",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions test/func/packages/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ module.exports = {
minimizer: [
new TerserPlugin({
parallel: true,
minify: TerserPlugin.uglifyJsMinify,
terserOptions: {
annotations: false,
output: {
comments: false
}
Expand Down
Binary file modified test/func/tests/screens/0049570/chrome/retry-switcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/func/tests/screens/07c99c0/chrome/retry-switcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/func/tests/screens/1361a92/chrome/retry-selector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/func/tests/screens/1bb949f/chrome/retry-switcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/func/tests/screens/45b9477/chrome/retry-switcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/func/tests/screens/67cd8d8/chrome/retry-switcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/func/tests/screens/bdf4a21/chrome/retry-switcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/func/tests/screens/d90f7de/chrome/retry-selector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,10 @@ module.exports = {
new CssMinimizerPlugin(),
new TerserPlugin({
parallel: true,
minify: TerserPlugin.uglifyJsMinify,
terserOptions: {
output: {
comments: false
},
annotations: false
}
},
extractComments: false
})
Expand Down

0 comments on commit 45a7100

Please sign in to comment.