shiloh_automatisch/packages/e2e-tests/fixtures/admin/application-oauth-clients-page.js
Linden Crandall 5075f5c5d8
Some checks are pending
Automatisch Backend Tests / test (push) Waiting to run
Automatisch CI / linter (push) Waiting to run
Automatisch CI / start-backend-server (push) Waiting to run
Automatisch CI / start-backend-worker (push) Waiting to run
Automatisch CI / build-web (push) Waiting to run
Automatisch UI Tests / test (push) Waiting to run
commit upstream files
2025-02-06 04:14:18 +09:00

49 lines
1.3 KiB
JavaScript

import { expect } from '@playwright/test';
const { AuthenticatedPage } = require('../authenticated-page');
export class AdminApplicationOAuthClientsPage extends AuthenticatedPage {
/**
* @param {import('@playwright/test').Page} page
*/
constructor(page) {
super(page);
this.authClientsTab = this.page.getByTestId('oauth-clients-tab');
this.saveButton = this.page.getByTestId('submitButton');
this.successSnackbar = this.page.getByTestId(
'snackbar-save-admin-apps-settings-success'
);
this.createFirstAuthClientButton = this.page.getByTestId('no-results');
this.createAuthClientButton = this.page.getByTestId(
'create-auth-client-button'
);
this.submitAuthClientFormButton = this.page.getByTestId(
'submit-auth-client-form'
);
this.authClientEntry = this.page.getByTestId('auth-client');
}
async openAuthClientsTab() {
this.authClientsTab.click();
}
async openFirstAuthClientCreateForm() {
this.createFirstAuthClientButton.click();
}
async openAuthClientCreateForm() {
this.createAuthClientButton.click();
}
async submitAuthClientForm() {
this.submitAuthClientFormButton.click();
}
async authClientShouldBeVisible(authClientName) {
await expect(
this.authClientEntry.filter({ hasText: authClientName })
).toBeVisible();
}
}