Skip to content

Commit

Permalink
Add missing cookie banner properties
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Nov 20, 2023
1 parent 989869f commit 4826626
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ import { within, userEvent } from "@storybook/testing-library";
import Cookies from "../../lib/cookies.mjs";

const argTypes = {
serviceName: { control: "text" },
cookiesUrl: { control: "text" },
policies: { control: "text" },
policiesKey: { control: "text" },
preferencesSetKey: { control: "text" },
cookiesDomain: { control: "text" },
cookiesPath: { control: "text" },
allowInsecure: { control: "boolean" },
classes: { control: "text" },
attributes: { control: "object" },
Expand All @@ -27,22 +29,26 @@ export default {
};

const Template = ({
serviceName,
cookiesUrl,
policies,
policiesKey,
preferencesSetKey,
cookiesDomain,
cookiesPath,
allowInsecure,
classes,
attributes,
}) =>
CookieBanner({
params: {
serviceName,
cookiesUrl,
policies,
policiesKey,
preferencesSetKey,
cookiesDomain,
cookiesPath,
allowInsecure,
classes,
attributes,
Expand All @@ -57,6 +63,7 @@ Standard.args = {

export const Accept = Template.bind({});
Accept.args = {
serviceName: "My service",
cookiesUrl: "#",
allowInsecure: true,
classes: "tna-cookie-banner--demo",
Expand Down Expand Up @@ -97,6 +104,7 @@ Accept.play = async ({ canvasElement }) => {

export const Reject = Template.bind({});
Reject.args = {
serviceName: "My service",
cookiesUrl: "#",
classes: "tna-cookie-banner--demo",
};
Expand Down Expand Up @@ -132,6 +140,7 @@ Reject.play = async ({ canvasElement }) => {

export const CustomPolicies = Template.bind({});
CustomPolicies.args = {
serviceName: "My service",
cookiesUrl: "#",
policies: "custom",
classes: "tna-cookie-banner--demo",
Expand Down Expand Up @@ -166,6 +175,7 @@ CustomPolicies.play = async ({ args, canvasElement }) => {

export const Existing = Template.bind({});
Existing.args = {
serviceName: "My service",
cookiesUrl: "#",
allowInsecure: true,
classes: "tna-cookie-banner--demo",
Expand Down Expand Up @@ -200,6 +210,7 @@ Existing.play = async ({ canvasElement }) => {

// export const EventHandling = Template.bind({});
// EventHandling.args = {
// serviceName: "My service",
// cookiesUrl: "#",
// policies: "custom",
// classes: "tna-cookie-banner--demo",
Expand Down
Loading

0 comments on commit 4826626

Please sign in to comment.