Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(frontend): svelte v5 #3929

Draft
wants to merge 36 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
a88a26a
build(frontend): svelte v5
peterpeterparker Dec 11, 2024
8f1bbb5
build: use temporary local gix-cmp
peterpeterparker Dec 11, 2024
ee8d55e
fix: no span in option
peterpeterparker Dec 11, 2024
b7152b1
fix(frontend): button authenticate animation selector
peterpeterparker Dec 11, 2024
82fd385
fix(frontend): self-closing HTML tags for non-void elements are ambig…
peterpeterparker Dec 11, 2024
80fd104
chore: fmt
peterpeterparker Dec 11, 2024
8d914d3
feat: adapt cmp type
peterpeterparker Dec 11, 2024
969d174
feat(frontend): listener templating
peterpeterparker Dec 11, 2024
35c85c4
feat: reintroduce slot
peterpeterparker Dec 11, 2024
e4083b4
feat: convert steps type
peterpeterparker Dec 11, 2024
62f2c26
feat: use Component
peterpeterparker Dec 11, 2024
34501a9
feat: use Component
peterpeterparker Dec 11, 2024
2847e9b
fix: listener map types
peterpeterparker Dec 11, 2024
9ebae9f
feat: use const
peterpeterparker Dec 11, 2024
e6e7aa8
feat: use typeof
peterpeterparker Dec 11, 2024
ccb0314
feat: cmp type
peterpeterparker Dec 11, 2024
85d9b03
chore: merge main
peterpeterparker Dec 11, 2024
9ce190a
Merge branch 'main' into build/svelte-v5
peterpeterparker Dec 11, 2024
2c48f9f
build: fix audit
peterpeterparker Dec 12, 2024
7e8a12f
Merge remote-tracking branch 'origin/build/svelte-v5' into build/svel…
peterpeterparker Dec 12, 2024
2730438
fix: eslint for transaction ui
peterpeterparker Dec 12, 2024
7fb4bbf
chore: merge main
peterpeterparker Dec 16, 2024
84e0732
chore: redo
peterpeterparker Dec 16, 2024
d38dc44
build: cleanup and redo svelte v5
peterpeterparker Dec 16, 2024
df02668
Merge branch 'main' into build/svelte-v5
peterpeterparker Dec 16, 2024
f697a2c
chore: more resize observer for tests
peterpeterparker Dec 16, 2024
6d84eac
test(frontend): adapt
peterpeterparker Dec 16, 2024
ec2474e
test: adapt
peterpeterparker Dec 16, 2024
f549ddd
test: mock animate
peterpeterparker Dec 16, 2024
e22bf22
test: props
peterpeterparker Dec 16, 2024
8429434
test: props
peterpeterparker Dec 16, 2024
c5151c7
test: adapt
peterpeterparker Dec 16, 2024
dee6e9d
test: adapt props
peterpeterparker Dec 16, 2024
6f8a1d2
test: state props
peterpeterparker Dec 16, 2024
b943f47
feat: imperative query param for network guard
peterpeterparker Dec 16, 2024
a8b5c9b
chore: latest gix-cmp
peterpeterparker Dec 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: adapt
  • Loading branch information
peterpeterparker committed Dec 16, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit c5151c75cef90af1b9d29b5f788981a9f2db8a18
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ describe('SendInputAmount', () => {
it('should imperatively trigger max value', async () => {
const { container, component } = render(SendInputAmount, { props });

component.$$.ctx[component.$$.props['triggerCalculateMax']]();
component.triggerCalculateMax();

await waitFor(() => {
const input: HTMLInputElement | null = container.querySelector(inputSelector);
@@ -79,7 +79,7 @@ describe('SendInputAmount', () => {
expect(customValidate).toHaveBeenCalledTimes(1);
});

component.$$.ctx[component.$$.props['triggerValidate']]();
component.triggerValidate();

await waitFor(() => {
expect(customValidate).toHaveBeenCalledTimes(2);
@@ -104,33 +104,39 @@ describe('SendInputAmount', () => {
const renderSetAndAssertMax = async (): Promise<{
container: HTMLElement;
component: SendInputAmount;
testProps: { amountSetToMax: boolean };
}> => {
const { container, component } = render(SendInputAmount, { props });
const testProps = $state({
...props,
amountSetToMax: false
});

const { container, component } = render(SendInputAmount, { props: testProps });

expect(component.$$.ctx[component.$$.props['amountSetToMax']]).toBeFalsy();
expect(testProps.amountSetToMax).toBeFalsy();

const button: HTMLButtonElement | null = container.querySelector(buttonSelector);
assertNonNullish(button, 'Max button not found');

await fireEvent.click(button);

expect(component.$$.ctx[component.$$.props['amountSetToMax']]).toBeTruthy();
expect(testProps.amountSetToMax).toBeTruthy();

return { component, container };
return { component, container, testProps };
};

it('should expose a truthy amountSetToMax property when max value was triggered', async () => {
await renderSetAndAssertMax();
});

it('should reset amountSetToMax when max value was triggered but amount was manually updated afterwards', async () => {
const { container, component } = await renderSetAndAssertMax();
const { container, testProps } = await renderSetAndAssertMax();

const input: HTMLInputElement | null = container.querySelector(inputSelector);
assertNonNullish(input, 'Input not found');
await fireEvent.input(input, { target: { value: '0.1' } });

expect(component.$$.ctx[component.$$.props['amountSetToMax']]).toBeFalsy();
expect(testProps.amountSetToMax).toBeFalsy();
});
});
});
Loading