Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cypress test. Reset password notification. #3141

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (C) 2021 Intel Corporation
//
// SPDX-License-Identifier: MIT

/// <reference types="cypress" />

context('Reset password notification.', () => {
const caseId = '73';
const dummyEmail = 'admin@local.local'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use email from cypress.json?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look for my comment above. I got an error.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, didn't notice your comment.


before(() => {
cy.visit('auth/login');
});

describe(`Testing case "${caseId}"`, () => {
it('"Forgot password?" link available.', () => {
cy.get('a[href="/auth/password/reset"]').should('exist').and('be.visible').click();
});

it('Sending a password reset request', () => {
cy.get('#email').type(dummyEmail);
cy.get('.cvat-reset-password-form-button').click();
cy.contains('Check your email').should('be.visible');
});
});
});