mirror of
https://github.com/zitadel/zitadel.git
synced 2025-06-21 22:18:34 +00:00
fix some tests
This commit is contained in:
parent
960bb91de3
commit
6a47d37a6c
@ -12,7 +12,7 @@ describe('humans', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
login(user);
|
login(user);
|
||||||
cy.visit(humansPath);
|
cy.visit(humansPath);
|
||||||
cy.get('[data-cy=timestamp]');
|
cy.get('[data-e2e=timestamp]');
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('add', () => {
|
describe('add', () => {
|
||||||
@ -23,7 +23,7 @@ describe('humans', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should add a user', () => {
|
it('should add a user', () => {
|
||||||
cy.get('a[href="/users/create"]').click();
|
cy.get('[data-e2e="create-user-button"]').click();
|
||||||
cy.url().should('contain', 'users/create');
|
cy.url().should('contain', 'users/create');
|
||||||
cy.get('[formcontrolname="email"]').type(username('e2ehuman'));
|
cy.get('[formcontrolname="email"]').type(username('e2ehuman'));
|
||||||
//force needed due to the prefilled username prefix
|
//force needed due to the prefilled username prefix
|
||||||
|
@ -12,7 +12,7 @@ describe('machines', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
login(user);
|
login(user);
|
||||||
cy.visit(machinesPath);
|
cy.visit(machinesPath);
|
||||||
cy.get('[data-cy=timestamp]');
|
cy.get('[data-e2e=timestamp]');
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('add', () => {
|
describe('add', () => {
|
||||||
@ -23,7 +23,7 @@ describe('machines', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should add a machine', () => {
|
it('should add a machine', () => {
|
||||||
cy.get('a[href="/users/create-machine"]').click();
|
cy.get('[data-e2e="create-user-button"]').click();
|
||||||
cy.url().should('contain', 'users/create-machine');
|
cy.url().should('contain', 'users/create-machine');
|
||||||
//force needed due to the prefilled username prefix
|
//force needed due to the prefilled username prefix
|
||||||
cy.get('[formcontrolname="userName"]').type(testMachineUserNameAdd, { force: true });
|
cy.get('[formcontrolname="userName"]').type(testMachineUserNameAdd, { force: true });
|
||||||
|
@ -24,7 +24,7 @@ describe('permissions', () => {
|
|||||||
api = apiCalls
|
api = apiCalls
|
||||||
ensureProjectExists(apiCalls, testProjectName).then(projId => {
|
ensureProjectExists(apiCalls, testProjectName).then(projId => {
|
||||||
projectId = projId
|
projectId = projId
|
||||||
cy.visit(`${Cypress.env('baseUrl')}/ui/console/projects/${projId}`)
|
cy.visit(`${Cypress.env('baseUrl')}/ui/console/projects/${projId}?id=roles`)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -42,10 +42,10 @@ describe('projects', () => {
|
|||||||
|
|
||||||
it('removes the project', () => {
|
it('removes the project', () => {
|
||||||
cy.get('[data-e2e=toggle-grid]').click();
|
cy.get('[data-e2e=toggle-grid]').click();
|
||||||
cy.get('[data-cy=timestamp]');
|
cy.get('[data-e2e=timestamp]');
|
||||||
cy.contains('tr', testProjectNameDeleteList, { timeout: 1000 })
|
cy.contains('tr', testProjectNameDeleteList, { timeout: 1000 })
|
||||||
.find('[data-e2e=delete-project-button]')
|
.find('[data-e2e=table-actions-button]')
|
||||||
.click({ force: true });
|
.click({force: true});
|
||||||
cy.get('[e2e-data="confirm-dialog-button"]').click();
|
cy.get('[e2e-data="confirm-dialog-button"]').click();
|
||||||
cy.get('.data-e2e-success');
|
cy.get('.data-e2e-success');
|
||||||
cy.wait(200);
|
cy.wait(200);
|
||||||
@ -66,6 +66,7 @@ describe('projects', () => {
|
|||||||
.find('[data-e2e=delete-project-button]')
|
.find('[data-e2e=delete-project-button]')
|
||||||
.trigger('mouseover')
|
.trigger('mouseover')
|
||||||
.click();
|
.click();
|
||||||
|
cy.get('[e2e-data="confirm-dialog-input"]').type(testProjectNameDeleteGrid);
|
||||||
cy.get('[e2e-data="confirm-dialog-button"]').click();
|
cy.get('[e2e-data="confirm-dialog-button"]').click();
|
||||||
cy.get('.data-e2e-success');
|
cy.get('.data-e2e-success');
|
||||||
cy.wait(200);
|
cy.wait(200);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<p class="length">
|
<p class="length">
|
||||||
<span>{{ length }} </span>{{ 'PAGINATOR.COUNT' | translate }}
|
<span>{{ length }} </span>{{ 'PAGINATOR.COUNT' | translate }}
|
||||||
</p>
|
</p>
|
||||||
<p class="ts cnsl-secondary-text" *ngIf="timestamp">
|
<p class="ts cnsl-secondary-text" *ngIf="timestamp" [attr.data-e2e]="'timestamp'">
|
||||||
{{ timestamp | timestampToDate | localizedDate: 'EEEE dd. MMM YYYY, HH:mm' }}
|
{{ timestamp | timestampToDate | localizedDate: 'EEEE dd. MMM YYYY, HH:mm' }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
<ng-content select="[hoverActions]"></ng-content>
|
<ng-content select="[hoverActions]"></ng-content>
|
||||||
<ng-content select="[actions]"></ng-content>
|
<ng-content select="[actions]"></ng-content>
|
||||||
<button (click)="$event.stopPropagation()" *ngIf="hasActions" class="table-actions-trigger" mat-icon-button
|
<button (click)="$event.stopPropagation()" *ngIf="hasActions" class="table-actions-trigger" mat-icon-button
|
||||||
[matMenuTriggerFor]="actions">
|
[matMenuTriggerFor]="actions"
|
||||||
|
[attr.data-e2e]="'table-actions-button'">
|
||||||
<mat-icon>more_horiz</mat-icon>
|
<mat-icon>more_horiz</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
@ -9,10 +9,10 @@
|
|||||||
[showBorder]="true"
|
[showBorder]="true"
|
||||||
>
|
>
|
||||||
<div leftActions class="user-table-left-actions">
|
<div leftActions class="user-table-left-actions">
|
||||||
<button class="type-button" [ngClass]="{ active: type === Type.TYPE_HUMAN }" (click)="setType(Type.TYPE_HUMAN)">
|
<button class="type-button" [ngClass]="{ active: type === Type.TYPE_HUMAN }" (click)="setType(Type.TYPE_HUMAN)" [attr.data-e2e]="'list-humans'">
|
||||||
{{ 'USER.TABLE.TYPES.HUMAN' | translate }}
|
{{ 'USER.TABLE.TYPES.HUMAN' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button class="type-button" [ngClass]="{ active: type === Type.TYPE_MACHINE }" (click)="setType(Type.TYPE_MACHINE)">
|
<button class="type-button" [ngClass]="{ active: type === Type.TYPE_MACHINE }" (click)="setType(Type.TYPE_MACHINE)" [attr.data-e2e]="'list-machines'">
|
||||||
{{ 'USER.TABLE.TYPES.MACHINE' | translate }}
|
{{ 'USER.TABLE.TYPES.MACHINE' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -52,6 +52,7 @@
|
|||||||
mat-raised-button
|
mat-raised-button
|
||||||
[disabled]="!canWrite"
|
[disabled]="!canWrite"
|
||||||
class="cnsl-action-button"
|
class="cnsl-action-button"
|
||||||
|
[attr.data-e2e]="'create-user-button'"
|
||||||
>
|
>
|
||||||
<mat-icon class="icon">add</mat-icon>
|
<mat-icon class="icon">add</mat-icon>
|
||||||
<span>{{ 'ACTIONS.NEW' | translate }}</span>
|
<span>{{ 'ACTIONS.NEW' | translate }}</span>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user