@crvouga/atlas 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +15 -2
- package/dist/reports/src/evidence-live.d.ts +6 -0
- package/dist/reports/src/evidence-live.js +35 -3
- package/dist/reports/src/evidence-types.d.ts +2 -0
- package/dist/reports/src/evidence-view.d.ts +15 -2
- package/dist/reports/src/evidence-view.js +31 -3
- package/dist/reports/src/layer-axes.d.ts +18 -0
- package/dist/reports/src/layer-axes.js +51 -0
- package/dist/reports/src/layer-catalog.js +1 -1
- package/dist/reports/src/layer-merge.d.ts +1 -1
- package/dist/reports/src/layer-merge.js +9 -4
- package/dist/reports/src/layer-source.js +3 -0
- package/dist/reports/src/layer-types.d.ts +2 -0
- package/dist/reports/src/layers-route.js +2 -5
- package/dist/reports/src/protocol.d.ts +4 -0
- package/dist/reports/src/publish.d.ts +2 -0
- package/dist/reports/src/publish.js +4 -0
- package/dist/reports/src/report-parts.js +3 -0
- package/package.json +2 -2
- package/packages/reports/README.md +4 -2
- package/packages/reports/STORAGE.md +1 -1
- package/packages/visualizer/README.md +6 -5
- package/packages/visualizer/example/specs/coffee/ordering/cart.qnt +7 -0
- package/packages/visualizer/example/specs/coffee/ordering/checkout.openslo.yaml +10 -0
- package/packages/visualizer/example/specs/coffee/ordering/drink-price.dmn +24 -0
- package/packages/visualizer/example/specs/coffee/ordering/loyalty.feature +7 -0
- package/packages/visualizer/example/specs/coffee/ordering/ordering.feature +36 -0
- package/packages/visualizer/example/specs/coffee/ordering/payment.als +4 -0
- package/packages/visualizer/fixtures/failures/specs/coffee/ordering/cart.qnt +7 -0
- package/packages/visualizer/fixtures/failures/specs/coffee/ordering/checkout.openslo.yaml +10 -0
- package/packages/visualizer/fixtures/failures/specs/coffee/ordering/drink-price.dmn +24 -0
- package/packages/visualizer/fixtures/failures/specs/coffee/ordering/loyalty.feature +7 -0
- package/packages/visualizer/fixtures/failures/specs/coffee/ordering/ordering.feature +36 -0
- package/packages/visualizer/fixtures/failures/specs/coffee/ordering/payment.als +4 -0
- package/packages/visualizer/fixtures/full/specs/coffee/ordering/cart.qnt +7 -0
- package/packages/visualizer/fixtures/full/specs/coffee/ordering/checkout.openslo.yaml +10 -0
- package/packages/visualizer/fixtures/full/specs/coffee/ordering/drink-price.dmn +24 -0
- package/packages/visualizer/fixtures/full/specs/coffee/ordering/loyalty.feature +7 -0
- package/packages/visualizer/fixtures/full/specs/coffee/ordering/ordering.feature +36 -0
- package/packages/visualizer/fixtures/full/specs/coffee/ordering/payment.als +4 -0
- package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/cart.qnt +7 -0
- package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/checkout.openslo.yaml +10 -0
- package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/drink-price.dmn +24 -0
- package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/loyalty.feature +7 -0
- package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/ordering.feature +36 -0
- package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/payment.als +4 -0
- package/packages/visualizer/fixtures/partial/specs/coffee/ordering/cart.qnt +7 -0
- package/packages/visualizer/fixtures/partial/specs/coffee/ordering/checkout.openslo.yaml +10 -0
- package/packages/visualizer/fixtures/partial/specs/coffee/ordering/drink-price.dmn +24 -0
- package/packages/visualizer/fixtures/partial/specs/coffee/ordering/loyalty.feature +7 -0
- package/packages/visualizer/fixtures/partial/specs/coffee/ordering/ordering.feature +36 -0
- package/packages/visualizer/fixtures/partial/specs/coffee/ordering/payment.als +4 -0
- package/packages/visualizer/fixtures/removed/specs/coffee/ordering/cart.qnt +7 -0
- package/packages/visualizer/fixtures/removed/specs/coffee/ordering/checkout.openslo.yaml +10 -0
- package/packages/visualizer/fixtures/removed/specs/coffee/ordering/drink-price.dmn +24 -0
- package/packages/visualizer/fixtures/removed/specs/coffee/ordering/loyalty.feature +7 -0
- package/packages/visualizer/fixtures/removed/specs/coffee/ordering/ordering.feature +36 -0
- package/packages/visualizer/fixtures/removed/specs/coffee/ordering/payment.als +4 -0
- package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/cart.qnt +7 -0
- package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/checkout.openslo.yaml +10 -0
- package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/drink-price.dmn +24 -0
- package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/loyalty.feature +7 -0
- package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/ordering.feature +36 -0
- package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/payment.als +4 -0
- package/packages/visualizer/scripts/make-fixtures.ts +2 -0
- package/packages/visualizer/scripts/publish-data.ts +1 -2
- package/packages/visualizer/src/components/Header.tsx +1 -1
- package/packages/visualizer/src/evidence/check-detail.tsx +35 -3
- package/packages/visualizer/src/evidence/evidence.module.css +20 -0
- package/packages/visualizer/src/evidence/marks.tsx +2 -0
- package/packages/visualizer/src/evidence/overview.tsx +3 -3
- package/packages/visualizer/src/evidence/sources-panel.tsx +88 -34
- package/packages/visualizer/src/state/ui-store.ts +6 -2
- package/packages/visualizer/vite/example-reports.ts +475 -0
- package/packages/visualizer/vite.config.ts +9 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Feature: Order a drink
|
|
2
|
+
A customer picks a drink, pays, and picks it up.
|
|
3
|
+
|
|
4
|
+
Rule: Paying for the order
|
|
5
|
+
|
|
6
|
+
Scenario: Pays by card
|
|
7
|
+
Given a drink in the cart
|
|
8
|
+
When the customer pays by card
|
|
9
|
+
Then the barista can start the drink
|
|
10
|
+
|
|
11
|
+
Scenario: Pays with a wallet
|
|
12
|
+
Given a drink in the cart
|
|
13
|
+
When the customer pays with a wallet
|
|
14
|
+
Then the order is paid
|
|
15
|
+
|
|
16
|
+
Scenario: Card declined, then a wallet works
|
|
17
|
+
Given a drink in the cart
|
|
18
|
+
When the card is declined
|
|
19
|
+
And the customer pays with a wallet
|
|
20
|
+
Then the order is paid
|
|
21
|
+
|
|
22
|
+
Scenario: Slow payment
|
|
23
|
+
Given a drink in the cart
|
|
24
|
+
When the payment takes longer than a minute
|
|
25
|
+
Then the customer can check the payment again
|
|
26
|
+
|
|
27
|
+
Scenario: Leaves checkout and comes back
|
|
28
|
+
Given a drink in the cart
|
|
29
|
+
When the customer closes checkout
|
|
30
|
+
And the customer starts checkout again
|
|
31
|
+
Then checkout is open
|
|
32
|
+
|
|
33
|
+
Scenario: Drink left too long
|
|
34
|
+
Given a finished drink
|
|
35
|
+
When nobody picks it up
|
|
36
|
+
Then the drink is thrown away and refunded
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/">
|
|
3
|
+
<decision id="drink-price" name="Drink price">
|
|
4
|
+
<decisionTable id="Drink price" hitPolicy="UNIQUE">
|
|
5
|
+
<input label="Size">
|
|
6
|
+
<inputExpression typeRef="string"><text>size</text></inputExpression>
|
|
7
|
+
</input>
|
|
8
|
+
<input label="Milk">
|
|
9
|
+
<inputExpression typeRef="string"><text>milk</text></inputExpression>
|
|
10
|
+
</input>
|
|
11
|
+
<output label="Price" name="price" />
|
|
12
|
+
<rule>
|
|
13
|
+
<inputEntry><text>"Small"</text></inputEntry>
|
|
14
|
+
<inputEntry><text>"None"</text></inputEntry>
|
|
15
|
+
<outputEntry><text>3</text></outputEntry>
|
|
16
|
+
</rule>
|
|
17
|
+
<rule>
|
|
18
|
+
<inputEntry><text>"Large"</text></inputEntry>
|
|
19
|
+
<inputEntry><text>"Oat"</text></inputEntry>
|
|
20
|
+
<outputEntry><text>5</text></outputEntry>
|
|
21
|
+
</rule>
|
|
22
|
+
</decisionTable>
|
|
23
|
+
</decision>
|
|
24
|
+
</definitions>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Feature: Order a drink
|
|
2
|
+
A customer picks a drink, pays, and picks it up.
|
|
3
|
+
|
|
4
|
+
Rule: Paying for the order
|
|
5
|
+
|
|
6
|
+
Scenario: Pays by card
|
|
7
|
+
Given a drink in the cart
|
|
8
|
+
When the customer pays by card
|
|
9
|
+
Then the barista can start the drink
|
|
10
|
+
|
|
11
|
+
Scenario: Pays with a wallet
|
|
12
|
+
Given a drink in the cart
|
|
13
|
+
When the customer pays with a wallet
|
|
14
|
+
Then the order is paid
|
|
15
|
+
|
|
16
|
+
Scenario: Card declined, then a wallet works
|
|
17
|
+
Given a drink in the cart
|
|
18
|
+
When the card is declined
|
|
19
|
+
And the customer pays with a wallet
|
|
20
|
+
Then the order is paid
|
|
21
|
+
|
|
22
|
+
Scenario: Slow payment
|
|
23
|
+
Given a drink in the cart
|
|
24
|
+
When the payment takes longer than a minute
|
|
25
|
+
Then the customer can check the payment again
|
|
26
|
+
|
|
27
|
+
Scenario: Leaves checkout and comes back
|
|
28
|
+
Given a drink in the cart
|
|
29
|
+
When the customer closes checkout
|
|
30
|
+
And the customer starts checkout again
|
|
31
|
+
Then checkout is open
|
|
32
|
+
|
|
33
|
+
Scenario: Drink left too long
|
|
34
|
+
Given a finished drink
|
|
35
|
+
When nobody picks it up
|
|
36
|
+
Then the drink is thrown away and refunded
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/">
|
|
3
|
+
<decision id="drink-price" name="Drink price">
|
|
4
|
+
<decisionTable id="Drink price" hitPolicy="UNIQUE">
|
|
5
|
+
<input label="Size">
|
|
6
|
+
<inputExpression typeRef="string"><text>size</text></inputExpression>
|
|
7
|
+
</input>
|
|
8
|
+
<input label="Milk">
|
|
9
|
+
<inputExpression typeRef="string"><text>milk</text></inputExpression>
|
|
10
|
+
</input>
|
|
11
|
+
<output label="Price" name="price" />
|
|
12
|
+
<rule>
|
|
13
|
+
<inputEntry><text>"Small"</text></inputEntry>
|
|
14
|
+
<inputEntry><text>"None"</text></inputEntry>
|
|
15
|
+
<outputEntry><text>3</text></outputEntry>
|
|
16
|
+
</rule>
|
|
17
|
+
<rule>
|
|
18
|
+
<inputEntry><text>"Large"</text></inputEntry>
|
|
19
|
+
<inputEntry><text>"Oat"</text></inputEntry>
|
|
20
|
+
<outputEntry><text>5</text></outputEntry>
|
|
21
|
+
</rule>
|
|
22
|
+
</decisionTable>
|
|
23
|
+
</decision>
|
|
24
|
+
</definitions>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Feature: Order a drink
|
|
2
|
+
A customer picks a drink, pays, and picks it up.
|
|
3
|
+
|
|
4
|
+
Rule: Paying for the order
|
|
5
|
+
|
|
6
|
+
Scenario: Pays by card
|
|
7
|
+
Given a drink in the cart
|
|
8
|
+
When the customer pays by card
|
|
9
|
+
Then the barista can start the drink
|
|
10
|
+
|
|
11
|
+
Scenario: Pays with a wallet
|
|
12
|
+
Given a drink in the cart
|
|
13
|
+
When the customer pays with a wallet
|
|
14
|
+
Then the order is paid
|
|
15
|
+
|
|
16
|
+
Scenario: Card declined, then a wallet works
|
|
17
|
+
Given a drink in the cart
|
|
18
|
+
When the card is declined
|
|
19
|
+
And the customer pays with a wallet
|
|
20
|
+
Then the order is paid
|
|
21
|
+
|
|
22
|
+
Scenario: Slow payment
|
|
23
|
+
Given a drink in the cart
|
|
24
|
+
When the payment takes longer than a minute
|
|
25
|
+
Then the customer can check the payment again
|
|
26
|
+
|
|
27
|
+
Scenario: Leaves checkout and comes back
|
|
28
|
+
Given a drink in the cart
|
|
29
|
+
When the customer closes checkout
|
|
30
|
+
And the customer starts checkout again
|
|
31
|
+
Then checkout is open
|
|
32
|
+
|
|
33
|
+
Scenario: Drink left too long
|
|
34
|
+
Given a finished drink
|
|
35
|
+
When nobody picks it up
|
|
36
|
+
Then the drink is thrown away and refunded
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/">
|
|
3
|
+
<decision id="drink-price" name="Drink price">
|
|
4
|
+
<decisionTable id="Drink price" hitPolicy="UNIQUE">
|
|
5
|
+
<input label="Size">
|
|
6
|
+
<inputExpression typeRef="string"><text>size</text></inputExpression>
|
|
7
|
+
</input>
|
|
8
|
+
<input label="Milk">
|
|
9
|
+
<inputExpression typeRef="string"><text>milk</text></inputExpression>
|
|
10
|
+
</input>
|
|
11
|
+
<output label="Price" name="price" />
|
|
12
|
+
<rule>
|
|
13
|
+
<inputEntry><text>"Small"</text></inputEntry>
|
|
14
|
+
<inputEntry><text>"None"</text></inputEntry>
|
|
15
|
+
<outputEntry><text>3</text></outputEntry>
|
|
16
|
+
</rule>
|
|
17
|
+
<rule>
|
|
18
|
+
<inputEntry><text>"Large"</text></inputEntry>
|
|
19
|
+
<inputEntry><text>"Oat"</text></inputEntry>
|
|
20
|
+
<outputEntry><text>5</text></outputEntry>
|
|
21
|
+
</rule>
|
|
22
|
+
</decisionTable>
|
|
23
|
+
</decision>
|
|
24
|
+
</definitions>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Feature: Order a drink
|
|
2
|
+
A customer picks a drink, pays, and picks it up.
|
|
3
|
+
|
|
4
|
+
Rule: Paying for the order
|
|
5
|
+
|
|
6
|
+
Scenario: Pays by card
|
|
7
|
+
Given a drink in the cart
|
|
8
|
+
When the customer pays by card
|
|
9
|
+
Then the barista can start the drink
|
|
10
|
+
|
|
11
|
+
Scenario: Pays with a wallet
|
|
12
|
+
Given a drink in the cart
|
|
13
|
+
When the customer pays with a wallet
|
|
14
|
+
Then the order is paid
|
|
15
|
+
|
|
16
|
+
Scenario: Card declined, then a wallet works
|
|
17
|
+
Given a drink in the cart
|
|
18
|
+
When the card is declined
|
|
19
|
+
And the customer pays with a wallet
|
|
20
|
+
Then the order is paid
|
|
21
|
+
|
|
22
|
+
Scenario: Slow payment
|
|
23
|
+
Given a drink in the cart
|
|
24
|
+
When the payment takes longer than a minute
|
|
25
|
+
Then the customer can check the payment again
|
|
26
|
+
|
|
27
|
+
Scenario: Leaves checkout and comes back
|
|
28
|
+
Given a drink in the cart
|
|
29
|
+
When the customer closes checkout
|
|
30
|
+
And the customer starts checkout again
|
|
31
|
+
Then checkout is open
|
|
32
|
+
|
|
33
|
+
Scenario: Drink left too long
|
|
34
|
+
Given a finished drink
|
|
35
|
+
When nobody picks it up
|
|
36
|
+
Then the drink is thrown away and refunded
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/">
|
|
3
|
+
<decision id="drink-price" name="Drink price">
|
|
4
|
+
<decisionTable id="Drink price" hitPolicy="UNIQUE">
|
|
5
|
+
<input label="Size">
|
|
6
|
+
<inputExpression typeRef="string"><text>size</text></inputExpression>
|
|
7
|
+
</input>
|
|
8
|
+
<input label="Milk">
|
|
9
|
+
<inputExpression typeRef="string"><text>milk</text></inputExpression>
|
|
10
|
+
</input>
|
|
11
|
+
<output label="Price" name="price" />
|
|
12
|
+
<rule>
|
|
13
|
+
<inputEntry><text>"Small"</text></inputEntry>
|
|
14
|
+
<inputEntry><text>"None"</text></inputEntry>
|
|
15
|
+
<outputEntry><text>3</text></outputEntry>
|
|
16
|
+
</rule>
|
|
17
|
+
<rule>
|
|
18
|
+
<inputEntry><text>"Large"</text></inputEntry>
|
|
19
|
+
<inputEntry><text>"Oat"</text></inputEntry>
|
|
20
|
+
<outputEntry><text>5</text></outputEntry>
|
|
21
|
+
</rule>
|
|
22
|
+
</decisionTable>
|
|
23
|
+
</decision>
|
|
24
|
+
</definitions>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Feature: Order a drink
|
|
2
|
+
A customer picks a drink, pays, and picks it up.
|
|
3
|
+
|
|
4
|
+
Rule: Paying for the order
|
|
5
|
+
|
|
6
|
+
Scenario: Pays by card
|
|
7
|
+
Given a drink in the cart
|
|
8
|
+
When the customer pays by card
|
|
9
|
+
Then the barista can start the drink
|
|
10
|
+
|
|
11
|
+
Scenario: Pays with a wallet
|
|
12
|
+
Given a drink in the cart
|
|
13
|
+
When the customer pays with a wallet
|
|
14
|
+
Then the order is paid
|
|
15
|
+
|
|
16
|
+
Scenario: Card declined, then a wallet works
|
|
17
|
+
Given a drink in the cart
|
|
18
|
+
When the card is declined
|
|
19
|
+
And the customer pays with a wallet
|
|
20
|
+
Then the order is paid
|
|
21
|
+
|
|
22
|
+
Scenario: Slow payment
|
|
23
|
+
Given a drink in the cart
|
|
24
|
+
When the payment takes longer than a minute
|
|
25
|
+
Then the customer can check the payment again
|
|
26
|
+
|
|
27
|
+
Scenario: Leaves checkout and comes back
|
|
28
|
+
Given a drink in the cart
|
|
29
|
+
When the customer closes checkout
|
|
30
|
+
And the customer starts checkout again
|
|
31
|
+
Then checkout is open
|
|
32
|
+
|
|
33
|
+
Scenario: Drink left too long
|
|
34
|
+
Given a finished drink
|
|
35
|
+
When nobody picks it up
|
|
36
|
+
Then the drink is thrown away and refunded
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/">
|
|
3
|
+
<decision id="drink-price" name="Drink price">
|
|
4
|
+
<decisionTable id="Drink price" hitPolicy="UNIQUE">
|
|
5
|
+
<input label="Size">
|
|
6
|
+
<inputExpression typeRef="string"><text>size</text></inputExpression>
|
|
7
|
+
</input>
|
|
8
|
+
<input label="Milk">
|
|
9
|
+
<inputExpression typeRef="string"><text>milk</text></inputExpression>
|
|
10
|
+
</input>
|
|
11
|
+
<output label="Price" name="price" />
|
|
12
|
+
<rule>
|
|
13
|
+
<inputEntry><text>"Small"</text></inputEntry>
|
|
14
|
+
<inputEntry><text>"None"</text></inputEntry>
|
|
15
|
+
<outputEntry><text>3</text></outputEntry>
|
|
16
|
+
</rule>
|
|
17
|
+
<rule>
|
|
18
|
+
<inputEntry><text>"Large"</text></inputEntry>
|
|
19
|
+
<inputEntry><text>"Oat"</text></inputEntry>
|
|
20
|
+
<outputEntry><text>5</text></outputEntry>
|
|
21
|
+
</rule>
|
|
22
|
+
</decisionTable>
|
|
23
|
+
</decision>
|
|
24
|
+
</definitions>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Feature: Order a drink
|
|
2
|
+
A customer picks a drink, pays, and picks it up.
|
|
3
|
+
|
|
4
|
+
Rule: Paying for the order
|
|
5
|
+
|
|
6
|
+
Scenario: Pays by card
|
|
7
|
+
Given a drink in the cart
|
|
8
|
+
When the customer pays by card
|
|
9
|
+
Then the barista can start the drink
|
|
10
|
+
|
|
11
|
+
Scenario: Pays with a wallet
|
|
12
|
+
Given a drink in the cart
|
|
13
|
+
When the customer pays with a wallet
|
|
14
|
+
Then the order is paid
|
|
15
|
+
|
|
16
|
+
Scenario: Card declined, then a wallet works
|
|
17
|
+
Given a drink in the cart
|
|
18
|
+
When the card is declined
|
|
19
|
+
And the customer pays with a wallet
|
|
20
|
+
Then the order is paid
|
|
21
|
+
|
|
22
|
+
Scenario: Slow payment
|
|
23
|
+
Given a drink in the cart
|
|
24
|
+
When the payment takes longer than a minute
|
|
25
|
+
Then the customer can check the payment again
|
|
26
|
+
|
|
27
|
+
Scenario: Leaves checkout and comes back
|
|
28
|
+
Given a drink in the cart
|
|
29
|
+
When the customer closes checkout
|
|
30
|
+
And the customer starts checkout again
|
|
31
|
+
Then checkout is open
|
|
32
|
+
|
|
33
|
+
Scenario: Drink left too long
|
|
34
|
+
Given a finished drink
|
|
35
|
+
When nobody picks it up
|
|
36
|
+
Then the drink is thrown away and refunded
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/">
|
|
3
|
+
<decision id="drink-price" name="Drink price">
|
|
4
|
+
<decisionTable id="Drink price" hitPolicy="UNIQUE">
|
|
5
|
+
<input label="Size">
|
|
6
|
+
<inputExpression typeRef="string"><text>size</text></inputExpression>
|
|
7
|
+
</input>
|
|
8
|
+
<input label="Milk">
|
|
9
|
+
<inputExpression typeRef="string"><text>milk</text></inputExpression>
|
|
10
|
+
</input>
|
|
11
|
+
<output label="Price" name="price" />
|
|
12
|
+
<rule>
|
|
13
|
+
<inputEntry><text>"Small"</text></inputEntry>
|
|
14
|
+
<inputEntry><text>"None"</text></inputEntry>
|
|
15
|
+
<outputEntry><text>3</text></outputEntry>
|
|
16
|
+
</rule>
|
|
17
|
+
<rule>
|
|
18
|
+
<inputEntry><text>"Large"</text></inputEntry>
|
|
19
|
+
<inputEntry><text>"Oat"</text></inputEntry>
|
|
20
|
+
<outputEntry><text>5</text></outputEntry>
|
|
21
|
+
</rule>
|
|
22
|
+
</decisionTable>
|
|
23
|
+
</decision>
|
|
24
|
+
</definitions>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Feature: Order a drink
|
|
2
|
+
A customer picks a drink, pays, and picks it up.
|
|
3
|
+
|
|
4
|
+
Rule: Paying for the order
|
|
5
|
+
|
|
6
|
+
Scenario: Pays by card
|
|
7
|
+
Given a drink in the cart
|
|
8
|
+
When the customer pays by card
|
|
9
|
+
Then the barista can start the drink
|
|
10
|
+
|
|
11
|
+
Scenario: Pays with a wallet
|
|
12
|
+
Given a drink in the cart
|
|
13
|
+
When the customer pays with a wallet
|
|
14
|
+
Then the order is paid
|
|
15
|
+
|
|
16
|
+
Scenario: Card declined, then a wallet works
|
|
17
|
+
Given a drink in the cart
|
|
18
|
+
When the card is declined
|
|
19
|
+
And the customer pays with a wallet
|
|
20
|
+
Then the order is paid
|
|
21
|
+
|
|
22
|
+
Scenario: Slow payment
|
|
23
|
+
Given a drink in the cart
|
|
24
|
+
When the payment takes longer than a minute
|
|
25
|
+
Then the customer can check the payment again
|
|
26
|
+
|
|
27
|
+
Scenario: Leaves checkout and comes back
|
|
28
|
+
Given a drink in the cart
|
|
29
|
+
When the customer closes checkout
|
|
30
|
+
And the customer starts checkout again
|
|
31
|
+
Then checkout is open
|
|
32
|
+
|
|
33
|
+
Scenario: Drink left too long
|
|
34
|
+
Given a finished drink
|
|
35
|
+
When nobody picks it up
|
|
36
|
+
Then the drink is thrown away and refunded
|
|
@@ -30,6 +30,8 @@ import { APP_ROOT, FIXTURES_ROOT, listSpecFiles } from '../vite/atlas-files';
|
|
|
30
30
|
* Regenerates every fixture from the example spec in `example/specs` (a coffee-ordering app: an
|
|
31
31
|
* XState root chart with a parallel region that invokes an SCXML checkout chart) and a generated
|
|
32
32
|
* large atlas. All media is synthetic: ImageMagick draws the screens and ffmpeg the clips.
|
|
33
|
+
* Gherkin, Quint, DMN, Alloy and OpenSLO documents in that spec are copied with the charts.
|
|
34
|
+
* The visualizer dev server serves the layered report for them; this script does not rebuild it.
|
|
33
35
|
*/
|
|
34
36
|
|
|
35
37
|
const EXAMPLE_SPECS = path.join(APP_ROOT, 'example/specs');
|