* Add initial classes * Add TelemetryProviders * Add new NodeCountService.cs and NodeTelemetryProvider * Add data contract attribute to UsageInformation Otherwise it wont serialize correctly * Implement more providers * Fix builders and propertyEditorTelemetry * Add MediaTelemetryProvider * Add MediaTelemetryProvider * Fix doubling of media telemetry * Move contentCount from NodeCountTelemetryProvider and move to ContentTelemetryProvider * Revert ContentTelemetryProvider changes * Add detailed information to TelemetryService * Add integration tests * Add more tests and todos for tests * Fix stylecop warnings * Use yield return instead of instantiating local list * Implement Macro test * Inject interface instead of implementation in TelemetryService * Fix TelemetryServiceTests.cs * Implement media tests * Implement propertyTypeTests * Implement constants instead of hardcoded strings * Add SystemInformationTelemetryProvider * Use SystemInformationTableDataProvider in UserDataService * Implement more properties * Add UsageInformation * Replace UserDataService with SystemInformationTelemetryProvider * Undo changes to UserDataService and obsolete it * Remove ISystemInformationTableDataProvider * Register SystemInformationTelemetryProvider as telemetry provider * Use constants for telemetry names * Make UserDataServiceTests test SystemInformationTelemetryProvider instead * Update UserDataServiceTests to cover new data * Add unit tests * Add integration test testing expected data is returned * Implement Analytics dashboard * Improve assertion message * Add text and styling to analyticspage * Rename consent to analytic * implement save button for consent level * Implement save button * Fix system information test * Add TelemetryResource * Move telemetry providers to infrastructure * Add database provider to system information * Set startvalue for slider * Fix unit tests * Implement MetricsConsentService using KeyValueService * Return void hen setting the telemetry level * fix startposition when not reloading * Add a couple tests * Update src/Umbraco.Core/Services/MetricsConsentService.cs * Rename ConsentLevel.cs * Use direct Enum instead of parsing * rename consent resource * add lazy database * refactor slider * Implement ng-if and propers pips * Make classes internal * Fix slider not loading when navigating to tab * Add telemetry level check to TelemetryService.cs * Add Consent for analytics text * Fix build errors for unit tests * Fix TelemetryServiceTests * revert package-lock.json * Fix integration test * Update slider * Update TelemetryService.cs * Apply suggestions from code review Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk> Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
46 lines
1.7 KiB
TypeScript
46 lines
1.7 KiB
TypeScript
/// <reference types="Cypress" />
|
|
|
|
function openSystemInformation(){
|
|
//We have to wait for page to load, if the site is slow
|
|
cy.get('[data-element="global-help"]').should('be.visible').click();
|
|
cy.get('.umb-help-list-item').last().should('be.visible').click();
|
|
cy.get('.umb-drawer-content').scrollTo('bottom', {ensureScrollable : false});
|
|
}
|
|
|
|
context('System Information', () => {
|
|
|
|
beforeEach(() => {
|
|
//arrange
|
|
cy.umbracoLogin(Cypress.env('username'), Cypress.env('password'));
|
|
cy.umbracoSetCurrentUserLanguage('en-US');
|
|
});
|
|
afterEach(() => {
|
|
cy.umbracoSetCurrentUserLanguage('en-US');
|
|
});
|
|
|
|
it('Check System Info Displays', () => {
|
|
openSystemInformation();
|
|
cy.get('.table').find('tr').should('have.length', 13);
|
|
cy.contains('Current Culture').parent().should('contain', 'en-US');
|
|
cy.contains('Current UI Culture').parent().should('contain', 'en-US');
|
|
});
|
|
|
|
it('Checks language displays correctly after switching', () => {
|
|
|
|
//Navigate to edit user and change language
|
|
cy.umbracoGlobalUser().click();
|
|
cy.get('[alias="editUser"]').click();
|
|
cy.get('[name="culture"]').select('string:da-DK', { force: true});
|
|
cy.umbracoButtonByLabelKey('buttons_save').click({force: true});
|
|
cy.umbracoSuccessNotification().should('be.visible');
|
|
|
|
openSystemInformation();
|
|
//Assert
|
|
cy.contains('Current Culture').parent().should('contain', 'da-DK');
|
|
cy.contains('Current UI Culture').parent().should('contain', 'da-DK');
|
|
cy.get('.umb-button__content').last().click();
|
|
//Clean
|
|
cy.umbracoSetCurrentUserLanguage('en-US');
|
|
});
|
|
});
|