Cypress test. Feedback button. (#2637)

* Add css class

* Cypress test. Feedback button, popover content

* Rework check a.href value

Co-authored-by: Kruchinin <dmitryx.kruchinin@intel.com>
main
Dmitry Kruchinin 5 years ago committed by GitHub
parent a7a23d4bfa
commit 41626ebabf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -107,6 +107,7 @@ export default function Feedback(): JSX.Element {
title={<Text className='cvat-text-color'>Help to make CVAT better</Text>}
content={renderContent()}
visible={visible}
overlayClassName='cvat-feedback-popover'
>
<Button
style={visible ? { color: '#ff4d4f' } : {}}

@ -0,0 +1,46 @@
// Copyright (C) 2020 Intel Corporation
//
// SPDX-License-Identifier: MIT
/// <reference types="cypress" />
context('Check feedback button.', () => {
const caseId = '38';
before(() => {
cy.visit('auth/login');
cy.login();
});
describe(`Testing case "${caseId}"`, () => {
it('Feedback button is available.', () => {
cy.get('.cvat-feedback-button').should('be.visible').click();
});
it('Feedback popover is available. Check content.', () => {
cy.get('.cvat-feedback-popover')
.should('be.visible')
.within(() => {
cy.get('a').then(($a) => {
expect($a.length).be.equal(3);
expect($a[0].href).be.eq('https://github.com/openvinotoolkit/cvat');
expect($a[1].href).be.eq('https://gitter.im/opencv-cvat/public');
expect($a[2].href).be.eq($a[1].href);
});
const socialNetworkList = [
'facebook',
'vk',
'twitter',
'reddit',
'linkedin',
'telegram',
'whatsapp',
'viber',
];
socialNetworkList.forEach(($el) => {
cy.get(`[aria-label=${$el}]`).should('be.visible');
});
});
});
});
});
Loading…
Cancel
Save