mirror of https://github.com/dnaka91/obws
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
677 B
Rust
27 lines
677 B
Rust
use std::time::Duration;
|
|
|
|
use anyhow::Result;
|
|
use obws::responses::scene_collections::SceneCollections;
|
|
use tokio::time;
|
|
|
|
use crate::common;
|
|
|
|
#[tokio::test]
|
|
async fn scene_collections() -> Result<()> {
|
|
let client = common::new_client().await?;
|
|
let client = client.scene_collections();
|
|
|
|
let SceneCollections {
|
|
current,
|
|
collections,
|
|
} = client.list().await?;
|
|
client.current().await?;
|
|
let other = collections.iter().find(|sc| *sc != ¤t).unwrap();
|
|
client.set_current(other).await?;
|
|
time::sleep(Duration::from_secs(1)).await;
|
|
client.set_current(¤t).await?;
|
|
time::sleep(Duration::from_secs(1)).await;
|
|
|
|
Ok(())
|
|
}
|