qe-fe-automation
Version:
FE test automation framework using cypress
29 lines (25 loc) • 981 B
text/typescript
import { AdminInterceptsApis, LoginPage } from '@admin-lib/index';
import { Utility } from '@utility-lib/index';
import { Provider_Type, User_Type } from '@support-onboard/index';
const newUserCredentials = Cypress.env('newUser').NEW_USER_PASSWORD;
describe('Admin: Localization', () => {
let userEmail: string;
beforeEach(() => {
LoginPage.createNewCompanyAndLoginWithUserByType({
providers: [Provider_Type.SABRE_FLIGHT],
users: [User_Type.ADMIN],
locale: 'de-DE'
});
cy.task('getDataFromCache', 'userEmail').then((email: any) => {
userEmail = email;
});
LoginPage.clearExistingLoginSession();
AdminInterceptsApis.interceptAdminsApis();
});
it('C351749: Non-english user can login', { tags: ['@tier1'] }, () => {
Utility.changeBrowserLanguageTo('de');
LoginPage.visitTALoginPage('Willkommen bei');
LoginPage.loginWithCredentials(userEmail, newUserCredentials);
LoginPage.waitForLoadLoginPage();
});
});