mirror of
https://github.com/jambonz/jambonz-webapp.git
synced 2026-10-30 15:24:31 +00:00
Reorganize some styles
This commit is contained in:
10 files changed
+114
-116
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import React from "react";
|
||||
import { H1 } from "jambonz-ui";
|
||||
|
||||
import { MainApp } from "src/main-app";
|
||||
import { StateProvider } from "src/store";
|
||||
import { AccessControl } from "./access-control";
|
||||
|
||||
import type { ACLProps } from "./access-control";
|
||||
@@ -8,11 +9,13 @@ import type { ACLProps } from "./access-control";
|
||||
/** Wrapper to pass different ACLs */
|
||||
const AccessControlTestWrapper = (props: Partial<ACLProps>) => {
|
||||
return (
|
||||
<MainApp>
|
||||
<StateProvider>
|
||||
<AccessControl acl={props.acl!}>
|
||||
<div className="acl-div" />
|
||||
<div className="acl-div">
|
||||
<H1>ACL: {props.acl}</H1>
|
||||
</div>
|
||||
</AccessControl>
|
||||
</MainApp>
|
||||
</StateProvider>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -21,17 +24,17 @@ describe("<AccessControl>", () => {
|
||||
cy.mount(<AccessControlTestWrapper acl="hasAdminAuth" />);
|
||||
});
|
||||
|
||||
it("doesn't have teams fqdn ACL", () => {
|
||||
cy.mount(<AccessControlTestWrapper acl="hasMSTeamsFqdn" />);
|
||||
|
||||
/** Default ACL disables MS Teams FQDN */
|
||||
cy.get(".acl-div").should("not.exist");
|
||||
});
|
||||
|
||||
it("has admin ACL", () => {
|
||||
cy.mount(<AccessControlTestWrapper acl="hasAdminAuth" />);
|
||||
|
||||
/** Default ACL applies admin auth -- the singleton admin user */
|
||||
cy.get(".acl-div").should("exist");
|
||||
});
|
||||
|
||||
it("has doesn't have teams fqdn ACL", () => {
|
||||
cy.mount(<AccessControlTestWrapper acl="hasMSTeamsFqdn" />);
|
||||
|
||||
/** Default ACL disables MS Teams FQDN */
|
||||
cy.get(".acl-div").should("not.exist");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user