Skip to content

Commit e966ec7

Browse files
committed
tests/docs: replace unstable claim id
1 parent 8f1ea83 commit e966ec7

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

docs/read_operations.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -377,14 +377,14 @@ wd data --simplify --keep ids,references,qualifiers,hashes 'Q2#P31'
377377
#### single claim
378378
The command also support finding a single claim from a claim GUID. (If you have a use case where you would need to fetch several claims at once this way, feel welcome to open an issue)
379379
```sh
380-
wd data 'Q2$50fad68d-4f91-f878-6f29-e655af54690e'
381-
wd data --simplify 'Q2$50fad68d-4f91-f878-6f29-e655af54690e'
382-
wd data --simplify --keep ids,references,qualifiers,hashes 'Q2$50fad68d-4f91-f878-6f29-e655af54690e'
380+
wd data 'Q1345582$EF038A46-C46B-4058-8514-A6EB5897A9E1'
381+
wd data --simplify 'Q1345582$EF038A46-C46B-4058-8514-A6EB5897A9E1'
382+
wd data --simplify --keep ids,references,qualifiers,hashes 'Q1345582$EF038A46-C46B-4058-8514-A6EB5897A9E1'
383383
```
384384

385385
To avoid having to quote the claim GUID, you can also use the hyphenated format
386386
```sh
387-
wd data Q2-50fad68d-4f91-f878-6f29-e655af54690e
387+
wd data Q1345582-EF038A46-C46B-4058-8514-A6EB5897A9E1
388388
```
389389

390390
#### entities schema

test/wb-data.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -131,43 +131,43 @@ describe('wb data', () => {
131131

132132
describe('claim data', () => {
133133
it('should get a claim data provided a claim guid', async () => {
134-
const guid = 'Q2$50fad68d-4f91-f878-6f29-e655af54690e'
134+
const guid = 'Q1345582$EF038A46-C46B-4058-8514-A6EB5897A9E1'
135135
const { stdout } = await shellExec(`./bin/wd.js data '${guid}'`)
136136
const claim = JSON.parse(stdout)
137137
claim.id.should.equal(guid)
138138
claim.mainsnak.property.should.equal('P31')
139-
claim.mainsnak.datavalue.value.id.should.equal('Q128207')
139+
claim.mainsnak.datavalue.value.id.should.equal('Q5')
140140
})
141141

142142
it('should accept prefixed claim GUIDs', async () => {
143-
const prefixedGuid = 'wds:Q2-50fad68d-4f91-f878-6f29-e655af54690e'
143+
const prefixedGuid = 'wds:Q1345582-EF038A46-C46B-4058-8514-A6EB5897A9E1'
144144
const { stdout } = await shellExec(`./bin/wd.js data '${prefixedGuid}'`)
145145
const claim = JSON.parse(stdout)
146-
claim.id.should.equal('Q2$50fad68d-4f91-f878-6f29-e655af54690e')
146+
claim.id.should.equal('Q1345582$EF038A46-C46B-4058-8514-A6EB5897A9E1')
147147
claim.mainsnak.property.should.equal('P31')
148-
claim.mainsnak.datavalue.value.id.should.equal('Q128207')
148+
claim.mainsnak.datavalue.value.id.should.equal('Q5')
149149
})
150150

151151
it('should accept claim GUIDs with an - in place of a $', async () => {
152-
const hyphenedGuid = 'Q2-50fad68d-4f91-f878-6f29-e655af54690e'
152+
const hyphenedGuid = 'Q1345582-EF038A46-C46B-4058-8514-A6EB5897A9E1'
153153
const { stdout } = await shellExec(`./bin/wd.js data '${hyphenedGuid}'`)
154154
const claim = JSON.parse(stdout)
155-
claim.id.should.equal('Q2$50fad68d-4f91-f878-6f29-e655af54690e')
155+
claim.id.should.equal('Q1345582$EF038A46-C46B-4058-8514-A6EB5897A9E1')
156156
claim.mainsnak.property.should.equal('P31')
157-
claim.mainsnak.datavalue.value.id.should.equal('Q128207')
157+
claim.mainsnak.datavalue.value.id.should.equal('Q5')
158158
})
159159

160160
it('should get a simplified claim', async () => {
161-
const { stdout } = await shellExec('./bin/wd.js data --simplify \'Q2$50fad68d-4f91-f878-6f29-e655af54690e\'')
162-
stdout.should.equal('Q128207')
161+
const { stdout } = await shellExec('./bin/wd.js data --simplify \'Q1345582$EF038A46-C46B-4058-8514-A6EB5897A9E1\'')
162+
stdout.should.equal('Q5')
163163
})
164164

165165
it('should keep the requested simplified claim data', async () => {
166-
const guid = 'Q2$50fad68d-4f91-f878-6f29-e655af54690e'
166+
const guid = 'Q1345582$EF038A46-C46B-4058-8514-A6EB5897A9E1'
167167
const { stdout } = await shellExec(`./bin/wd.js data --simplify --keep ids,references,qualifiers '${guid}'`)
168168
const claim = JSON.parse(stdout)
169169
claim.id.should.equal(guid)
170-
claim.value.should.equal('Q128207')
170+
claim.value.should.equal('Q5')
171171
claim.references.should.be.an.Array()
172172
claim.qualifiers.should.be.an.Object()
173173
})

0 commit comments

Comments
 (0)