chore: Add in-progress oidc test for visibility

This commit is contained in:
Susmitha Girumala committed 2021-06-02 22:44:40 -04:00
1 parent a7a6bdedf9
commit f7854b642c
1 file changed
+17 -12
@@ -101,24 +101,29 @@ module('Acceptance | auth methods | oidc', function (hooks) {
assert.equal(authMethod.attributes.state, updateValue);
});
// FIXME: How to mock just one request routed to /auth-methods and let everything else passthrough?
// test('errors are displayed when state update fails', async function (assert) {
// assert.expect(2);
// this.server.post('/auth-methods/:idMethod', (_, request) => {
// // Only respond to state update with error
// if (request.params.idMethod.match(/(change-state)/i)) {
// return new Response(
// 400,
// {},
// {
// status: 400,
// code: 'error',
// message: 'Sorry!',
// }
// );
// }
// return request;
// });
// const newState = 'inactive';
// await visit(urls.authMethod);
// await click('.rose-layout-page-actions .rose-dropdown-trigger');
// // Load page before mocking update
// this.server.post('/auth-methods/:idMethod', () => {
// return new Response(
// 400,
// {},
// {
// status: 400,
// code: 'error',
// message: 'Sorry!',
// }
// );
// });
// await click(`.rose-dropdown[open] input[value="${newState}"]`);
// // debugger;
// const authMethod = this.server.db.authMethods.find(instances.authMethod.id);
// assert.notEqual(
// newState,