feat: Add credentials E2E test suite and page object (#4596)

* fix: Fix inferred type of X cannot be named error after pnpm update

* feat: Change page objects to expose actions and getters. Add credential creation suite
This commit is contained in:
Alex Grozav
2022-11-22 11:37:26 +02:00
committed by GitHub
parent 772ec78349
commit b5b44d1b59
23 changed files with 159 additions and 67 deletions

View File

@@ -0,0 +1,17 @@
import { BasePage } from "./base";
export class CredentialsPage extends BasePage {
url = '/credentials';
getters = {
emptyListCreateCredentialButton: () => cy.getByTestId('empty-resources-list').find('button'),
createCredentialButton: () => cy.getByTestId('resources-list-add'),
searchBar: () => cy.getByTestId('resources-list-search'),
credentialCards: () => cy.getByTestId('credential-card'),
credentialCard: (credentialName: string) => cy.getByTestId('credential-card')
.contains(credentialName)
.parents('[data-test-id="credential-card"]'),
credentialCardActions: (credentialName: string) => this.getters.credentialCard(credentialName)
.findChildByTestId('credential-card-actions'),
credentialDeleteButton: () => cy.getByTestId('action-toggle-dropdown').filter(':visible').contains('Delete')
};
}