test: fix application connections check assertions
This commit is contained in:
@@ -20,46 +20,54 @@ export class AdminApplicationSettingsPage extends AuthenticatedPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async allowCustomConnections() {
|
async allowCustomConnections() {
|
||||||
await expect(this.disableConnectionsSwitch).not.toBeChecked();
|
await expect(this.allowCustomConnectionsSwitch).not.toBeChecked();
|
||||||
await this.allowCustomConnectionsSwitch.check();
|
await this.allowCustomConnectionsSwitch.check();
|
||||||
|
await expect(this.allowCustomConnectionsSwitch).toBeChecked();
|
||||||
await this.saveButton.click();
|
await this.saveButton.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
async allowSharedConnections() {
|
async allowSharedConnections() {
|
||||||
await expect(this.disableConnectionsSwitch).not.toBeChecked();
|
await expect(this.allowSharedConnectionsSwitch).not.toBeChecked();
|
||||||
await this.allowSharedConnectionsSwitch.check();
|
await this.allowSharedConnectionsSwitch.check();
|
||||||
|
await expect(this.allowSharedConnectionsSwitch).toBeChecked();
|
||||||
await this.saveButton.click();
|
await this.saveButton.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
async disallowConnections() {
|
async disallowConnections() {
|
||||||
await expect(this.disableConnectionsSwitch).not.toBeChecked();
|
await expect(this.disableConnectionsSwitch).not.toBeChecked();
|
||||||
await this.disableConnectionsSwitch.check();
|
await this.disableConnectionsSwitch.check();
|
||||||
|
await expect(this.disableConnectionsSwitch).toBeChecked();
|
||||||
await this.saveButton.click();
|
await this.saveButton.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
async disallowCustomConnections() {
|
async disallowCustomConnections() {
|
||||||
await expect(this.disableConnectionsSwitch).toBeChecked();
|
await expect(this.allowCustomConnectionsSwitch).toBeChecked();
|
||||||
await this.allowCustomConnectionsSwitch.uncheck();
|
await this.allowCustomConnectionsSwitch.uncheck();
|
||||||
|
await expect(this.allowCustomConnectionsSwitch).not.toBeChecked();
|
||||||
await this.saveButton.click();
|
await this.saveButton.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
async disallowSharedConnections() {
|
async disallowSharedConnections() {
|
||||||
await expect(this.disableConnectionsSwitch).toBeChecked();
|
await expect(this.allowSharedConnectionsSwitch).toBeChecked();
|
||||||
await this.allowSharedConnectionsSwitch.uncheck();
|
await this.allowSharedConnectionsSwitch.uncheck();
|
||||||
|
await expect(this.allowSharedConnectionsSwitch).not.toBeChecked();
|
||||||
await this.saveButton.click();
|
await this.saveButton.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
async allowConnections() {
|
async allowConnections() {
|
||||||
await expect(this.disableConnectionsSwitch).toBeChecked();
|
await expect(this.disableConnectionsSwitch).toBeChecked();
|
||||||
await this.disableConnectionsSwitch.uncheck();
|
await this.disableConnectionsSwitch.uncheck();
|
||||||
|
await expect(this.disableConnectionsSwitch).not.toBeChecked();
|
||||||
await this.saveButton.click();
|
await this.saveButton.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
async expectSuccessSnackbarToBeVisible() {
|
async expectSuccessSnackbarToBeVisible() {
|
||||||
const snackbars = await this.successSnackbar.all();
|
const snackbars = await this.successSnackbar.all();
|
||||||
for (const snackbar of snackbars) {
|
for (const snackbar of snackbars) {
|
||||||
await expect(await snackbar.getAttribute('data-snackbar-variant')).toBe('success');
|
await expect(await snackbar.getAttribute('data-snackbar-variant')).toBe(
|
||||||
await snackbar.click();
|
'success'
|
||||||
|
);
|
||||||
|
// await snackbar.click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user