lemon-toothbrush-55306
07/15/2022, 7:26 AMlemon-toothbrush-55306
07/15/2022, 7:27 AMjs
import { useTranslation } from 'react-i18next';
describe('Open App', () => {
const { t } = useTranslation();
beforeEach(() => {
cy.visit('/');
});
it('Frontpage can be opened', () => {
cy.contains('example@gmail.com');
});
it('Login can be opened', () => {
cy.get('input:first').type('adrianmsm91@gmail.com');
cy.get('input:last').type('111111');
cy.contains(t('pages.authentication.login.signIn')).click();
});
});
lemon-toothbrush-55306
07/15/2022, 7:27 AMagreeable-twilight-91159
07/15/2022, 10:39 AMcareful-computer-31749
07/15/2022, 11:37 AMnice-lawyer-99289
07/15/2022, 11:56 AMnice-lawyer-99289
07/15/2022, 12:00 PMreact-i18next
is a library for react framework. Keep in mind, that your Cypress tests are kinda another application that is being run to evaluate the react one. These two pieces do not share a state or anything like this. They are two independent processes but within the same repository. Also, if I might suggest, I'd not search elements by text if it's possible and that's what you're trying to do. Instead, try to use a css locator or ask the developers to add a custom one only for testing purposes. I hope it makes sensemagnificent-finland-58048
07/15/2022, 1:08 PMbitter-match-90736
07/15/2022, 1:15 PMbitter-match-90736
07/15/2022, 1:17 PMbitter-match-90736
07/15/2022, 1:18 PMmagnificent-finland-58048
07/15/2022, 1:18 PMmagnificent-finland-58048
07/15/2022, 1:19 PMbitter-match-90736
07/15/2022, 1:19 PMbitter-match-90736
07/15/2022, 1:20 PMmagnificent-finland-58048
07/15/2022, 1:20 PMmagnificent-finland-58048
07/15/2022, 1:20 PMbitter-match-90736
07/15/2022, 1:22 PMbitter-match-90736
07/15/2022, 1:50 PMmagnificent-finland-58048
07/15/2022, 1:54 PMbrash-ghost-16880
07/15/2022, 2:06 PMbitter-match-90736
07/15/2022, 2:11 PMbrash-ghost-16880
07/15/2022, 2:13 PMbrash-ghost-16880
07/15/2022, 2:13 PMbitter-match-90736
07/15/2022, 2:13 PMbitter-match-90736
07/15/2022, 2:15 PMbrash-ghost-16880
07/15/2022, 2:15 PMnice-lawyer-99289
07/15/2022, 2:15 PMbrash-ghost-16880
07/15/2022, 2:17 PMbitter-match-90736
07/15/2022, 2:17 PM